Small changes
This commit is contained in:
parent
07af8559a4
commit
6cf3d0015e
7
init.lua
7
init.lua
|
|
@ -86,7 +86,7 @@ vim.o.confirm = true
|
||||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||||
-- See `:help hlsearch`
|
-- See `:help hlsearch`
|
||||||
-- Spell checking
|
-- Spell checking
|
||||||
vim.opt.spell = true
|
-- vim.opt.spell = true
|
||||||
|
|
||||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||||
|
|
||||||
|
|
@ -219,7 +219,7 @@ require('lazy').setup({
|
||||||
|
|
||||||
{ -- Useful plugin to show you pending keybinds.
|
{ -- Useful plugin to show you pending keybinds.
|
||||||
'folke/which-key.nvim',
|
'folke/which-key.nvim',
|
||||||
version = '2.1.0',
|
-- version = '2.1.0',
|
||||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||||
opts = {
|
opts = {
|
||||||
-- delay between pressing a key and opening which-key (milliseconds)
|
-- delay between pressing a key and opening which-key (milliseconds)
|
||||||
|
|
@ -620,6 +620,8 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
|
|
||||||
eslint = {},
|
eslint = {},
|
||||||
|
|
||||||
|
graphql = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Ensure the servers and tools above are installed
|
-- Ensure the servers and tools above are installed
|
||||||
|
|
@ -803,7 +805,6 @@ require('lazy').setup({
|
||||||
-- change the command in the config to whatever the name of that colorscheme is.
|
-- change the command in the config to whatever the name of that colorscheme is.
|
||||||
--
|
--
|
||||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||||
-- 'folke/tokyonight.nvim',
|
|
||||||
'navarasu/onedark.nvim',
|
'navarasu/onedark.nvim',
|
||||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||||
init = function()
|
init = function()
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@ return {
|
||||||
require 'neotest-jest' {
|
require 'neotest-jest' {
|
||||||
jestCommand = 'npm t --',
|
jestCommand = 'npm t --',
|
||||||
jest_test_discovery = false,
|
jest_test_discovery = false,
|
||||||
-- jestConfigFile = 'custom.jest.config.ts',
|
|
||||||
-- env = { CI = true },
|
|
||||||
cwd = function(path)
|
cwd = function(path)
|
||||||
return vim.fn.getcwd()
|
return vim.fn.getcwd()
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -3,21 +3,6 @@ return {
|
||||||
{ -- Linting
|
{ -- Linting
|
||||||
'mfussenegger/nvim-lint',
|
'mfussenegger/nvim-lint',
|
||||||
event = { 'BufReadPre', 'BufNewFile' },
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
-- init = function()
|
|
||||||
-- require('lint').linters.eslint.args = { '--fix' }
|
|
||||||
-- end,
|
|
||||||
-- init = function()
|
|
||||||
-- require('lint').linters.eslint.args = {
|
|
||||||
-- '--fix',
|
|
||||||
-- '--format',
|
|
||||||
-- 'json',
|
|
||||||
-- '--stdin',
|
|
||||||
-- '--stdin-filename',
|
|
||||||
-- function()
|
|
||||||
-- return vim.api.nvim_buf_get_name(0)
|
|
||||||
-- end,
|
|
||||||
-- }
|
|
||||||
-- end,
|
|
||||||
config = function()
|
config = function()
|
||||||
local lint = require 'lint'
|
local lint = require 'lint'
|
||||||
lint.linters_by_ft = {
|
lint.linters_by_ft = {
|
||||||
|
|
@ -26,48 +11,6 @@ return {
|
||||||
javascript = { 'eslint' },
|
javascript = { 'eslint' },
|
||||||
}
|
}
|
||||||
|
|
||||||
-- lint.linters.eslint.args = {
|
|
||||||
-- '--fix',
|
|
||||||
-- '--format',
|
|
||||||
-- 'json',
|
|
||||||
-- '--stdin',
|
|
||||||
-- '--stdin-filename',
|
|
||||||
-- function()
|
|
||||||
-- return vim.api.nvim_buf_get_name(0)
|
|
||||||
-- end,
|
|
||||||
-- }
|
|
||||||
-- -- To allow other plugins to add linters to require('lint').linters_by_ft,
|
|
||||||
-- instead set linters_by_ft like this:
|
|
||||||
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
|
||||||
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
|
||||||
--
|
|
||||||
-- However, note that this will enable a set of default linters,
|
|
||||||
-- which will cause errors unless these tools are available:
|
|
||||||
-- {
|
|
||||||
-- clojure = { "clj-kondo" },
|
|
||||||
-- dockerfile = { "hadolint" },
|
|
||||||
-- inko = { "inko" },
|
|
||||||
-- janet = { "janet" },
|
|
||||||
-- json = { "jsonlint" },
|
|
||||||
-- markdown = { "vale" },
|
|
||||||
-- rst = { "vale" },
|
|
||||||
-- ruby = { "ruby" },
|
|
||||||
-- terraform = { "tflint" },
|
|
||||||
-- text = { "vale" }
|
|
||||||
-- }
|
|
||||||
--
|
|
||||||
-- You can disable the default linters by setting their filetypes to nil:
|
|
||||||
-- lint.linters_by_ft['clojure'] = nil
|
|
||||||
-- lint.linters_by_ft['dockerfile'] = nil
|
|
||||||
-- lint.linters_by_ft['inko'] = nil
|
|
||||||
-- lint.linters_by_ft['janet'] = nil
|
|
||||||
-- lint.linters_by_ft['json'] = nil
|
|
||||||
-- lint.linters_by_ft['markdown'] = nil
|
|
||||||
-- lint.linters_by_ft['rst'] = nil
|
|
||||||
-- lint.linters_by_ft['ruby'] = nil
|
|
||||||
-- lint.linters_by_ft['terraform'] = nil
|
|
||||||
-- lint.linters_by_ft['text'] = nil
|
|
||||||
|
|
||||||
-- Create autocommand which carries out the actual linting
|
-- Create autocommand which carries out the actual linting
|
||||||
-- on the specified events.
|
-- on the specified events.
|
||||||
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue