format lua files
This commit is contained in:
@@ -101,12 +101,12 @@ local on_attach = function(client, bufnr)
|
||||
require("aerial").on_attach(client, bufnr)
|
||||
end
|
||||
|
||||
require('lspconfig')['pyright'].setup{
|
||||
on_attach = on_attach,
|
||||
require('lspconfig')['pyright'].setup {
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
require('lspconfig')['cmake'].setup{
|
||||
on_attach = on_attach,
|
||||
require('lspconfig')['cmake'].setup {
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
-- require('lspconfig')['clangd'].setup{
|
||||
@@ -120,50 +120,50 @@ require('clangd_extensions').setup({
|
||||
},
|
||||
})
|
||||
|
||||
require('lspconfig')['jsonls'].setup{
|
||||
on_attach = on_attach,
|
||||
require('lspconfig')['jsonls'].setup {
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
local lua_rtp = vim.split(package.path, ';')
|
||||
table.insert(lua_rtp, 'lua/?.lua')
|
||||
table.insert(lua_rtp, 'lua/?/init.lua')
|
||||
require('lspconfig').sumneko_lua.setup{
|
||||
on_attach = on_attach,
|
||||
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 = lua_rtp,
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { 'vim', 'use' },
|
||||
},
|
||||
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,
|
||||
},
|
||||
require('lspconfig').sumneko_lua.setup {
|
||||
on_attach = on_attach,
|
||||
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 = lua_rtp,
|
||||
},
|
||||
}
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { 'vim', 'use' },
|
||||
},
|
||||
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,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
require('lspconfig')['dockerls'].setup{
|
||||
on_attach = on_attach,
|
||||
require('lspconfig')['dockerls'].setup {
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
require('lspconfig')['yamlls'].setup{
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
yaml = {
|
||||
validate = false
|
||||
}
|
||||
require('lspconfig')['yamlls'].setup {
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
yaml = {
|
||||
validate = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local null_ls = require('null-ls')
|
||||
@@ -181,4 +181,3 @@ null_ls.setup({
|
||||
})
|
||||
|
||||
vim.diagnostic.config({ virtual_text = false })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user