Add cucumber language server support

pull/2/head
Ensar Sarajčić 2021-09-22 17:54:35 +02:00
parent 9fcc217fbd
commit b5d97ed205
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,19 @@
local configs = require 'lspconfig/configs'
local util = require 'lspconfig/util'
configs.cucumberls = {
default_config = {
cmd = { 'cucumber-language-server', '--stdio' },
filetypes = { 'cucumber' },
root_dir = util.root_pattern('.git'),
},
docs = {
description = [[
https://www.npmjs.com/package/@cucumber/language-server
Cucumber Language Server
]],
default_config = {
root_dir = [[root_pattern(".git")]],
},
},
}

View File

@ -3,6 +3,7 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
require("lsp.extra_servers.cucumber")
local on_attach = function(client, bufnr) local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
@ -26,7 +27,7 @@ local on_attach = function(client, bufnr)
end end
-- Lsp default language servers -- Lsp default language servers
local servers = { "bashls", "clangd", "dockerls", "jsonls", "pyright", "rust_analyzer", "kotlin_language_server", "vimls", "clojure_lsp", "gopls", "gdscript", "terraformls", "tsserver" } local servers = { "bashls", "clangd", "cucumberls", "dockerls", "jsonls", "pyright", "rust_analyzer", "kotlin_language_server", "vimls", "clojure_lsp", "gopls", "gdscript", "terraformls", "tsserver" }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
lspconfig[lsp].setup { on_attach = on_attach } lspconfig[lsp].setup { on_attach = on_attach }
end end