Skip to content

Instantly share code, notes, and snippets.

@refnode
Created July 21, 2022 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save refnode/ec495d02beec987c8516f1ac082a3d4f to your computer and use it in GitHub Desktop.
Save refnode/ec495d02beec987c8516f1ac082a3d4f to your computer and use it in GitHub Desktop.
neovim lua lsp config
require('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',
-- Setup your lua path
path = runtime_path,
},
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,
},
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment