things
This commit is contained in:
parent
eadd71a4d6
commit
a4d72a6d1e
2
init.lua
2
init.lua
|
@ -102,7 +102,7 @@ vim.g.have_nerd_font = true
|
|||
vim.opt.number = true
|
||||
-- You can also add relative line numbers, to help with jumping.
|
||||
-- Experiment for yourself to see if you like it!
|
||||
-- vim.opt.relativenumber = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||
vim.opt.mouse = 'a'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
return {
|
||||
|
||||
{ -- Linting
|
||||
'mfussenegger/nvim-lint',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
|
@ -13,37 +12,17 @@ return {
|
|||
typescriptreact = { 'eslint' },
|
||||
}
|
||||
|
||||
-- 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
|
||||
-- Check if eslint is installed before setting it as a linter
|
||||
local function is_executable(name)
|
||||
return vim.fn.executable(name) == 1
|
||||
end
|
||||
|
||||
if not is_executable 'eslint' then
|
||||
lint.linters_by_ft.javascript = nil
|
||||
lint.linters_by_ft.javascriptreact = nil
|
||||
lint.linters_by_ft.typescript = nil
|
||||
lint.linters_by_ft.typescriptreact = nil
|
||||
end
|
||||
|
||||
-- Create autocommand which carries out the actual linting
|
||||
-- on the specified events.
|
||||
|
|
Loading…
Reference in New Issue