feat(vim): enable lua support with linting and the lsp
This commit is contained in:
parent
68c1b1ba32
commit
2085bcb5fb
2 changed files with 24 additions and 0 deletions
|
|
@ -43,5 +43,6 @@ lint.linters_by_ft = {
|
|||
javascript = {'eslint'},
|
||||
typescriptreact = {'eslint'},
|
||||
javascriptreact = {'eslint'},
|
||||
lua = {'luacheck'},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,29 @@ lspconfig.emmet_ls.setup({
|
|||
}
|
||||
})
|
||||
|
||||
lspconfig.sumneko_lua.setup {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = {'vim'},
|
||||
},
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Change the diagnostic signs
|
||||
vim.fn.sign_define('DiagnosticSignError', { text = '✖', texthl = 'DiagnosticSignError', numhl = 'DiagnosticSignError' })
|
||||
vim.fn.sign_define('DiagnosticSignHint', { text = '➤', texthl = 'DiagnosticSignHint', numhl = 'DiagnosticSignHint' })
|
||||
|
|
|
|||
Loading…
Reference in a new issue