Configuring formatter for Lua
This commit is contained in:
parent
cc8d398753
commit
d058cadf33
|
@ -41,7 +41,40 @@ require('lspconfig').clangd.setup({})
|
|||
|
||||
require('lspconfig').julials.setup({})
|
||||
|
||||
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
|
||||
require('lspconfig').lua_ls.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' },
|
||||
neededFileStatus = {
|
||||
["codestyle-check"] = "Any",
|
||||
},
|
||||
},
|
||||
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,
|
||||
},
|
||||
format = {
|
||||
enable = true,
|
||||
-- Put format options here
|
||||
-- NOTE: the value should be STRING!!
|
||||
defaultConfig = {
|
||||
indent_style = "space",
|
||||
indent_size = "4",
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt"
|
||||
local words = {}
|
||||
|
|
Loading…
Reference in New Issue