diff --git a/site-modules/core/files/vim/plugin/lint.lua b/site-modules/core/files/vim/plugin/lint.lua index 5d0558f..034af32 100644 --- a/site-modules/core/files/vim/plugin/lint.lua +++ b/site-modules/core/files/vim/plugin/lint.lua @@ -43,5 +43,6 @@ lint.linters_by_ft = { javascript = {'eslint'}, typescriptreact = {'eslint'}, javascriptreact = {'eslint'}, + lua = {'luacheck'}, } diff --git a/site-modules/core/files/vim/plugin/lsp.lua b/site-modules/core/files/vim/plugin/lsp.lua index a01c458..a71aa6d 100644 --- a/site-modules/core/files/vim/plugin/lsp.lua +++ b/site-modules/core/files/vim/plugin/lsp.lua @@ -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' })