From 6c2fb86c6a03e20abea5ddd17d735885f0b7cb5e Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Wed, 24 Nov 2021 23:01:07 -0500 Subject: feat: expose configs --- lua/lspconfig/server_configurations/vimls.lua | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 lua/lspconfig/server_configurations/vimls.lua (limited to 'lua/lspconfig/server_configurations/vimls.lua') diff --git a/lua/lspconfig/server_configurations/vimls.lua b/lua/lspconfig/server_configurations/vimls.lua new file mode 100644 index 00000000..fdb67cec --- /dev/null +++ b/lua/lspconfig/server_configurations/vimls.lua @@ -0,0 +1,39 @@ +local util = require 'lspconfig/util' + +local bin_name = 'vim-language-server' +if vim.fn.has 'win32' == 1 then + bin_name = bin_name .. '.cmd' +end + +return { + default_config = { + cmd = { bin_name, '--stdio' }, + filetypes = { 'vim' }, + root_dir = function(fname) + return util.find_git_ancestor(fname) or vim.fn.getcwd() + end, + init_options = { + iskeyword = '@,48-57,_,192-255,-#', + vimruntime = '', + runtimepath = '', + diagnostic = { enable = true }, + indexes = { + runtimepath = true, + gap = 100, + count = 3, + projectRootPatterns = { 'runtime', 'nvim', '.git', 'autoload', 'plugin' }, + }, + suggest = { fromVimruntime = true, fromRuntimepath = true }, + }, + }, + docs = { + description = [[ +https://github.com/iamcco/vim-language-server + +You can install vim-language-server via npm: +```sh +npm install -g vim-language-server +``` +]], + }, +} -- cgit v1.2.3-70-g09d2