Skip to content

Instantly share code, notes, and snippets.

@smnatale
Created August 1, 2025 02:29
Show Gist options
  • Select an option

  • Save smnatale/b847e568f1a155b8e8349f29a482a1f4 to your computer and use it in GitHub Desktop.

Select an option

Save smnatale/b847e568f1a155b8e8349f29a482a1f4 to your computer and use it in GitHub Desktop.
vim.pack.add {
{ src = 'https://github.com/neovim/nvim-lspconfig' },
{ src = 'https://github.com/mason-org/mason.nvim' },
{ src = 'https://github.com/mason-org/mason-lspconfig.nvim' },
{ src = 'https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim' },
}
require('mason').setup()
require('mason-lspconfig').setup()
require('mason-tool-installer').setup({
ensure_installed = {
"lua_ls",
"stylua",
}
})
vim.lsp.config('lua_ls', {
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
diagnostics = {
globals = {
'vim',
'require'
},
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
telemetry = {
enable = false,
},
},
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment