mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 02:55:09 +02:00
add on attach to more langs
This commit is contained in:
parent
776c3ca935
commit
359c06d002
4 changed files with 6 additions and 1 deletions
|
@ -21,6 +21,7 @@ M.lsp = function()
|
||||||
|
|
||||||
require("lspconfig").elmls.setup {
|
require("lspconfig").elmls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-language-server" },
|
cmd = { DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-language-server" },
|
||||||
|
on_attach = require("lsp").common_on_attach,
|
||||||
init_options = {
|
init_options = {
|
||||||
elmAnalyseTrigger = "change",
|
elmAnalyseTrigger = "change",
|
||||||
elmFormatPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-format",
|
elmFormatPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-format",
|
||||||
|
|
|
@ -19,7 +19,9 @@ M.lsp = function()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
require("lspconfig").erlangls.setup {}
|
require("lspconfig").erlangls.setup {
|
||||||
|
on_attach = require("lsp").common_on_attach,
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.dap = function()
|
M.dap = function()
|
||||||
|
|
|
@ -23,6 +23,7 @@ M.lsp = function()
|
||||||
-- TODO: Remove this at some point
|
-- TODO: Remove this at some point
|
||||||
require("lspconfig").elixirls.setup {
|
require("lspconfig").elixirls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh" },
|
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh" },
|
||||||
|
on_attach = require("lsp").common_on_attach,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ M.lint = function()
|
||||||
require("lspconfig").efm.setup {
|
require("lspconfig").efm.setup {
|
||||||
-- init_options = {initializationOptions},
|
-- init_options = {initializationOptions},
|
||||||
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
|
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
|
||||||
|
on_attach = require("lsp").common_on_attach,
|
||||||
init_options = { documentFormatting = true, codeAction = false },
|
init_options = { documentFormatting = true, codeAction = false },
|
||||||
root_dir = require("lspconfig").util.root_pattern ".git/",
|
root_dir = require("lspconfig").util.root_pattern ".git/",
|
||||||
filetypes = { "sh" },
|
filetypes = { "sh" },
|
||||||
|
|
Loading…
Reference in a new issue