Selaa lähdekoodia

add on attach to more langs

christianchiarulli 4 vuotta sitten
vanhempi
commit
359c06d002
4 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  1. 1 0
      lua/lang/elm.lua
  2. 3 1
      lua/lang/erlang.lua
  3. 1 0
      lua/lang/euphoria3.lua
  4. 1 0
      lua/lang/sh.lua

+ 1 - 0
lua/lang/elm.lua

@@ -21,6 +21,7 @@ M.lsp = function()
 
   require("lspconfig").elmls.setup {
     cmd = { DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-language-server" },
+    on_attach = require("lsp").common_on_attach,
     init_options = {
       elmAnalyseTrigger = "change",
       elmFormatPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-format",

+ 3 - 1
lua/lang/erlang.lua

@@ -19,7 +19,9 @@ M.lsp = function()
     return
   end
 
-  require("lspconfig").erlangls.setup {}
+  require("lspconfig").erlangls.setup {
+    on_attach = require("lsp").common_on_attach,
+  }
 end
 
 M.dap = function()

+ 1 - 0
lua/lang/euphoria3.lua

@@ -23,6 +23,7 @@ M.lsp = function()
   -- TODO: Remove this at some point
   require("lspconfig").elixirls.setup {
     cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh" },
+    on_attach = require("lsp").common_on_attach,
   }
 end
 

+ 1 - 0
lua/lang/sh.lua

@@ -55,6 +55,7 @@ M.lint = function()
     require("lspconfig").efm.setup {
       -- init_options = {initializationOptions},
       cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
+      on_attach = require("lsp").common_on_attach,
       init_options = { documentFormatting = true, codeAction = false },
       root_dir = require("lspconfig").util.root_pattern ".git/",
       filetypes = { "sh" },