summaryrefslogtreecommitdiff
path: root/start/lspconfig-0.1.3/lua/lspconfig
diff options
context:
space:
mode:
Diffstat (limited to 'start/lspconfig-0.1.3/lua/lspconfig')
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/configs.lua295
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/als.lua37
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/angularls.lua75
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ansiblels.lua47
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/arduino_language_server.lua50
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/asm_lsp.lua19
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/awk_ls.lua22
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bashls.lua39
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/beancount.lua26
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bicep.lua47
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bsl_ls.lua19
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ccls.lua43
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clangd.lua87
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clarity_lsp.lua19
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clojure_lsp.lua19
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cmake.lua26
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/codeqlls.lua46
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/crystalline.lua20
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/csharp_ls.lua23
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cssls.lua49
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cssmodules_ls.lua31
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cucumber_language_server.lua33
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dartls.lua60
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/denols.lua114
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dhall_lsp_server.lua26
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/diagnosticls.lua29
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dockerls.lua30
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dotls.lua27
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/efm.lua43
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/elixirls.lua39
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/elmls.lua44
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ember.lua30
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/emmet_ls.lua31
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/erlangls.lua34
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/esbonio.lua55
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/eslint.lua172
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/flow.lua27
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/flux_lsp.lua22
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/foam_ls.lua31
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fortls.lua24
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fsautocomplete.lua32
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fstar.lua19
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gdscript.lua19
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ghcide.lua21
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/golangci_lint_ls.lua34
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gopls.lua22
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gradle_ls.lua37
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/grammarly.lua38
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/graphql.lua33
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/groovyls.lua36
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/haxe_language_server.lua47
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hdl_checker.lua20
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hhvm.lua21
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hie.lua34
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hls.lua43
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hoon_ls.lua29
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/html.lua48
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/idris2_lsp.lua41
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/intelephense.lua50
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/java_language_server.lua18
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jdtls.lua193
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jedi_language_server.lua28
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jsonls.lua48
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jsonnet_ls.lua40
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/julials.lua75
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/kotlin_language_server.lua71
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lean3ls.lua54
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/leanls.lua77
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lelwel_ls.lua21
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lemminx.lua23
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ltex.lua47
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/metals.lua45
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/mint.lua20
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/mm0_ls.lua20
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/nickel_ls.lua37
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/nimls.lua21
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ocamlls.lua28
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ocamllsp.lua38
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ols.lua20
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/omnisharp.lua52
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/opencl_ls.lua21
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/openscad_ls.lua32
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pasls.lua28
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlls.lua39
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlnavigator.lua39
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlpls.lua29
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/phpactor.lua26
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/please.lua19
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/powershell_es.lua72
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/prismals.lua34
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/prosemd_lsp.lua22
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/psalm.lua29
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/puppet.lua38
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/purescriptls.lua28
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pylsp.lua31
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pyre.lua22
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pyright.lua56
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/quick_lint_js.lua19
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/r_language_server.lua28
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/racket_langserver.lua21
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/reason_ls.lua23
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/remark_ls.lua50
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rescriptls.lua42
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rls.lua42
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rnix.lua28
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/robotframework_ls.lua21
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rome.lua42
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rust_analyzer.lua79
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/salt_ls.lua24
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/scry.lua22
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/serve_d.lua20
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sixtyfps.lua28
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/slint_lsp.lua26
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solang.lua27
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solargraph.lua38
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solc.lua19
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solidity_ls.lua24
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sorbet.lua26
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sourcekit.lua19
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sourcery.lua55
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/spectral.lua29
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sqlls.lua18
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sqls.lua25
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/stylelint_lsp.lua54
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sumneko_lua.lua63
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/svelte.lua29
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/svls.lua24
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tailwindcss.lua126
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/taplo.lua27
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/teal_ls.lua29
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/terraform_lsp.lua43
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/terraformls.lua42
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/texlab.lua126
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tflint.lua20
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/theme_check.lua31
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tsserver.lua60
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/typeprof.lua19
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vala_ls.lua40
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vdmj.lua128
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/verible.lua21
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vimls.lua41
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vls.lua32
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/volar.lua138
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vuels.lua68
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/yamlls.lua87
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zeta_note.lua28
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zk.lua48
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zls.lua20
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/ui/lspinfo.lua225
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/ui/windows.lua117
-rw-r--r--start/lspconfig-0.1.3/lua/lspconfig/util.lua426
151 files changed, 6982 insertions, 0 deletions
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/configs.lua b/start/lspconfig-0.1.3/lua/lspconfig/configs.lua
new file mode 100644
index 0000000..a47ecba
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/configs.lua
@@ -0,0 +1,295 @@
+local util = require 'lspconfig.util'
+local api, validate, lsp = vim.api, vim.validate, vim.lsp
+local tbl_extend = vim.tbl_extend
+
+local configs = {}
+
+function configs.__newindex(t, config_name, config_def)
+ validate {
+ name = { config_name, 's' },
+ default_config = { config_def.default_config, 't' },
+ on_new_config = { config_def.on_new_config, 'f', true },
+ on_attach = { config_def.on_attach, 'f', true },
+ commands = { config_def.commands, 't', true },
+ }
+ if config_def.commands then
+ for k, v in pairs(config_def.commands) do
+ validate {
+ ['command.name'] = { k, 's' },
+ ['command.fn'] = { v[1], 'f' },
+ }
+ end
+ else
+ config_def.commands = {}
+ end
+
+ local M = {}
+
+ local default_config = tbl_extend('keep', config_def.default_config, util.default_config)
+
+ -- Force this part.
+ default_config.name = config_name
+
+ function M.setup(config)
+ validate {
+ cmd = { config.cmd, 't', true },
+ root_dir = { config.root_dir, 'f', true },
+ filetypes = { config.filetype, 't', true },
+ on_new_config = { config.on_new_config, 'f', true },
+ on_attach = { config.on_attach, 'f', true },
+ commands = { config.commands, 't', true },
+ }
+ if config.commands then
+ for k, v in pairs(config.commands) do
+ validate {
+ ['command.name'] = { k, 's' },
+ ['command.fn'] = { v[1], 'f' },
+ }
+ end
+ end
+
+ config = tbl_extend('keep', config, default_config)
+
+ if util.on_setup then
+ pcall(util.on_setup, config)
+ end
+
+ if config.autostart == true then
+ local event
+ local pattern
+ if config.filetypes then
+ event = 'FileType'
+ pattern = table.concat(config.filetypes, ',')
+ else
+ event = 'BufReadPost'
+ pattern = '*'
+ end
+ api.nvim_command(
+ string.format(
+ "autocmd %s %s unsilent lua require'lspconfig'[%q].manager.try_add()",
+ event,
+ pattern,
+ config.name
+ )
+ )
+ end
+
+ local get_root_dir = config.root_dir
+
+ function M.launch()
+ local root_dir
+ if get_root_dir then
+ local bufnr = api.nvim_get_current_buf()
+ local bufname = api.nvim_buf_get_name(bufnr)
+ if not util.bufname_valid(bufname) then
+ return
+ end
+ root_dir = get_root_dir(util.path.sanitize(bufname), bufnr)
+ end
+
+ if root_dir then
+ api.nvim_command(
+ string.format(
+ "autocmd BufReadPost %s/* unsilent lua require'lspconfig'[%q].manager.try_add_wrapper()",
+ vim.fn.fnameescape(root_dir),
+ config.name
+ )
+ )
+ for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
+ local bufname = api.nvim_buf_get_name(bufnr)
+ if util.bufname_valid(bufname) then
+ local buf_dir = util.path.sanitize(bufname)
+ if buf_dir:sub(1, root_dir:len()) == root_dir then
+ M.manager.try_add_wrapper(bufnr)
+ end
+ end
+ end
+ elseif config.single_file_support then
+ -- This allows on_new_config to use the parent directory of the file
+ -- Effectively this is the root from lspconfig's perspective, as we use
+ -- this to attach additional files in the same parent folder to the same server.
+ -- We just no longer send rootDirectory or workspaceFolders during initialization.
+ local bufname = api.nvim_buf_get_name(0)
+ if not util.bufname_valid(bufname) then
+ return
+ end
+ local pseudo_root = util.path.dirname(util.path.sanitize(bufname))
+ local client_id = M.manager.add(pseudo_root, true)
+ vim.lsp.buf_attach_client(vim.api.nvim_get_current_buf(), client_id)
+ end
+ end
+
+ -- Used by :LspInfo
+ M.get_root_dir = get_root_dir
+ M.filetypes = config.filetypes
+ M.handlers = config.handlers
+ M.cmd = config.cmd
+ M.autostart = config.autostart
+
+ -- In the case of a reload, close existing things.
+ local reload = false
+ if M.manager then
+ for _, client in ipairs(M.manager.clients()) do
+ client.stop(true)
+ end
+ reload = true
+ M.manager = nil
+ end
+
+ local make_config = function(root_dir)
+ local new_config = vim.tbl_deep_extend('keep', vim.empty_dict(), config)
+ new_config = vim.tbl_deep_extend('keep', new_config, default_config)
+ new_config.capabilities = new_config.capabilities or lsp.protocol.make_client_capabilities()
+ new_config.capabilities = vim.tbl_deep_extend('keep', new_config.capabilities, {
+ workspace = {
+ configuration = true,
+ },
+ })
+
+ if config_def.on_new_config then
+ pcall(config_def.on_new_config, new_config, root_dir)
+ end
+ if config.on_new_config then
+ pcall(config.on_new_config, new_config, root_dir)
+ end
+
+ new_config.on_init = util.add_hook_after(new_config.on_init, function(client, result)
+ -- Handle offset encoding by default
+ if result.offsetEncoding then
+ client.offset_encoding = result.offsetEncoding
+ end
+
+ -- Send `settings to server via workspace/didChangeConfiguration
+ function client.workspace_did_change_configuration(settings)
+ if not settings then
+ return
+ end
+ if vim.tbl_isempty(settings) then
+ settings = { [vim.type_idx] = vim.types.dictionary }
+ end
+ return client.notify('workspace/didChangeConfiguration', {
+ settings = settings,
+ })
+ end
+ if not vim.tbl_isempty(new_config.settings) then
+ client.workspace_did_change_configuration(new_config.settings)
+ end
+ end)
+
+ -- Save the old _on_attach so that we can reference it via the BufEnter.
+ new_config._on_attach = new_config.on_attach
+ new_config.on_attach = vim.schedule_wrap(function(client, bufnr)
+ if bufnr == api.nvim_get_current_buf() then
+ M._setup_buffer(client.id, bufnr)
+ else
+ api.nvim_command(
+ string.format(
+ "autocmd BufEnter <buffer=%d> ++once lua require'lspconfig'[%q]._setup_buffer(%d,%d)",
+ bufnr,
+ config_name,
+ client.id,
+ bufnr
+ )
+ )
+ end
+ end)
+
+ new_config.root_dir = root_dir
+ new_config.workspace_folders = {
+ {
+ uri = vim.uri_from_fname(root_dir),
+ name = string.format('%s', root_dir),
+ },
+ }
+ return new_config
+ end
+
+ local manager = util.server_per_root_dir_manager(function(root_dir)
+ return make_config(root_dir)
+ end)
+
+ function manager.try_add(bufnr)
+ bufnr = bufnr or api.nvim_get_current_buf()
+
+ if vim.api.nvim_buf_get_option(bufnr, 'buftype') == 'nofile' then
+ return
+ end
+
+ local id
+ local root_dir
+
+ local bufname = api.nvim_buf_get_name(bufnr)
+ if not util.bufname_valid(bufname) then
+ return
+ end
+ local buf_path = util.path.sanitize(bufname)
+
+ if get_root_dir then
+ root_dir = get_root_dir(buf_path, bufnr)
+ end
+
+ if root_dir then
+ id = manager.add(root_dir, false)
+ elseif config.single_file_support then
+ local pseudo_root = util.path.dirname(buf_path)
+ id = manager.add(pseudo_root, true)
+ end
+
+ if id then
+ lsp.buf_attach_client(bufnr, id)
+ end
+ end
+
+ function manager.try_add_wrapper(bufnr)
+ bufnr = bufnr or api.nvim_get_current_buf()
+ local buf_filetype = vim.api.nvim_buf_get_option(bufnr, 'filetype')
+ if config.filetypes then
+ for _, filetype in ipairs(config.filetypes) do
+ if buf_filetype == filetype then
+ manager.try_add(bufnr)
+ return
+ end
+ end
+ else
+ manager.try_add(bufnr)
+ end
+ end
+
+ M.manager = manager
+ M.make_config = make_config
+ if reload and config.autostart ~= false then
+ for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
+ manager.try_add_wrapper(bufnr)
+ end
+ end
+ end
+
+ function M._setup_buffer(client_id, bufnr)
+ local client = lsp.get_client_by_id(client_id)
+ if not client then
+ return
+ end
+ if client.config._on_attach then
+ client.config._on_attach(client, bufnr)
+ end
+ if client.config.commands and not vim.tbl_isempty(client.config.commands) then
+ M.commands = vim.tbl_deep_extend('force', M.commands, client.config.commands)
+ end
+ if not M.commands_created and not vim.tbl_isempty(M.commands) then
+ -- Create the module commands
+ util.create_module_commands(config_name, M.commands)
+ M.commands_created = true
+ end
+ end
+
+ M.commands_created = false
+ M.commands = config_def.commands
+ M.name = config_name
+ M.document_config = config_def
+
+ rawset(t, config_name, M)
+
+ return M
+end
+
+return setmetatable({}, configs)
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/als.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/als.lua
new file mode 100644
index 0000000..7d916ad
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/als.lua
@@ -0,0 +1,37 @@
+local util = require 'lspconfig.util'
+local bin_name = 'ada_language_server'
+
+if vim.fn.has 'win32' == 1 then
+ bin_name = 'ada_language_server.exe'
+end
+
+return {
+ default_config = {
+ cmd = { bin_name },
+ filetypes = { 'ada' },
+ root_dir = util.root_pattern('Makefile', '.git', '*.gpr', '*.adc'),
+ },
+ docs = {
+ description = [[
+https://github.com/AdaCore/ada_language_server
+
+Installation instructions can be found [here](https://github.com/AdaCore/ada_language_server#Install).
+
+Can be configured by passing a "settings" object to `als.setup{}`:
+
+```lua
+require('lspconfig').als.setup{
+ settings = {
+ ada = {
+ projectFile = "project.gpr";
+ scenarioVariables = { ... };
+ }
+ }
+}
+```
+]],
+ default_config = {
+ root_dir = [[util.root_pattern("Makefile", ".git", "*.gpr", "*.adc")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/angularls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/angularls.lua
new file mode 100644
index 0000000..4d30de7
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/angularls.lua
@@ -0,0 +1,75 @@
+local util = require 'lspconfig.util'
+
+-- Angular requires a node_modules directory to probe for @angular/language-service and typescript
+-- in order to use your projects configured versions.
+-- This defaults to the vim cwd, but will get overwritten by the resolved root of the file.
+local function get_probe_dir(root_dir)
+ local project_root = util.find_node_modules_ancestor(root_dir)
+
+ return project_root and (project_root .. '/node_modules') or ''
+end
+
+local default_probe_dir = get_probe_dir(vim.fn.getcwd())
+
+local bin_name = 'ngserver'
+local args = {
+ '--stdio',
+ '--tsProbeLocations',
+ default_probe_dir,
+ '--ngProbeLocations',
+ default_probe_dir,
+}
+
+local cmd = { bin_name, unpack(args) }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, unpack(args) }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'typescript', 'html', 'typescriptreact', 'typescript.tsx' },
+ -- Check for angular.json or .git first since that is the root of the project.
+ -- Don't check for tsconfig.json or package.json since there are multiple of these
+ -- in an angular monorepo setup.
+ root_dir = util.root_pattern('angular.json', '.git'),
+ },
+ on_new_config = function(new_config, new_root_dir)
+ local new_probe_dir = get_probe_dir(new_root_dir)
+
+ -- We need to check our probe directories because they may have changed.
+ new_config.cmd = {
+ 'ngserver',
+ '--stdio',
+ '--tsProbeLocations',
+ new_probe_dir,
+ '--ngProbeLocations',
+ new_probe_dir,
+ }
+ end,
+ docs = {
+ description = [[
+https://github.com/angular/vscode-ng-language-service
+
+`angular-language-server` can be installed via npm `npm install -g @angular/language-server`.
+
+Note, that if you override the default `cmd`, you must also update `on_new_config` to set `new_config.cmd` during startup.
+
+```lua
+local project_library_path = "/path/to/project/lib"
+local cmd = {"ngserver", "--stdio", "--tsProbeLocations", project_library_path , "--ngProbeLocations", project_library_path}
+
+require'lspconfig'.angularls.setup{
+ cmd = cmd,
+ on_new_config = function(new_config,new_root_dir)
+ new_config.cmd = cmd
+ end,
+}
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("angular.json", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ansiblels.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ansiblels.lua
new file mode 100644
index 0000000..b4bb324
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ansiblels.lua
@@ -0,0 +1,47 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'ansible-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ settings = {
+ ansible = {
+ python = {
+ interpreterPath = 'python',
+ },
+ ansibleLint = {
+ path = 'ansible-lint',
+ enabled = true,
+ },
+ ansible = {
+ path = 'ansible',
+ },
+ executionEnvironment = {
+ enabled = false,
+ },
+ },
+ },
+ filetypes = { 'yaml.ansible' },
+ root_dir = util.root_pattern('ansible.cfg', '.ansible-lint'),
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/ansible/ansible-language-server
+
+Language server for the ansible configuration management tool.
+
+`ansible-language-server` can be installed via `npm`:
+
+```sh
+npm install -g @ansible/ansible-language-server
+```
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/arduino_language_server.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/arduino_language_server.lua
new file mode 100644
index 0000000..72f48a1
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/arduino_language_server.lua
@@ -0,0 +1,50 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'arduino-language-server' },
+ filetypes = { 'arduino' },
+ root_dir = util.root_pattern '*.ino',
+ },
+ docs = {
+ description = [[
+https://github.com/arduino/arduino-language-server
+
+Language server for Arduino
+
+The `arduino-language-server` can be installed by running:
+ go get -u github.com/arduino/arduino-language-server
+
+The `arduino-cli` tools must also be installed. Follow these instructions for your distro:
+ https://arduino.github.io/arduino-cli/latest/installation/
+
+After installing the `arduino-cli` tools, follow these instructions for generating
+a configuration file:
+ https://arduino.github.io/arduino-cli/latest/getting-started/#create-a-configuration-file
+and make sure you install any relevant platforms libraries:
+ https://arduino.github.io/arduino-cli/latest/getting-started/#install-the-core-for-your-board
+
+The language server also requires `clangd` be installed. It will look for `clangd` by default but
+the binary path can be overridden if need be.
+
+After all dependencies are installed you'll need to override the lspconfig command for the
+language server in your setup function with the necessary configurations:
+
+```lua
+lspconfig.arduino_language_server.setup({
+ cmd = {
+ -- Required
+ "arduino-language-server",
+ "-cli-config", "/path/to/arduino-cli.yaml",
+ -- Optional
+ "-cli", "/path/to/arduino-cli",
+ "-clangd", "/path/to/clangd"
+ }
+})
+```
+
+For further instruction about configuration options, run `arduino-language-server --help`.
+
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/asm_lsp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/asm_lsp.lua
new file mode 100644
index 0000000..102bcba
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/asm_lsp.lua
@@ -0,0 +1,19 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'asm-lsp' },
+ filetypes = { 'asm', 'vmasm' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ description = [[
+https://github.com/bergercookie/asm-lsp
+
+Language Server for GAS/GO Assembly
+
+`asm-lsp` can be installed via cargo:
+cargo install asm-lsp
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/awk_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/awk_ls.lua
new file mode 100644
index 0000000..ff1087d
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/awk_ls.lua
@@ -0,0 +1,22 @@
+if vim.version().major == 0 and vim.version().minor < 7 then
+ vim.notify('The AWK language server requires nvim >= 0.7', vim.log.levels.ERROR)
+ return
+end
+
+return {
+ default_config = {
+ cmd = { 'awk-language-server' },
+ filetypes = { 'awk' },
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/Beaglefoot/awk-language-server/
+
+`awk-language-server` can be installed via `npm`:
+```sh
+npm install -g awk-language-server
+```
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bashls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bashls.lua
new file mode 100644
index 0000000..3f25c76
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bashls.lua
@@ -0,0 +1,39 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'bash-language-server'
+local cmd = { bin_name, 'start' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, 'start' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ cmd_env = {
+ -- Prevent recursive scanning which will cause issues when opening a file
+ -- directly in the home directory (e.g. ~/foo.sh).
+ --
+ -- Default upstream pattern is "**/*@(.sh|.inc|.bash|.command)".
+ GLOB_PATTERN = vim.env.GLOB_PATTERN or '*@(.sh|.inc|.bash|.command)',
+ },
+ filetypes = { 'sh' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/mads-hartmann/bash-language-server
+
+`bash-language-server` can be installed via `npm`:
+```sh
+npm i -g bash-language-server
+```
+
+Language server for bash, written using tree sitter in typescript.
+]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/beancount.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/beancount.lua
new file mode 100644
index 0000000..1d86d34
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/beancount.lua
@@ -0,0 +1,26 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'beancount-langserver', '--stdio' },
+ filetypes = { 'beancount' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ init_options = {
+ -- this is the path to the beancout journal file
+ journalFile = '',
+ -- this is the path to the python binary with beancount installed
+ pythonPath = 'python3',
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/polarmutex/beancount-language-server#installation
+
+See https://github.com/polarmutex/beancount-language-server#configuration for configuration options
+]],
+ default_config = {
+ root_dir = [[root_pattern("elm.json")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bicep.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bicep.lua
new file mode 100644
index 0000000..1ec7032
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bicep.lua
@@ -0,0 +1,47 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ filetypes = { 'bicep' },
+ root_dir = util.find_git_ancestor,
+ init_options = {},
+ },
+ docs = {
+ description = [=[
+https://github.com/azure/bicep
+Bicep language server
+
+Bicep language server can be installed by downloading and extracting a release of bicep-langserver.zip from [Bicep GitHub releases](https://github.com/Azure/bicep/releases).
+
+Bicep language server requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed.
+
+Neovim does not have built-in support for the bicep filetype which is required for lspconfig to automatically launch the language server.
+
+Filetype detection can be added via an autocmd:
+```lua
+vim.cmd [[ autocmd BufNewFile,BufRead *.bicep set filetype=bicep ]]
+```
+
+**By default, bicep language server does not have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary.
+
+```lua
+local bicep_lsp_bin = "/path/to/bicep-langserver/Bicep.LangServer.dll"
+require'lspconfig'.bicep.setup{
+ cmd = { "dotnet", bicep_lsp_bin };
+ ...
+}
+```
+
+To download the latest release and place in /usr/local/bin/bicep-langserver:
+```bash
+(cd $(mktemp -d) \
+ && curl -fLO https://github.com/Azure/bicep/releases/latest/download/bicep-langserver.zip \
+ && rm -rf /usr/local/bin/bicep-langserver \
+ && unzip -d /usr/local/bin/bicep-langserver bicep-langserver.zip)
+```
+]=],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bsl_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bsl_ls.lua
new file mode 100644
index 0000000..fef15f9
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/bsl_ls.lua
@@ -0,0 +1,19 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ filetypes = { 'bsl', 'os' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ description = [[
+ https://github.com/1c-syntax/bsl-language-server
+
+ Language Server Protocol implementation for 1C (BSL) - 1C:Enterprise 8 and OneScript languages.
+
+ ]],
+ default_config = {
+ root_dir = [[root_pattern(".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ccls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ccls.lua
new file mode 100644
index 0000000..dd642db
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ccls.lua
@@ -0,0 +1,43 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'ccls' },
+ filetypes = { 'c', 'cpp', 'objc', 'objcpp' },
+ root_dir = util.root_pattern('compile_commands.json', '.ccls', '.git'),
+ offset_encoding = 'utf-32',
+ -- ccls does not support sending a null root directory
+ single_file_support = false,
+ },
+ docs = {
+ description = [[
+https://github.com/MaskRay/ccls/wiki
+
+ccls relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified
+as compile_commands.json or, for simpler projects, a .ccls.
+For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html). Alternatively, you can use [Bear](https://github.com/rizsotto/Bear).
+
+Customization options are passed to ccls at initialization time via init_options, a list of available options can be found [here](https://github.com/MaskRay/ccls/wiki/Customization#initialization-options). For example:
+
+```lua
+local lspconfig = require'lspconfig'
+lspconfig.ccls.setup {
+ init_options = {
+ compilationDatabaseDirectory = "build";
+ index = {
+ threads = 0;
+ };
+ clang = {
+ excludeArgs = { "-frounding-math"} ;
+ };
+ }
+}
+
+```
+
+]],
+ default_config = {
+ root_dir = [[root_pattern("compile_commands.json", ".ccls", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clangd.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clangd.lua
new file mode 100644
index 0000000..4e0f2d7
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clangd.lua
@@ -0,0 +1,87 @@
+local util = require 'lspconfig.util'
+
+-- https://clangd.llvm.org/extensions.html#switch-between-sourceheader
+local function switch_source_header(bufnr)
+ bufnr = util.validate_bufnr(bufnr)
+ local clangd_client = util.get_active_client_by_name(bufnr, 'clangd')
+ local params = { uri = vim.uri_from_bufnr(bufnr) }
+ if clangd_client then
+ clangd_client.request('textDocument/switchSourceHeader', params, function(err, result)
+ if err then
+ error(tostring(err))
+ end
+ if not result then
+ print 'Corresponding file cannot be determined'
+ return
+ end
+ vim.api.nvim_command('edit ' .. vim.uri_to_fname(result))
+ end, bufnr)
+ else
+ print 'method textDocument/switchSourceHeader is not supported by any servers active on the current buffer'
+ end
+end
+
+local root_files = {
+ '.clangd',
+ '.clang-tidy',
+ '.clang-format',
+ 'compile_commands.json',
+ 'compile_flags.txt',
+ 'configure.ac', -- AutoTools
+}
+
+local default_capabilities = vim.tbl_deep_extend(
+ 'force',
+ util.default_config.capabilities or vim.lsp.protocol.make_client_capabilities(),
+ {
+ textDocument = {
+ completion = {
+ editsNearCursor = true,
+ },
+ },
+ offsetEncoding = { 'utf-8', 'utf-16' },
+ }
+)
+
+return {
+ default_config = {
+ cmd = { 'clangd' },
+ filetypes = { 'c', 'cpp', 'objc', 'objcpp' },
+ root_dir = function(fname)
+ return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ capabilities = default_capabilities,
+ },
+ commands = {
+ ClangdSwitchSourceHeader = {
+ function()
+ switch_source_header(0)
+ end,
+ description = 'Switch between source/header',
+ },
+ },
+ docs = {
+ description = [[
+https://clangd.llvm.org/installation.html
+
+**NOTE:** Clang >= 11 is recommended! See [this issue for more](https://github.com/neovim/nvim-lsp/issues/23).
+
+clangd relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified as compile_commands.json, see https://clangd.llvm.org/installation#compile_commandsjson
+]],
+ default_config = {
+ root_dir = [[
+ root_pattern(
+ '.clangd',
+ '.clang-tidy',
+ '.clang-format',
+ 'compile_commands.json',
+ 'compile_flags.txt',
+ 'configure.ac',
+ '.git'
+ )
+ ]],
+ capabilities = [[default capabilities, with offsetEncoding utf-8]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clarity_lsp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clarity_lsp.lua
new file mode 100644
index 0000000..72a6197
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clarity_lsp.lua
@@ -0,0 +1,19 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'clarity-lsp' },
+ filetypes = { 'clar', 'clarity' },
+ root_dir = util.root_pattern '.git',
+ },
+ docs = {
+ description = [[
+`clarity-lsp` is a language server for the Clarity language. Clarity is a decidable smart contract language that optimizes for predictability and security. Smart contracts allow developers to encode essential business logic on a blockchain.
+
+To learn how to configure the clarity language server, see the [clarity-lsp documentation](https://github.com/hirosystems/clarity-lsp).
+]],
+ default_config = {
+ root_dir = [[root_pattern(".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clojure_lsp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clojure_lsp.lua
new file mode 100644
index 0000000..5340693
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/clojure_lsp.lua
@@ -0,0 +1,19 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'clojure-lsp' },
+ filetypes = { 'clojure', 'edn' },
+ root_dir = util.root_pattern('project.clj', 'deps.edn', 'build.boot', 'shadow-cljs.edn', '.git'),
+ },
+ docs = {
+ description = [[
+https://github.com/snoe/clojure-lsp
+
+Clojure Language Server
+]],
+ default_config = {
+ root_dir = [[root_pattern("project.clj", "deps.edn", "build.boot", "shadow-cljs.edn", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cmake.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cmake.lua
new file mode 100644
index 0000000..d334535
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cmake.lua
@@ -0,0 +1,26 @@
+local util = require 'lspconfig.util'
+
+local root_files = { 'CMakeLists.txt', 'cmake' }
+return {
+ default_config = {
+ cmd = { 'cmake-language-server' },
+ filetypes = { 'cmake' },
+ root_dir = function(fname)
+ return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ init_options = {
+ buildDirectory = 'build',
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/regen100/cmake-language-server
+
+CMake LSP Implementation
+]],
+ default_config = {
+ root_dir = [[root_pattern(".git", "compile_commands.json", "build")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/codeqlls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/codeqlls.lua
new file mode 100644
index 0000000..9184d2f
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/codeqlls.lua
@@ -0,0 +1,46 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'codeql', 'execute', 'language-server', '--check-errors', 'ON_CHANGE', '-q' },
+ filetypes = { 'ql' },
+ root_dir = util.root_pattern 'qlpack.yml',
+ log_level = vim.lsp.protocol.MessageType.Warning,
+ before_init = function(initialize_params)
+ initialize_params['workspaceFolders'] = {
+ {
+ name = 'workspace',
+ uri = initialize_params['rootUri'],
+ },
+ }
+ end,
+ settings = {
+ search_path = vim.empty_dict(),
+ },
+ },
+ docs = {
+ description = [[
+Reference:
+https://help.semmle.com/codeql/codeql-cli.html
+
+Binaries:
+https://github.com/github/codeql-cli-binaries
+ ]],
+ default_config = {
+ settings = {
+ search_path = [[list containing all search paths, eg: '~/codeql-home/codeql-repo']],
+ },
+ },
+ },
+ on_new_config = function(config)
+ if type(config.settings.search_path) == 'table' and not vim.tbl_isempty(config.settings.search_path) then
+ local search_path = '--search-path='
+ for _, path in ipairs(config.settings.search_path) do
+ search_path = search_path .. vim.fn.expand(path) .. ':'
+ end
+ config.cmd = { 'codeql', 'execute', 'language-server', '--check-errors', 'ON_CHANGE', '-q', search_path }
+ else
+ config.cmd = { 'codeql', 'execute', 'language-server', '--check-errors', 'ON_CHANGE', '-q' }
+ end
+ end,
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/crystalline.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/crystalline.lua
new file mode 100644
index 0000000..ef4d6bc
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/crystalline.lua
@@ -0,0 +1,20 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'crystalline' },
+ filetypes = { 'crystal' },
+ root_dir = util.root_pattern 'shard.yml' or util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/elbywan/crystalline
+
+Crystal language server.
+]],
+ default_config = {
+ root_dir = [[root_pattern('shard.yml', '.git')]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/csharp_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/csharp_ls.lua
new file mode 100644
index 0000000..828cba4
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/csharp_ls.lua
@@ -0,0 +1,23 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'csharp-ls' },
+ root_dir = util.root_pattern('*.sln', '*.csproj', '.git'),
+ filetypes = { 'cs' },
+ init_options = {
+ AutomaticWorkspaceInit = true,
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/razzmatazz/csharp-language-server
+
+Language Server for C#.
+
+csharp-ls requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed.
+
+The preferred way to install csharp-ls is with `dotnet tool install --global csharp-ls`.
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cssls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cssls.lua
new file mode 100644
index 0000000..41c38e6
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cssls.lua
@@ -0,0 +1,49 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'vscode-css-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'css', 'scss', 'less' },
+ root_dir = util.root_pattern('package.json', '.git'),
+ single_file_support = true,
+ settings = {
+ css = { validate = true },
+ scss = { validate = true },
+ less = { validate = true },
+ },
+ },
+ docs = {
+ description = [[
+
+https://github.com/hrsh7th/vscode-langservers-extracted
+
+`css-languageserver` can be installed via `npm`:
+
+```sh
+npm i -g vscode-langservers-extracted
+```
+
+Neovim does not currently include built-in snippets. `vscode-css-language-server` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup.
+
+```lua
+--Enable (broadcasting) snippet capability for completion
+local capabilities = vim.lsp.protocol.make_client_capabilities()
+capabilities.textDocument.completion.completionItem.snippetSupport = true
+
+require'lspconfig'.cssls.setup {
+ capabilities = capabilities,
+}
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("package.json", ".git") or bufdir]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cssmodules_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cssmodules_ls.lua
new file mode 100644
index 0000000..3107b75
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cssmodules_ls.lua
@@ -0,0 +1,31 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'cssmodules-language-server'
+local cmd = { bin_name }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact' },
+ root_dir = util.find_package_json_ancestor,
+ },
+ docs = {
+ description = [[
+https://github.com/antonk52/cssmodules-language-server
+
+Language server for autocompletion and go-to-definition functionality for CSS modules.
+
+You can install cssmodules-language-server via npm:
+```sh
+npm install -g cssmodules-language-server
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("package.json")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cucumber_language_server.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cucumber_language_server.lua
new file mode 100644
index 0000000..0783206
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/cucumber_language_server.lua
@@ -0,0 +1,33 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'cucumber-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'cucumber' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ description = [[
+https://cucumber.io
+https://github.com/cucumber/common
+https://www.npmjs.com/package/@cucumber/language-server
+
+Language server for Cucumber.
+
+`cucumber-language-server` can be installed via `npm`:
+```sh
+npm install -g @cucumber/language-server
+```
+ ]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dartls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dartls.lua
new file mode 100644
index 0000000..eecb0b7
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dartls.lua
@@ -0,0 +1,60 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'dart'
+
+local find_dart_sdk_root_path = function()
+ if os.getenv 'FLUTTER_SDK' then
+ local flutter_path = os.getenv 'FLUTTER_SDK'
+ return util.path.join(flutter_path, 'cache', 'dart-sdk', 'bin', 'dart')
+ elseif vim.fn['executable'] 'flutter' == 1 then
+ local flutter_path = vim.fn['resolve'](vim.fn['exepath'] 'flutter')
+ local flutter_bin = vim.fn['fnamemodify'](flutter_path, ':h')
+ return util.path.join(flutter_bin, 'cache', 'dart-sdk', 'bin', 'dart')
+ elseif vim.fn['executable'] 'dart' == 1 then
+ return vim.fn['resolve'](vim.fn['exepath'] 'dart')
+ else
+ return ''
+ end
+end
+
+local analysis_server_snapshot_path = function()
+ local dart_sdk_root_path = vim.fn['fnamemodify'](find_dart_sdk_root_path(), ':h')
+ local snapshot = util.path.join(dart_sdk_root_path, 'snapshots', 'analysis_server.dart.snapshot')
+
+ if vim.fn['has'] 'win32' == 1 or vim.fn['has'] 'win64' == 1 then
+ snapshot = snapshot:gsub('/', '\\')
+ end
+
+ return snapshot
+end
+
+return {
+ default_config = {
+ cmd = { bin_name, analysis_server_snapshot_path(), '--lsp' },
+ filetypes = { 'dart' },
+ root_dir = util.root_pattern 'pubspec.yaml',
+ init_options = {
+ onlyAnalyzeProjectsWithOpenFiles = true,
+ suggestFromUnimportedLibraries = true,
+ closingLabels = true,
+ outline = true,
+ flutterOutline = true,
+ },
+ settings = {
+ dart = {
+ completeFunctionCalls = true,
+ showTodos = true,
+ },
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server/tool/lsp_spec
+
+Language server for dart.
+]],
+ default_config = {
+ root_dir = [[root_pattern("pubspec.yaml")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/denols.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/denols.lua
new file mode 100644
index 0000000..a7bed35
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/denols.lua
@@ -0,0 +1,114 @@
+local util = require 'lspconfig.util'
+local lsp = vim.lsp
+
+local function buf_cache(bufnr)
+ local params = {}
+ params['referrer'] = { uri = vim.uri_from_bufnr(bufnr) }
+ params['uris'] = {}
+ lsp.buf_request(bufnr, 'deno/cache', params, function(err)
+ if err then
+ error(tostring(err))
+ end
+ end)
+end
+
+local function virtual_text_document_handler(uri, result)
+ if not result then
+ return nil
+ end
+
+ for client_id, res in pairs(result) do
+ local lines = vim.split(res.result, '\n')
+ local bufnr = vim.uri_to_bufnr(uri)
+
+ local current_buf = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
+ if #current_buf ~= 0 then
+ return nil
+ end
+
+ vim.api.nvim_buf_set_lines(bufnr, 0, -1, nil, lines)
+ vim.api.nvim_buf_set_option(bufnr, 'readonly', true)
+ vim.api.nvim_buf_set_option(bufnr, 'modified', false)
+ vim.api.nvim_buf_set_option(bufnr, 'modifiable', false)
+ lsp.buf_attach_client(bufnr, client_id)
+ end
+end
+
+local function virtual_text_document(uri)
+ local params = {
+ textDocument = {
+ uri = uri,
+ },
+ }
+ local result = lsp.buf_request_sync(0, 'deno/virtualTextDocument', params)
+ virtual_text_document_handler(uri, result)
+end
+
+local function denols_handler(err, result, ctx)
+ if not result or vim.tbl_isempty(result) then
+ return nil
+ end
+
+ for _, res in pairs(result) do
+ local uri = res.uri or res.targetUri
+ if uri:match '^deno:' then
+ virtual_text_document(uri)
+ res['uri'] = uri
+ res['targetUri'] = uri
+ end
+ end
+
+ lsp.handlers[ctx.method](err, result, ctx)
+end
+
+return {
+ default_config = {
+ cmd = { 'deno', 'lsp' },
+ filetypes = {
+ 'javascript',
+ 'javascriptreact',
+ 'javascript.jsx',
+ 'typescript',
+ 'typescriptreact',
+ 'typescript.tsx',
+ },
+ root_dir = util.root_pattern('deno.json', 'deno.jsonc', 'tsconfig.json', '.git'),
+ init_options = {
+ enable = true,
+ lint = false,
+ unstable = false,
+ },
+ handlers = {
+ ['textDocument/definition'] = denols_handler,
+ ['textDocument/references'] = denols_handler,
+ },
+ },
+ commands = {
+ DenolsCache = {
+ function()
+ buf_cache(0)
+ end,
+ description = 'Cache a module and all of its dependencies.',
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/denoland/deno
+
+Deno's built-in language server
+
+To approrpiately highlight codefences returned from denols, you will need to augment vim.g.markdown_fenced languages
+ in your init.lua. Example:
+
+```lua
+vim.g.markdown_fenced_languages = {
+ "ts=typescript"
+}
+```
+
+]],
+ default_config = {
+ root_dir = [[root_pattern("deno.json", "deno.jsonc", "tsconfig.json", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dhall_lsp_server.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dhall_lsp_server.lua
new file mode 100644
index 0000000..af910f3
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dhall_lsp_server.lua
@@ -0,0 +1,26 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'dhall-lsp-server' },
+ filetypes = { 'dhall' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-lsp-server
+
+language server for dhall
+
+`dhall-lsp-server` can be installed via cabal:
+```sh
+cabal install dhall-lsp-server
+```
+prebuilt binaries can be found [here](https://github.com/dhall-lang/dhall-haskell/releases).
+]],
+ default_config = {
+ root_dir = [[root_pattern(".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/diagnosticls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/diagnosticls.lua
new file mode 100644
index 0000000..8f0476b
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/diagnosticls.lua
@@ -0,0 +1,29 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'diagnostic-languageserver'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ filetypes = {},
+ },
+ docs = {
+ description = [[
+https://github.com/iamcco/diagnostic-languageserver
+
+Diagnostic language server integrate with linters.
+]],
+ default_config = {
+ filetypes = 'Empty by default, override to add filetypes',
+ root_dir = "Vim's starting directory",
+ init_options = 'Configuration from https://github.com/iamcco/diagnostic-languageserver#config--document',
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dockerls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dockerls.lua
new file mode 100644
index 0000000..6d1cfc7
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dockerls.lua
@@ -0,0 +1,30 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'docker-langserver'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'dockerfile' },
+ root_dir = util.root_pattern 'Dockerfile',
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/rcjsuen/dockerfile-language-server-nodejs
+
+`docker-langserver` can be installed via `npm`:
+```sh
+npm install -g dockerfile-language-server-nodejs
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("Dockerfile")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dotls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dotls.lua
new file mode 100644
index 0000000..dff14b9
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/dotls.lua
@@ -0,0 +1,27 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'dot-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'dot' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/nikeee/dot-language-server
+
+`dot-language-server` can be installed via `npm`:
+```sh
+npm install -g dot-language-server
+```
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/efm.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/efm.lua
new file mode 100644
index 0000000..f5f74ed
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/efm.lua
@@ -0,0 +1,43 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'efm-langserver' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+
+ docs = {
+ description = [[
+https://github.com/mattn/efm-langserver
+
+General purpose Language Server that can use specified error message format generated from specified command.
+
+Requires at minimum EFM version [v0.0.38](https://github.com/mattn/efm-langserver/releases/tag/v0.0.38) to support
+launching the language server on single files. If on an older version of EFM, disable single file support:
+
+```lua
+require('lspconfig')['efm'].setup{
+ settings = ..., -- You must populate this according to the EFM readme
+ filetypes = ..., -- Populate this according to the note below
+ single_file_support = false, -- This is the important line for supporting older version of EFM
+}
+```
+
+Note: In order for neovim's built-in language server client to send the appropriate `languageId` to EFM, **you must
+specify `filetypes` in your call to `setup{}`**. Otherwise `lspconfig` will launch EFM on the `BufEnter` instead
+of the `FileType` autocommand, and the `filetype` variable used to populate the `languageId` will not yet be set.
+
+```lua
+require('lspconfig')['efm'].setup{
+ settings = ..., -- You must populate this according to the EFM readme
+ filetypes = { 'python','cpp','lua' }
+}
+```
+
+]],
+ default_config = {
+ root_dir = [[util.root_pattern(".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/elixirls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/elixirls.lua
new file mode 100644
index 0000000..d51aa50
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/elixirls.lua
@@ -0,0 +1,39 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ filetypes = { 'elixir', 'eelixir' },
+ root_dir = function(fname)
+ return util.root_pattern('mix.exs', '.git')(fname) or vim.loop.os_homedir()
+ end,
+ },
+ docs = {
+ description = [[
+https://github.com/elixir-lsp/elixir-ls
+
+`elixir-ls` can be installed by following the instructions [here](https://github.com/elixir-lsp/elixir-ls#building-and-running).
+
+```bash
+curl -fLO https://github.com/elixir-lsp/elixir-ls/releases/latest/download/elixir-ls.zip
+unzip elixir-ls.zip -d /path/to/elixir-ls
+# Unix
+chmod +x /path/to/elixir-ls/language_server.sh
+```
+
+**By default, elixir-ls doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of your unzipped elixir-ls.
+
+```lua
+require'lspconfig'.elixirls.setup{
+ -- Unix
+ cmd = { "/path/to/elixir-ls/language_server.sh" };
+ -- Windows
+ cmd = { "/path/to/elixir-ls/language_server.bat" };
+ ...
+}
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("mix.exs", ".git") or vim.loop.os_homedir()]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/elmls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/elmls.lua
new file mode 100644
index 0000000..2718c88
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/elmls.lua
@@ -0,0 +1,44 @@
+local util = require 'lspconfig.util'
+local lsp = vim.lsp
+local api = vim.api
+
+local bin_name = 'elm-language-server'
+local cmd = { bin_name }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name }
+end
+
+local default_capabilities = lsp.protocol.make_client_capabilities()
+default_capabilities.offsetEncoding = { 'utf-8', 'utf-16' }
+local elm_root_pattern = util.root_pattern 'elm.json'
+
+return {
+ default_config = {
+ cmd = cmd,
+ -- TODO(ashkan) if we comment this out, it will allow elmls to operate on elm.json. It seems like it could do that, but no other editor allows it right now.
+ filetypes = { 'elm' },
+ root_dir = function(fname)
+ local filetype = api.nvim_buf_get_option(0, 'filetype')
+ if filetype == 'elm' or (filetype == 'json' and fname:match 'elm%.json$') then
+ return elm_root_pattern(fname)
+ end
+ end,
+ init_options = {
+ elmAnalyseTrigger = 'change',
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/elm-tooling/elm-language-server#installation
+
+If you don't want to use Nvim to install it, then you can use:
+```sh
+npm install -g elm elm-test elm-format @elm-tooling/elm-language-server
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("elm.json")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ember.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ember.lua
new file mode 100644
index 0000000..e6ce1ea
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ember.lua
@@ -0,0 +1,30 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'ember-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'handlebars', 'typescript', 'javascript' },
+ root_dir = util.root_pattern('ember-cli-build.js', '.git'),
+ },
+ docs = {
+ description = [[
+https://github.com/lifeart/ember-language-server
+
+`ember-language-server` can be installed via `npm`:
+
+```sh
+npm install -g @lifeart/ember-language-server
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("ember-cli-build.js", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/emmet_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/emmet_ls.lua
new file mode 100644
index 0000000..3750ae5
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/emmet_ls.lua
@@ -0,0 +1,31 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'emmet-ls'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'html', 'css' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/aca/emmet-ls
+
+Package can be installed via `npm`:
+```sh
+npm install -g emmet-ls
+```
+]],
+ default_config = {
+ root_dir = 'git root',
+ single_file_support = true,
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/erlangls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/erlangls.lua
new file mode 100644
index 0000000..cec1928
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/erlangls.lua
@@ -0,0 +1,34 @@
+local util = require 'lspconfig.util'
+
+local cmd = { 'erlang_ls' }
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', 'erlang_ls.cmd' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'erlang' },
+ root_dir = util.root_pattern('rebar.config', 'erlang.mk', '.git'),
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://erlang-ls.github.io
+
+Language Server for Erlang.
+
+Clone [erlang_ls](https://github.com/erlang-ls/erlang_ls)
+Compile the project with `make` and copy resulting binaries somewhere in your $PATH eg. `cp _build/*/bin/* ~/local/bin`
+
+Installation instruction can be found [here](https://github.com/erlang-ls/erlang_ls).
+
+Installation requirements:
+ - [Erlang OTP 21+](https://github.com/erlang/otp)
+ - [rebar3 3.9.1+](https://github.com/erlang/rebar3)
+]],
+ default_config = {
+ root_dir = [[root_pattern('rebar.config', 'erlang.mk', '.git')]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/esbonio.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/esbonio.lua
new file mode 100644
index 0000000..a97c26b
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/esbonio.lua
@@ -0,0 +1,55 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'python3', '-m', 'esbonio' },
+ filetypes = { 'rst' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ description = [[
+https://github.com/swyddfa/esbonio
+
+Esbonio is a language server for [Sphinx](https://www.sphinx-doc.org/en/master/) documentation projects.
+The language server can be installed via pip
+
+```
+pip install esbonio
+```
+
+Since Sphinx is highly extensible you will get best results if you install the language server in the same
+Python environment as the one used to build your documentation. To ensure that the correct Python environment
+is picked up, you can either launch `nvim` with the correct environment activated.
+
+```
+source env/bin/activate
+nvim
+```
+
+Or you can modify the default `cmd` to include the full path to the Python interpreter.
+
+```lua
+require'lspconfig'.esbonio.setup {
+ cmd = { '/path/to/virtualenv/bin/python', '-m', 'esbonio' }
+}
+```
+
+Esbonio supports a number of config values passed as `init_options` on startup, for example.
+
+```lua
+require'lspconfig'.esbonio.setup {
+ init_options = {
+ server = {
+ logLevel = "debug"
+ },
+ sphinx = {
+ confDir = "/path/to/docs",
+ srcDir = "${confDir}/../docs-src"
+ }
+}
+```
+
+A full list and explanation of the available options can be found [here](https://swyddfa.github.io/esbonio/docs/lsp/editors/index.html)
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/eslint.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/eslint.lua
new file mode 100644
index 0000000..925cdfe
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/eslint.lua
@@ -0,0 +1,172 @@
+local util = require 'lspconfig.util'
+local lsp = vim.lsp
+
+local get_eslint_client = function()
+ local active_clients = lsp.get_active_clients()
+ for _, client in ipairs(active_clients) do
+ if client.name == 'eslint' then
+ return client
+ end
+ end
+ return nil
+end
+
+local function fix_all(opts)
+ opts = opts or {}
+
+ local eslint_lsp_client = get_eslint_client()
+ if eslint_lsp_client == nil then
+ return
+ end
+
+ local request
+ if opts.sync then
+ request = function(bufnr, method, params)
+ eslint_lsp_client.request_sync(method, params, nil, bufnr)
+ end
+ else
+ request = function(bufnr, method, params)
+ eslint_lsp_client.request(method, params, nil, bufnr)
+ end
+ end
+
+ local bufnr = util.validate_bufnr(opts.bufnr or 0)
+ request(0, 'workspace/executeCommand', {
+ command = 'eslint.applyAllFixes',
+ arguments = {
+ {
+ uri = vim.uri_from_bufnr(bufnr),
+ version = lsp.util.buf_versions[bufnr],
+ },
+ },
+ })
+end
+
+local bin_name = 'vscode-eslint-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = {
+ 'javascript',
+ 'javascriptreact',
+ 'javascript.jsx',
+ 'typescript',
+ 'typescriptreact',
+ 'typescript.tsx',
+ 'vue',
+ },
+ -- https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-file-formats
+ root_dir = util.root_pattern(
+ '.eslintrc.js',
+ '.eslintrc.cjs',
+ '.eslintrc.yaml',
+ '.eslintrc.yml',
+ '.eslintrc.json',
+ 'package.json'
+ ),
+ -- Refer to https://github.com/Microsoft/vscode-eslint#settings-options for documentation.
+ settings = {
+ validate = 'on',
+ packageManager = 'npm',
+ useESLintClass = false,
+ codeActionOnSave = {
+ enable = false,
+ mode = 'all',
+ },
+ format = true,
+ quiet = false,
+ onIgnoredFiles = 'off',
+ rulesCustomizations = {},
+ run = 'onType',
+ -- nodePath configures the directory in which the eslint server should start its node_modules resolution.
+ -- This path is relative to the workspace folder (root dir) of the server instance.
+ nodePath = '',
+ -- use the workspace folder location or the file location (if no workspace folder is open) as the working directory
+ workingDirectory = { mode = 'location' },
+ codeAction = {
+ disableRuleComment = {
+ enable = true,
+ location = 'separateLine',
+ },
+ showDocumentation = {
+ enable = true,
+ },
+ },
+ },
+ on_new_config = function(config, new_root_dir)
+ -- The "workspaceFolder" is a VSCode concept. It limits how far the
+ -- server will traverse the file system when locating the ESLint config
+ -- file (e.g., .eslintrc).
+ config.settings.workspaceFolder = {
+ uri = new_root_dir,
+ name = vim.fn.fnamemodify(new_root_dir, ':t'),
+ }
+ end,
+ handlers = {
+ ['eslint/openDoc'] = function(_, result)
+ if not result then
+ return
+ end
+ local sysname = vim.loop.os_uname().sysname
+ if sysname:match 'Windows' then
+ os.execute(string.format('start %q', result.url))
+ elseif sysname:match 'Linux' then
+ os.execute(string.format('xdg-open %q', result.url))
+ else
+ os.execute(string.format('open %q', result.url))
+ end
+ return {}
+ end,
+ ['eslint/confirmESLintExecution'] = function(_, result)
+ if not result then
+ return
+ end
+ return 4 -- approved
+ end,
+ ['eslint/probeFailed'] = function()
+ vim.notify('[lspconfig] ESLint probe failed.', vim.log.levels.WARN)
+ return {}
+ end,
+ ['eslint/noLibrary'] = function()
+ vim.notify('[lspconfig] Unable to find ESLint library.', vim.log.levels.WARN)
+ return {}
+ end,
+ },
+ },
+ commands = {
+ EslintFixAll = {
+ function()
+ fix_all { sync = true, bufnr = 0 }
+ end,
+ description = 'Fix all eslint problems for this buffer',
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/hrsh7th/vscode-langservers-extracted
+
+vscode-eslint-language-server: A linting engine for JavaScript / Typescript
+
+`vscode-eslint-language-server` can be installed via `npm`:
+```sh
+npm i -g vscode-langservers-extracted
+```
+
+vscode-eslint-language-server provides an EslintFixAll command that can be used to format document on save
+```vim
+autocmd BufWritePre *.tsx,*.ts,*.jsx,*.js EslintFixAll
+```
+
+See [vscode-eslint](https://github.com/microsoft/vscode-eslint/blob/55871979d7af184bf09af491b6ea35ebd56822cf/server/src/eslintServer.ts#L216-L229) for configuration options.
+
+Additional messages you can handle: eslint/noConfig
+Messages already handled in lspconfig: eslint/openDoc, eslint/confirmESLintExecution, eslint/probeFailed, eslint/noLibrary
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/flow.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/flow.lua
new file mode 100644
index 0000000..3ac59aa
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/flow.lua
@@ -0,0 +1,27 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'npx', '--no-install', 'flow', 'lsp' },
+ filetypes = { 'javascript', 'javascriptreact', 'javascript.jsx' },
+ root_dir = util.root_pattern '.flowconfig',
+ },
+ docs = {
+ description = [[
+https://flow.org/
+https://github.com/facebook/flow
+
+See below for how to setup Flow itself.
+https://flow.org/en/docs/install/
+
+See below for lsp command options.
+
+```sh
+npx flow lsp --help
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern(".flowconfig")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/flux_lsp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/flux_lsp.lua
new file mode 100644
index 0000000..3be9a1b
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/flux_lsp.lua
@@ -0,0 +1,22 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'flux-lsp' },
+ filetypes = { 'flux' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/influxdata/flux-lsp
+`flux-lsp` can be installed via `cargo`:
+```sh
+cargo install --git https://github.com/influxdata/flux-lsp
+```
+]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/foam_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/foam_ls.lua
new file mode 100644
index 0000000..1f0d7fc
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/foam_ls.lua
@@ -0,0 +1,31 @@
+local util = require 'lspconfig.util'
+local bin_name = 'foam-ls'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'foam', 'OpenFOAM' },
+ root_dir = function(fname)
+ return util.search_ancestors(fname, function(path)
+ if util.path.exists(util.path.join(path, 'system', 'controlDict')) then
+ return path
+ end
+ end)
+ end,
+ },
+ docs = {
+ description = [[
+https://github.com/FoamScience/foam-language-server
+
+`foam-language-server` can be installed via `npm`
+```sh
+npm install -g foam-language-server
+```
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fortls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fortls.lua
new file mode 100644
index 0000000..5879139
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fortls.lua
@@ -0,0 +1,24 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'fortls' },
+ filetypes = { 'fortran' },
+ root_dir = function(fname)
+ return util.root_pattern '.fortls'(fname) or util.find_git_ancestor(fname)
+ end,
+ settings = {
+ nthreads = 1,
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/hansec/fortran-language-server
+
+Fortran Language Server for the Language Server Protocol
+ ]],
+ default_config = {
+ root_dir = [[root_pattern(".fortls")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fsautocomplete.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fsautocomplete.lua
new file mode 100644
index 0000000..1a1d4c5
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fsautocomplete.lua
@@ -0,0 +1,32 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'fsautocomplete', '--background-service-enabled' },
+ root_dir = util.root_pattern('*.sln', '*.fsproj', '.git'),
+ filetypes = { 'fsharp' },
+ init_options = {
+ AutomaticWorkspaceInit = true,
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/fsharp/FsAutoComplete
+
+Language Server for F# provided by FsAutoComplete (FSAC).
+
+FsAutoComplete requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed.
+
+The preferred way to install FsAutoComplete is with `dotnet tool install --global fsautocomplete`.
+
+Instructions to compile from source are found on the main [repository](https://github.com/fsharp/FsAutoComplete).
+
+You may also need to configure the filetype as Vim defaults to Forth for `*.fs` files:
+
+`autocmd BufNewFile,BufRead *.fs,*.fsx,*.fsi set filetype=fsharp`
+
+This is automatically done by plugins such as [PhilT/vim-fsharp](https://github.com/PhilT/vim-fsharp), [fsharp/vim-fsharp](https://github.com/fsharp/vim-fsharp), and [adelarsq/neofsharp.vim](https://github.com/adelarsq/neofsharp.vim).
+
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fstar.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fstar.lua
new file mode 100644
index 0000000..d866c54
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/fstar.lua
@@ -0,0 +1,19 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'fstar.exe', '--lsp' },
+ filetypes = { 'fstar' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ description = [[
+https://github.com/FStarLang/FStar
+
+LSP support is included in FStar. Make sure `fstar.exe` is in your PATH.
+]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gdscript.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gdscript.lua
new file mode 100644
index 0000000..d6d697f
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gdscript.lua
@@ -0,0 +1,19 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'nc', 'localhost', '6008' },
+ filetypes = { 'gd', 'gdscript', 'gdscript3' },
+ root_dir = util.root_pattern('project.godot', '.git'),
+ },
+ docs = {
+ description = [[
+https://github.com/godotengine/godot
+
+Language server for GDScript, used by Godot Engine.
+]],
+ default_config = {
+ root_dir = [[util.root_pattern("project.godot", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ghcide.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ghcide.lua
new file mode 100644
index 0000000..7f9307b
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ghcide.lua
@@ -0,0 +1,21 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'ghcide', '--lsp' },
+ filetypes = { 'haskell', 'lhaskell' },
+ root_dir = util.root_pattern('stack.yaml', 'hie-bios', 'BUILD.bazel', 'cabal.config', 'package.yaml'),
+ },
+
+ docs = {
+ description = [[
+https://github.com/digital-asset/ghcide
+
+A library for building Haskell IDE tooling.
+"ghcide" isn't for end users now. Use "haskell-language-server" instead of "ghcide".
+]],
+ default_config = {
+ root_dir = [[root_pattern("stack.yaml", "hie-bios", "BUILD.bazel", "cabal.config", "package.yaml")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/golangci_lint_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/golangci_lint_ls.lua
new file mode 100644
index 0000000..8eaa015
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/golangci_lint_ls.lua
@@ -0,0 +1,34 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'golangci-lint-langserver' },
+ filetypes = { 'go', 'gomod' },
+ init_options = {
+ command = { 'golangci-lint', 'run', '--out-format', 'json' },
+ },
+ root_dir = function(fname)
+ return util.root_pattern 'go.work'(fname) or util.root_pattern('go.mod', '.golangci.yaml', '.git')(fname)
+ end,
+ },
+ docs = {
+ description = [[
+Combination of both lint server and client
+
+https://github.com/nametake/golangci-lint-langserver
+https://github.com/golangci/golangci-lint
+
+
+Installation of binaries needed is done via
+
+```
+go install github.com/nametake/golangci-lint-langserver@latest
+go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.1
+```
+
+]],
+ default_config = {
+ root_dir = [[root_pattern('go.work') or root_pattern('go.mod', '.golangci.yaml', '.git')]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gopls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gopls.lua
new file mode 100644
index 0000000..f6a085d
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gopls.lua
@@ -0,0 +1,22 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'gopls' },
+ filetypes = { 'go', 'gomod', 'gotmpl' },
+ root_dir = function(fname)
+ return util.root_pattern 'go.work'(fname) or util.root_pattern('go.mod', '.git')(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/golang/tools/tree/master/gopls
+
+Google's lsp server for golang.
+]],
+ default_config = {
+ root_dir = [[root_pattern("go.mod", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gradle_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gradle_ls.lua
new file mode 100644
index 0000000..b23b599
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/gradle_ls.lua
@@ -0,0 +1,37 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'gradle-language-server'
+if vim.fn.has 'win32' == 1 then
+ bin_name = bin_name .. '.bat'
+end
+
+local root_files = {
+ 'settings.gradle', -- Gradle (multi-project)
+}
+
+local fallback_root_files = {
+ 'build.gradle', -- Gradle
+}
+
+return {
+ default_config = {
+ filetypes = { 'groovy' },
+ root_dir = function(fname)
+ return util.root_pattern(unpack(root_files))(fname) or util.root_pattern(unpack(fallback_root_files))(fname)
+ end,
+ cmd = { bin_name },
+ },
+ docs = {
+ description = [[
+https://github.com/microsoft/vscode-gradle
+
+Microsoft's lsp server for gradle files
+
+If you're setting this up manually, build vscode-gradle using `./gradlew installDist` and point `cmd` to the `gradle-language-server` generated in the build directory
+]],
+ default_config = {
+ root_dir = [[root_pattern("settings.gradle")]],
+ cmd = { 'gradle-language-server' },
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/grammarly.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/grammarly.lua
new file mode 100644
index 0000000..675169d
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/grammarly.lua
@@ -0,0 +1,38 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'unofficial-grammarly-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'markdown' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ handlers = {
+ ['$/updateDocumentState'] = function()
+ return ''
+ end,
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/emacs-grammarly/unofficial-grammarly-language-server
+
+`unofficial-grammarly-language-server` can be installed via `npm`:
+
+```sh
+npm i -g @emacs-grammarly/unofficial-grammarly-language-server
+```
+
+WARNING: Since this language server uses Grammarly's API, any document you open with it running is shared with them. Please evaluate their [privacy policy](https://www.grammarly.com/privacy-policy) before using this.
+]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/graphql.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/graphql.lua
new file mode 100644
index 0000000..d34881c
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/graphql.lua
@@ -0,0 +1,33 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'graphql-lsp'
+local cmd = { bin_name, 'server', '-m', 'stream' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, 'server', '-m', 'stream' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'graphql', 'typescriptreact', 'javascriptreact' },
+ root_dir = util.root_pattern('.git', '.graphqlrc*', '.graphql.config.*', 'graphql.config.*'),
+ },
+
+ docs = {
+ description = [[
+https://github.com/graphql/graphiql/tree/main/packages/graphql-language-service-cli
+
+`graphql-lsp` can be installed via `npm`:
+
+```sh
+npm install -g graphql-language-service-cli
+```
+
+Note that you must also have [the graphql package](https://github.com/graphql/graphql-js) installed and create a [GraphQL config file](https://www.graphql-config.com/docs/user/user-introduction).
+]],
+ default_config = {
+ root_dir = [[root_pattern('.git', '.graphqlrc*', '.graphql.config.*')]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/groovyls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/groovyls.lua
new file mode 100644
index 0000000..b4182f4
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/groovyls.lua
@@ -0,0 +1,36 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = {
+ 'java',
+ '-jar',
+ 'groovy-language-server-all.jar',
+ },
+ filetypes = { 'groovy' },
+ root_dir = function(fname)
+ return util.root_pattern 'Jenkinsfile'(fname) or util.find_git_ancestor(fname)
+ end,
+ },
+ docs = {
+ description = [[
+https://github.com/prominic/groovy-language-server.git
+
+Requirements:
+ - Linux/macOS (for now)
+ - Java 11+
+
+`groovyls` can be installed by following the instructions [here](https://github.com/prominic/groovy-language-server.git#build).
+
+If you have installed groovy language server, you can set the `cmd` custom path as follow:
+
+```lua
+require'lspconfig'.groovyls.setup{
+ -- Unix
+ cmd = { "java", "-jar", "path/to/groovyls/groovy-language-server-all.jar" },
+ ...
+}
+```
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/haxe_language_server.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/haxe_language_server.lua
new file mode 100644
index 0000000..1589c7b
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/haxe_language_server.lua
@@ -0,0 +1,47 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'haxe-language-server' },
+ filetypes = { 'haxe' },
+ root_dir = util.root_pattern '*.hxml',
+ settings = {
+ haxe = {
+ executable = 'haxe',
+ },
+ },
+ init_options = {
+ displayArguments = { 'build.hxml' },
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/vshaxe/haxe-language-server
+
+The Haxe language server can be built by running the following commands from
+the project's root directory:
+
+ npm install
+ npx lix run vshaxe-build -t language-server
+
+This will create `bin/server.js`. Note that the server requires Haxe 3.4.0 or
+higher.
+
+After building the language server, set the `cmd` setting in your setup
+function:
+
+```lua
+lspconfig.haxe_language_server.setup({
+ cmd = {"node", "path/to/bin/server.js"},
+})
+```
+
+By default, an HXML compiler arguments file named `build.hxml` is expected in
+your project's root directory. If your file is named something different,
+specify it using the `init_options.displayArguments` setting.
+]],
+ default_config = {
+ root_dir = [[root_pattern("*.hxml")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hdl_checker.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hdl_checker.lua
new file mode 100644
index 0000000..5cf2941
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hdl_checker.lua
@@ -0,0 +1,20 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'hdl_checker', '--lsp' },
+ filetypes = { 'vhdl', 'verilog', 'systemverilog' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/suoto/hdl_checker
+Language server for hdl-checker.
+Install using: `pip install hdl-checker --upgrade`
+]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hhvm.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hhvm.lua
new file mode 100644
index 0000000..0e8ac5c
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hhvm.lua
@@ -0,0 +1,21 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'hh_client', 'lsp' },
+ filetypes = { 'php', 'hack' },
+ root_dir = util.root_pattern '.hhconfig',
+ },
+ docs = {
+ description = [[
+Language server for programs written in Hack
+https://hhvm.com/
+https://github.com/facebook/hhvm
+See below for how to setup HHVM & typechecker:
+https://docs.hhvm.com/hhvm/getting-started/getting-started
+ ]],
+ default_config = {
+ root_dir = [[root_pattern(".hhconfig")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hie.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hie.lua
new file mode 100644
index 0000000..96148ad
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hie.lua
@@ -0,0 +1,34 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'hie-wrapper', '--lsp' },
+ filetypes = { 'haskell' },
+ root_dir = util.root_pattern('stack.yaml', 'package.yaml', '.git'),
+ },
+
+ docs = {
+ description = [[
+https://github.com/haskell/haskell-ide-engine
+
+the following init_options are supported (see https://github.com/haskell/haskell-ide-engine#configuration):
+```lua
+init_options = {
+ languageServerHaskell = {
+ hlintOn = bool;
+ maxNumberOfProblems = number;
+ diagnosticsDebounceDuration = number;
+ liquidOn = bool (default false);
+ completionSnippetsOn = bool (default true);
+ formatOnImportOn = bool (default true);
+ formattingProvider = string (default "brittany", alternate "floskell");
+ }
+}
+```
+ ]],
+
+ default_config = {
+ root_dir = [[root_pattern("stack.yaml", "package.yaml", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hls.lua
new file mode 100644
index 0000000..32b3ea2
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hls.lua
@@ -0,0 +1,43 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'haskell-language-server-wrapper', '--lsp' },
+ filetypes = { 'haskell', 'lhaskell' },
+ root_dir = util.root_pattern('*.cabal', 'stack.yaml', 'cabal.project', 'package.yaml', 'hie.yaml'),
+ single_file_support = true,
+ settings = {
+ haskell = {
+ formattingProvider = 'ormolu',
+ },
+ },
+ lspinfo = function(cfg)
+ local extra = {}
+ local function on_stdout(_, data, _)
+ local version = data[1]
+ table.insert(extra, 'version: ' .. version)
+ end
+
+ local opts = {
+ cwd = cfg.cwd,
+ stdout_buffered = true,
+ on_stdout = on_stdout,
+ }
+ local chanid = vim.fn.jobstart({ cfg.cmd[1], '--version' }, opts)
+ vim.fn.jobwait { chanid }
+ return extra
+ end,
+ },
+
+ docs = {
+ description = [[
+https://github.com/haskell/haskell-language-server
+
+Haskell Language Server
+ ]],
+
+ default_config = {
+ root_dir = [[root_pattern("*.cabal", "stack.yaml", "cabal.project", "package.yaml", "hie.yaml")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hoon_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hoon_ls.lua
new file mode 100644
index 0000000..80092db
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/hoon_ls.lua
@@ -0,0 +1,29 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'hoon-language-server'
+local cmd = { bin_name }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'hoon' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/urbit/hoon-language-server
+
+A language server for Hoon.
+
+The language server can be installed via `npm install -g @hoon-language-server`
+
+Start a fake ~zod with `urbit -F zod`.
+Start the language server at the Urbit Dojo prompt with: `|start %language-server`
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/html.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/html.lua
new file mode 100644
index 0000000..2f8214f
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/html.lua
@@ -0,0 +1,48 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'vscode-html-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'html' },
+ root_dir = util.root_pattern('package.json', '.git'),
+ single_file_support = true,
+ settings = {},
+ init_options = {
+ provideFormatter = true,
+ embeddedLanguages = { css = true, javascript = true },
+ configurationSection = { 'html', 'css', 'javascript' },
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/hrsh7th/vscode-langservers-extracted
+
+`vscode-html-language-server` can be installed via `npm`:
+```sh
+npm i -g vscode-langservers-extracted
+```
+
+Neovim does not currently include built-in snippets. `vscode-html-language-server` only provides completions when snippet support is enabled.
+To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup.
+
+The code-formatting feature of the lsp can be controlled with the `provideFormatter` option.
+
+```lua
+--Enable (broadcasting) snippet capability for completion
+local capabilities = vim.lsp.protocol.make_client_capabilities()
+capabilities.textDocument.completion.completionItem.snippetSupport = true
+
+require'lspconfig'.html.setup {
+ capabilities = capabilities,
+}
+```
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/idris2_lsp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/idris2_lsp.lua
new file mode 100644
index 0000000..d6efdd1
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/idris2_lsp.lua
@@ -0,0 +1,41 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'idris2-lsp' },
+ filetypes = { 'idris2' },
+ root_dir = util.root_pattern '*.ipkg',
+ },
+ docs = {
+ description = [[
+https://github.com/idris-community/idris2-lsp
+
+The Idris 2 language server.
+
+Plugins for the Idris 2 filetype include
+[Idris2-Vim](https://github.com/edwinb/idris2-vim) (fewer features, stable) and
+[Nvim-Idris2](https://github.com/ShinKage/nvim-idris2) (cutting-edge,
+experimental).
+
+Idris2-Lsp requires a build of Idris 2 that includes the "Idris 2 API" package.
+Package managers with known support for this build include the
+[AUR](https://aur.archlinux.org/packages/idris2-api-git/) and
+[Homebrew](https://formulae.brew.sh/formula/idris2#default).
+
+If your package manager does not support the Idris 2 API, you will need to build
+Idris 2 from source. Refer to the
+[the Idris 2 installation instructions](https://github.com/idris-lang/Idris2/blob/main/INSTALL.md)
+for details. Steps 5 and 8 are listed as "optional" in that guide, but they are
+necessary in order to make the Idris 2 API available.
+
+You need to install a version of Idris2-Lsp that is compatible with your
+version of Idris 2. There should be a branch corresponding to every released
+Idris 2 version after v0.4.0. Use the latest commit on that branch. For example,
+if you have Idris v0.5.1, you should use the v0.5.1 branch of Idris2-Lsp.
+
+If your Idris 2 version is newer than the newest Idris2-Lsp branch, use the
+latest commit on the `master` branch, and set a reminder to check the Idris2-Lsp
+repo for the release of a compatible versioned branch.
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/intelephense.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/intelephense.lua
new file mode 100644
index 0000000..c9e35b9
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/intelephense.lua
@@ -0,0 +1,50 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'intelephense'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'php' },
+ root_dir = function(pattern)
+ local cwd = vim.loop.cwd()
+ local root = util.root_pattern('composer.json', '.git')(pattern)
+
+ -- prefer cwd if root is a descendant
+ return util.path.is_descendant(cwd, root) and cwd or root
+ end,
+ },
+ docs = {
+ description = [[
+https://intelephense.com/
+
+`intelephense` can be installed via `npm`:
+```sh
+npm install -g intelephense
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("composer.json", ".git")]],
+ init_options = [[{
+ storagePath = Optional absolute path to storage dir. Defaults to os.tmpdir().
+ globalStoragePath = Optional absolute path to a global storage dir. Defaults to os.homedir().
+ licenceKey = Optional licence key or absolute path to a text file containing the licence key.
+ clearCache = Optional flag to clear server state. State can also be cleared by deleting {storagePath}/intelephense
+ -- See https://github.com/bmewburn/intelephense-docs/blob/master/installation.md#initialisation-options
+ }]],
+ settings = [[{
+ intelephense = {
+ files = {
+ maxSize = 1000000;
+ };
+ };
+ -- See https://github.com/bmewburn/intelephense-docs
+ }]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/java_language_server.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/java_language_server.lua
new file mode 100644
index 0000000..3ddf4b1
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/java_language_server.lua
@@ -0,0 +1,18 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ filetypes = { 'java' },
+ root_dir = util.root_pattern('build.gradle', 'pom.xml', '.git'),
+ settings = {},
+ },
+ docs = {
+ description = [[
+https://github.com/georgewfraser/java-language-server
+
+Java language server
+
+Point `cmd` to `lang_server_linux.sh` or the equivalent script for macOS/Windows provided by java-language-server
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jdtls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jdtls.lua
new file mode 100644
index 0000000..d740572
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jdtls.lua
@@ -0,0 +1,193 @@
+local util = require 'lspconfig.util'
+local handlers = require 'vim.lsp.handlers'
+
+local sysname = vim.loop.os_uname().sysname
+local env = {
+ HOME = vim.loop.os_homedir(),
+ JAVA_HOME = os.getenv 'JAVA_HOME',
+ JDTLS_HOME = os.getenv 'JDTLS_HOME',
+ WORKSPACE = os.getenv 'WORKSPACE',
+}
+
+local function get_java_executable()
+ local executable = env.JAVA_HOME and util.path.join(env.JAVA_HOME, 'bin', 'java') or 'java'
+
+ return sysname:match 'Windows' and executable .. '.exe' or executable
+end
+
+local function get_workspace_dir()
+ return env.WORKSPACE and env.WORKSPACE or util.path.join(env.HOME, 'workspace')
+end
+
+local function get_jdtls_jar()
+ return vim.fn.expand '$JDTLS_HOME/plugins/org.eclipse.equinox.launcher_*.jar'
+end
+
+local function get_jdtls_config()
+ if sysname:match 'Linux' then
+ return util.path.join(env.JDTLS_HOME, 'config_linux')
+ elseif sysname:match 'Darwin' then
+ return util.path.join(env.JDTLS_HOME, 'config_mac')
+ elseif sysname:match 'Windows' then
+ return util.path.join(env.JDTLS_HOME, 'config_win')
+ else
+ return util.path.join(env.JDTLS_HOME, 'config_linux')
+ end
+end
+
+-- TextDocument version is reported as 0, override with nil so that
+-- the client doesn't think the document is newer and refuses to update
+-- See: https://github.com/eclipse/eclipse.jdt.ls/issues/1695
+local function fix_zero_version(workspace_edit)
+ if workspace_edit and workspace_edit.documentChanges then
+ for _, change in pairs(workspace_edit.documentChanges) do
+ local text_document = change.textDocument
+ if text_document and text_document.version and text_document.version == 0 then
+ text_document.version = nil
+ end
+ end
+ end
+ return workspace_edit
+end
+
+local function on_textdocument_codeaction(err, actions, ctx)
+ for _, action in ipairs(actions) do
+ -- TODO: (steelsojka) Handle more than one edit?
+ if action.command == 'java.apply.workspaceEdit' then -- 'action' is Command in java format
+ action.edit = fix_zero_version(action.edit or action.arguments[1])
+ elseif type(action.command) == 'table' and action.command.command == 'java.apply.workspaceEdit' then -- 'action' is CodeAction in java format
+ action.edit = fix_zero_version(action.edit or action.command.arguments[1])
+ end
+ end
+
+ handlers[ctx.method](err, actions, ctx)
+end
+
+local function on_textdocument_rename(err, workspace_edit, ctx)
+ handlers[ctx.method](err, fix_zero_version(workspace_edit), ctx)
+end
+
+local function on_workspace_applyedit(err, workspace_edit, ctx)
+ handlers[ctx.method](err, fix_zero_version(workspace_edit), ctx)
+end
+
+-- Non-standard notification that can be used to display progress
+local function on_language_status(_, result)
+ local command = vim.api.nvim_command
+ command 'echohl ModeMsg'
+ command(string.format('echo "%s"', result.message))
+ command 'echohl None'
+end
+
+local root_files = {
+ -- Single-module projects
+ {
+ 'build.xml', -- Ant
+ 'pom.xml', -- Maven
+ 'settings.gradle', -- Gradle
+ 'settings.gradle.kts', -- Gradle
+ },
+ -- Multi-module projects
+ { 'build.gradle', 'build.gradle.kts' },
+}
+
+return {
+ default_config = {
+ cmd = {
+ get_java_executable(),
+ '-Declipse.application=org.eclipse.jdt.ls.core.id1',
+ '-Dosgi.bundles.defaultStartLevel=4',
+ '-Declipse.product=org.eclipse.jdt.ls.core.product',
+ '-Dlog.protocol=true',
+ '-Dlog.level=ALL',
+ '-Xms1g',
+ '-Xmx2G',
+ '--add-modules=ALL-SYSTEM',
+ '--add-opens',
+ 'java.base/java.util=ALL-UNNAMED',
+ '--add-opens',
+ 'java.base/java.lang=ALL-UNNAMED',
+ '-jar',
+ get_jdtls_jar(),
+ '-configuration',
+ get_jdtls_config(),
+ '-data',
+ get_workspace_dir(),
+ },
+ filetypes = { 'java' },
+ root_dir = function(fname)
+ for _, patterns in ipairs(root_files) do
+ local root = util.root_pattern(unpack(patterns))(fname)
+ if root then
+ return root
+ end
+ end
+ end,
+ single_file_support = true,
+ init_options = {
+ workspace = get_workspace_dir(),
+ jvm_args = {},
+ os_config = nil,
+ },
+ handlers = {
+ -- Due to an invalid protocol implementation in the jdtls we have to conform these to be spec compliant.
+ -- https://github.com/eclipse/eclipse.jdt.ls/issues/376
+ ['textDocument/codeAction'] = on_textdocument_codeaction,
+ ['textDocument/rename'] = on_textdocument_rename,
+ ['workspace/applyEdit'] = on_workspace_applyedit,
+ ['language/status'] = vim.schedule_wrap(on_language_status),
+ },
+ },
+ docs = {
+ description = [[
+https://projects.eclipse.org/projects/eclipse.jdt.ls
+
+Language server for Java.
+
+IMPORTANT: If you want all the features jdtls has to offer, [nvim-jdtls](https://github.com/mfussenegger/nvim-jdtls)
+is highly recommended. If all you need is diagnostics, completion, imports, gotos and formatting and some code actions
+you can keep reading here.
+
+For manual installation you can download precompiled binaries from the
+[official downloads site](http://download.eclipse.org/jdtls/snapshots/?d)
+
+Due to the nature of java, settings cannot be inferred. Please set the following
+environmental variables to match your installation. If you need per-project configuration
+[direnv](https://github.com/direnv/direnv) is highly recommended.
+
+```bash
+# Mandatory:
+# .bashrc
+export JDTLS_HOME=/path/to/jdtls_root # Directory with the plugin and configs directories
+
+# Optional:
+export JAVA_HOME=/path/to/java_home # In case you don't have java in path or want to use a version in particular
+export WORKSPACE=/path/to/workspace # Defaults to $HOME/workspace
+```
+```lua
+ -- init.lua
+ require'lspconfig'.jdtls.setup{}
+```
+
+For automatic installation you can use the following unofficial installers/launchers under your own risk:
+ - [jdtls-launcher](https://github.com/eruizc-dev/jdtls-launcher) (Includes lombok support by default)
+ ```lua
+ -- init.lua
+ require'lspconfig'.jdtls.setup{ cmd = { 'jdtls' } }
+ ```
+ ]],
+ default_config = {
+ root_dir = [[{
+ -- Single-module projects
+ {
+ 'build.xml', -- Ant
+ 'pom.xml', -- Maven
+ 'settings.gradle', -- Gradle
+ 'settings.gradle.kts', -- Gradle
+ },
+ -- Multi-module projects
+ { 'build.gradle', 'build.gradle.kts' },
+ } or vim.fn.getcwd()]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jedi_language_server.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jedi_language_server.lua
new file mode 100644
index 0000000..30cf8f5
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jedi_language_server.lua
@@ -0,0 +1,28 @@
+local util = require 'lspconfig.util'
+
+local root_files = {
+ 'pyproject.toml',
+ 'setup.py',
+ 'setup.cfg',
+ 'requirements.txt',
+ 'Pipfile',
+}
+
+return {
+ default_config = {
+ cmd = { 'jedi-language-server' },
+ filetypes = { 'python' },
+ root_dir = util.root_pattern(unpack(root_files)),
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/pappasam/jedi-language-server
+
+`jedi-language-server`, a language server for Python, built on top of jedi
+ ]],
+ default_config = {
+ root_dir = "vim's starting directory",
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jsonls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jsonls.lua
new file mode 100644
index 0000000..a62a715
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jsonls.lua
@@ -0,0 +1,48 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'vscode-json-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'json', 'jsonc' },
+ init_options = {
+ provideFormatter = true,
+ },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ -- this language server config is in VSCode built-in package.json
+ description = [[
+https://github.com/hrsh7th/vscode-langservers-extracted
+
+vscode-json-language-server, a language server for JSON and JSON schema
+
+`vscode-json-language-server` can be installed via `npm`:
+```sh
+npm i -g vscode-langservers-extracted
+```
+
+Neovim does not currently include built-in snippets. `vscode-json-language-server` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup.
+
+```lua
+--Enable (broadcasting) snippet capability for completion
+local capabilities = vim.lsp.protocol.make_client_capabilities()
+capabilities.textDocument.completion.completionItem.snippetSupport = true
+
+require'lspconfig'.jsonls.setup {
+ capabilities = capabilities,
+}
+```
+]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jsonnet_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jsonnet_ls.lua
new file mode 100644
index 0000000..3493e7e
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/jsonnet_ls.lua
@@ -0,0 +1,40 @@
+local util = require 'lspconfig.util'
+
+-- common jsonnet library paths
+local function jsonnet_path(root_dir)
+ local paths = {
+ util.path.join(root_dir, 'lib'),
+ util.path.join(root_dir, 'vendor'),
+ }
+ return table.concat(paths, ':')
+end
+
+return {
+ default_config = {
+ cmd = { 'jsonnet-language-server' },
+ filetypes = { 'jsonnet', 'libsonnet' },
+ root_dir = function(fname)
+ return util.root_pattern 'jsonnetfile.json'(fname) or util.find_git_ancestor(fname)
+ end,
+ on_new_config = function(new_config, root_dir)
+ new_config.cmd_env = {
+ JSONNET_PATH = jsonnet_path(root_dir),
+ }
+ end,
+ },
+ docs = {
+ description = [[
+https://github.com/grafana/jsonnet-language-server
+
+A Language Server Protocol (LSP) server for Jsonnet.
+
+The language server can be installed with `go`:
+```sh
+go install github.com/grafana/jsonnet-language-server@latest
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("jsonnetfile.json")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/julials.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/julials.lua
new file mode 100644
index 0000000..44360c7
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/julials.lua
@@ -0,0 +1,75 @@
+local util = require 'lspconfig.util'
+
+local cmd = {
+ 'julia',
+ '--startup-file=no',
+ '--history-file=no',
+ '-e',
+ [[
+ # Load LanguageServer.jl: attempt to load from ~/.julia/environments/nvim-lspconfig
+ # with the regular load path as a fallback
+ ls_install_path = joinpath(
+ get(DEPOT_PATH, 1, joinpath(homedir(), ".julia")),
+ "environments", "nvim-lspconfig"
+ )
+ pushfirst!(LOAD_PATH, ls_install_path)
+ using LanguageServer
+ popfirst!(LOAD_PATH)
+ depot_path = get(ENV, "JULIA_DEPOT_PATH", "")
+ project_path = let
+ dirname(something(
+ ## 1. Finds an explicitly set project (JULIA_PROJECT)
+ Base.load_path_expand((
+ p = get(ENV, "JULIA_PROJECT", nothing);
+ p === nothing ? nothing : isempty(p) ? nothing : p
+ )),
+ ## 2. Look for a Project.toml file in the current working directory,
+ ## or parent directories, with $HOME as an upper boundary
+ Base.current_project(),
+ ## 3. First entry in the load path
+ get(Base.load_path(), 1, nothing),
+ ## 4. Fallback to default global environment,
+ ## this is more or less unreachable
+ Base.load_path_expand("@v#.#"),
+ ))
+ end
+ @info "Running language server" VERSION pwd() project_path depot_path
+ server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)
+ server.runlinter = true
+ run(server)
+ ]],
+}
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'julia' },
+ root_dir = function(fname)
+ return util.root_pattern 'Project.toml'(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/julia-vscode/julia-vscode
+
+LanguageServer.jl can be installed with `julia` and `Pkg`:
+```sh
+julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.add("LanguageServer")'
+```
+where `~/.julia/environments/nvim-lspconfig` is the location where
+the default configuration expects LanguageServer.jl to be installed.
+
+To update an existing install, use the following command:
+```sh
+julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.update()'
+```
+
+Note: In order to have LanguageServer.jl pick up installed packages or dependencies in a
+Julia project, you must make sure that the project is instantiated:
+```sh
+julia --project=/path/to/my/project -e 'using Pkg; Pkg.instantiate()'
+```
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/kotlin_language_server.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/kotlin_language_server.lua
new file mode 100644
index 0000000..a955fe6
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/kotlin_language_server.lua
@@ -0,0 +1,71 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'kotlin-language-server'
+if vim.fn.has 'win32' == 1 then
+ bin_name = bin_name .. '.bat'
+end
+
+--- The presence of one of these files indicates a project root directory
+--
+-- These are configuration files for the various build systems supported by
+-- Kotlin. I am not sure whether the language server supports Ant projects,
+-- but I'm keeping it here as well since Ant does support Kotlin.
+local root_files = {
+ 'settings.gradle', -- Gradle (multi-project)
+ 'settings.gradle.kts', -- Gradle (multi-project)
+ 'build.xml', -- Ant
+ 'pom.xml', -- Maven
+}
+
+local fallback_root_files = {
+ 'build.gradle', -- Gradle
+ 'build.gradle.kts', -- Gradle
+}
+
+return {
+ default_config = {
+ filetypes = { 'kotlin' },
+ root_dir = function(fname)
+ return util.root_pattern(unpack(root_files))(fname) or util.root_pattern(unpack(fallback_root_files))(fname)
+ end,
+ cmd = { bin_name },
+ },
+ docs = {
+ description = [[
+ A kotlin language server which was developed for internal usage and
+ released afterwards. Maintaining is not done by the original author,
+ but by fwcd.
+
+ It is built via gradle and developed on github.
+ Source and additional description:
+ https://github.com/fwcd/kotlin-language-server
+
+ This server requires vim to be aware of the kotlin-filetype.
+ You could refer for this capability to:
+ https://github.com/udalov/kotlin-vim (recommended)
+ Note that there is no LICENSE specified yet.
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("settings.gradle")]],
+ cmd = { 'kotlin-language-server' },
+ capabilities = [[
+ smart code completion,
+ diagnostics,
+ hover,
+ document symbols,
+ definition lookup,
+ method signature help,
+ dependency resolution,
+ additional plugins from: https://github.com/fwcd
+
+ Snipped of License (refer to source for full License):
+
+ The MIT License (MIT)
+
+ Copyright (c) 2016 George Fraser
+ Copyright (c) 2018 fwcd
+
+ ]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lean3ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lean3ls.lua
new file mode 100644
index 0000000..b35a693
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lean3ls.lua
@@ -0,0 +1,54 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'lean-language-server'
+local args = { '--stdio', '--', '-M', '4096', '-T', '100000' }
+local cmd = { bin_name, unpack(args) }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, unpack(args) }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'lean3' },
+ offset_encoding = 'utf-32',
+ root_dir = function(fname)
+ fname = util.path.sanitize(fname)
+ -- check if inside elan stdlib
+ local stdlib_dir
+ do
+ local _, endpos = fname:find '/lean/library'
+ if endpos then
+ stdlib_dir = fname:sub(1, endpos)
+ end
+ end
+
+ return util.root_pattern 'leanpkg.toml'(fname)
+ or util.root_pattern 'leanpkg.path'(fname)
+ or stdlib_dir
+ or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/leanprover/lean-client-js/tree/master/lean-language-server
+
+Lean installation instructions can be found
+[here](https://leanprover-community.github.io/get_started.html#regular-install).
+
+Once Lean is installed, you can install the Lean 3 language server by running
+```sh
+npm install -g lean-language-server
+```
+
+Note: that if you're using [lean.nvim](https://github.com/Julian/lean.nvim),
+that plugin fully handles the setup of the Lean language server,
+and you shouldn't set up `lean3ls` both with it and `lspconfig`.
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("leanpkg.toml") or root_pattern(".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/leanls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/leanls.lua
new file mode 100644
index 0000000..208598a
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/leanls.lua
@@ -0,0 +1,77 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'lake', 'serve', '--' },
+ filetypes = { 'lean' },
+ root_dir = function(fname)
+ -- check if inside elan stdlib
+ fname = util.path.sanitize(fname)
+ local stdlib_dir
+ do
+ local _, endpos = fname:find '/src/lean'
+ if endpos then
+ stdlib_dir = fname:sub(1, endpos)
+ end
+ end
+ if not stdlib_dir then
+ local _, endpos = fname:find '/lib/lean'
+ if endpos then
+ stdlib_dir = fname:sub(1, endpos)
+ end
+ end
+
+ return util.root_pattern('lakefile.lean', 'lean-toolchain', 'leanpkg.toml')(fname)
+ or stdlib_dir
+ or util.find_git_ancestor(fname)
+ end,
+ options = {
+ -- Only Lake 3.0+ supports lake serve, so for old enough Lean 4,
+ -- or core Lean itself, this command (typically using the in-built
+ -- Lean 4 language server) will be used instead.
+ no_lake_lsp_cmd = { 'lean', '--server' },
+ },
+ on_new_config = function(config, root_dir)
+ local use_lake_serve = false
+ if util.path.exists(util.path.join(root_dir, 'lakefile.lean')) then
+ local lake_version = ''
+ local lake_job = vim.fn.jobstart({ 'lake', '--version' }, {
+ on_stdout = function(_, d, _)
+ lake_version = table.concat(d, '\n')
+ end,
+ stdout_buffered = true,
+ })
+ if lake_job > 0 and vim.fn.jobwait({ lake_job })[1] == 0 then
+ local major = lake_version:match 'Lake version (%d).'
+ if major and tonumber(major) >= 3 then
+ use_lake_serve = true
+ end
+ end
+ end
+ if not use_lake_serve then
+ config.cmd = config.options.no_lake_lsp_cmd
+ end
+ -- add root dir as command-line argument for `ps aux`
+ table.insert(config.cmd, root_dir)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/leanprover/lean4
+
+Lean installation instructions can be found
+[here](https://leanprover-community.github.io/get_started.html#regular-install).
+
+The Lean 4 language server is built-in with a Lean 4 install
+(and can be manually run with, e.g., `lean --server`).
+
+Note: that if you're using [lean.nvim](https://github.com/Julian/lean.nvim),
+that plugin fully handles the setup of the Lean language server,
+and you shouldn't set up `leanls` both with it and `lspconfig`.
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("lakefile.lean", "lean-toolchain", "leanpkg.toml", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lelwel_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lelwel_ls.lua
new file mode 100644
index 0000000..ac8c456
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lelwel_ls.lua
@@ -0,0 +1,21 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'lelwel-ls' },
+ filetypes = { 'llw' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ description = [[
+https://github.com/0x2a-42/lelwel
+
+Language server for lelwel grammars.
+
+You can install `lelwel-ls` via cargo:
+```sh
+cargo install --features="lsp" lelwel
+```
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lemminx.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lemminx.lua
new file mode 100644
index 0000000..5bcf1cf
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/lemminx.lua
@@ -0,0 +1,23 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'lemminx' },
+ filetypes = { 'xml', 'xsd', 'xsl', 'xslt', 'svg' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/eclipse/lemminx
+
+The easiest way to install the server is to get a binary at https://download.jboss.org/jbosstools/vscode/stable/lemminx-binary/ and place it in your PATH.
+
+NOTE to macOS users: Binaries from unidentified developers are blocked by default. If you trust the downloaded binary from jboss.org, run it once, cancel the prompt, then remove the binary from Gatekeeper quarantine with `xattr -d com.apple.quarantine lemminx`. It should now run without being blocked.
+
+]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ltex.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ltex.lua
new file mode 100644
index 0000000..0aeb387
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ltex.lua
@@ -0,0 +1,47 @@
+local util = require 'lspconfig.util'
+
+local language_id_mapping = {
+ bib = 'bibtex',
+ plaintex = 'tex',
+ rnoweb = 'sweave',
+ rst = 'restructuredtext',
+ tex = 'latex',
+ xhtml = 'xhtml',
+}
+
+local bin_name = 'ltex-ls'
+if vim.fn.has 'win32' == 1 then
+ bin_name = bin_name .. '.bat'
+end
+
+return {
+ default_config = {
+ cmd = { bin_name },
+ filetypes = { 'bib', 'gitcommit', 'markdown', 'org', 'plaintex', 'rst', 'rnoweb', 'tex' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ get_language_id = function(_, filetype)
+ local language_id = language_id_mapping[filetype]
+ if language_id then
+ return language_id
+ else
+ return filetype
+ end
+ end,
+ },
+ docs = {
+ description = [=[
+https://github.com/valentjn/ltex-ls
+
+LTeX Language Server: LSP language server for LanguageTool 🔍✔️ with support for LaTeX 🎓, Markdown 📝, and others
+
+To install, download the latest [release](https://github.com/valentjn/ltex-ls/releases) and ensure `ltex-ls` is on your path.
+
+To support org files or R sweave, users can define a custom filetype autocommand (or use a plugin which defines these filetypes):
+
+```lua
+vim.cmd [[ autocmd BufRead,BufNewFile *.org set filetype=org ]]
+```
+]=],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/metals.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/metals.lua
new file mode 100644
index 0000000..b05db5c
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/metals.lua
@@ -0,0 +1,45 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'metals' },
+ filetypes = { 'scala' },
+ root_dir = util.root_pattern('build.sbt', 'build.sc', 'build.gradle', 'pom.xml'),
+ message_level = vim.lsp.protocol.MessageType.Log,
+ init_options = {
+ statusBarProvider = 'show-message',
+ isHttpEnabled = true,
+ compilerOptions = {
+ snippetAutoIndent = false,
+ },
+ },
+ },
+ docs = {
+ description = [[
+https://scalameta.org/metals/
+
+Scala language server with rich IDE features.
+
+See full instructions in the Metals documentation:
+
+https://scalameta.org/metals/docs/editors/vim.html#using-an-alternative-lsp-client
+
+Note: that if you're using [nvim-metals](https://github.com/scalameta/nvim-metals), that plugin fully handles the setup and installation of Metals, and you shouldn't set up Metals both with it and `lspconfig`.
+
+To install Metals, make sure to have [coursier](https://get-coursier.io/docs/cli-installation) installed, and once you do you can install the latest Metals with `cs install metals`. You can also manually bootstrap Metals with the following command.
+
+```bash
+cs bootstrap \
+ --java-opt -Xss4m \
+ --java-opt -Xms100m \
+ org.scalameta:metals_2.12:<enter-version-here> \
+ -r bintray:scalacenter/releases \
+ -r sonatype:snapshots \
+ -o /usr/local/bin/metals -f
+```
+]],
+ default_config = {
+ root_dir = [[util.root_pattern("build.sbt", "build.sc", "build.gradle", "pom.xml")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/mint.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/mint.lua
new file mode 100644
index 0000000..7fde1c4
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/mint.lua
@@ -0,0 +1,20 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'mint', 'ls' },
+ filetypes = { 'mint' },
+ root_dir = function(fname)
+ return util.root_pattern 'mint.json'(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://www.mint-lang.com
+
+Install Mint using the [instructions](https://www.mint-lang.com/install).
+The language server is included since version 0.12.0.
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/mm0_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/mm0_ls.lua
new file mode 100644
index 0000000..513bbeb
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/mm0_ls.lua
@@ -0,0 +1,20 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'mm0-rs', 'server' },
+ root_dir = util.find_git_ancestor,
+ filetypes = { 'metamath-zero' },
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/digama0/mm0
+
+Language Server for the metamath-zero theorem prover.
+
+Requires [mm0-rs](https://github.com/digama0/mm0/tree/master/mm0-rs) to be installed
+and available on the `PATH`.
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/nickel_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/nickel_ls.lua
new file mode 100644
index 0000000..3a9387e
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/nickel_ls.lua
@@ -0,0 +1,37 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'nls' },
+ filetypes = { 'ncl', 'nickel' },
+ root_dir = util.find_git_ancestor,
+ },
+
+ docs = {
+ description = [[
+Nickel Language Server
+
+https://github.com/tweag/nickel
+
+`nls` can be installed with nix, or cargo, from the Nickel repository.
+```sh
+git clone https://github.com/tweag/nickel.git
+```
+
+Nix:
+```sh
+cd nickel
+nix-env -f . -i
+```
+
+cargo:
+```sh
+cd nickel/lsp/nls
+cargo install --path .
+```
+
+In order to have lspconfig detect Nickel filetypes (a prequisite for autostarting a server),
+install the [Nickel vim plugin](https://github.com/nickel-lang/vim-nickel).
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/nimls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/nimls.lua
new file mode 100644
index 0000000..f10b002
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/nimls.lua
@@ -0,0 +1,21 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'nimlsp' },
+ filetypes = { 'nim' },
+ root_dir = function(fname)
+ return util.root_pattern '*.nimble'(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/PMunch/nimlsp
+`nimlsp` can be installed via the `nimble` package manager:
+```sh
+nimble install nimlsp
+```
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ocamlls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ocamlls.lua
new file mode 100644
index 0000000..fcc25db
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ocamlls.lua
@@ -0,0 +1,28 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'ocaml-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'ocaml', 'reason' },
+ root_dir = util.root_pattern('*.opam', 'esy.json', 'package.json'),
+ },
+ docs = {
+ description = [[
+https://github.com/ocaml-lsp/ocaml-language-server
+
+`ocaml-language-server` can be installed via `npm`
+```sh
+npm install -g ocaml-language-server
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("*.opam", "esy.json", "package.json")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ocamllsp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ocamllsp.lua
new file mode 100644
index 0000000..1528471
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ocamllsp.lua
@@ -0,0 +1,38 @@
+local util = require 'lspconfig.util'
+
+local language_id_of = {
+ menhir = 'ocaml.menhir',
+ ocaml = 'ocaml',
+ ocamlinterface = 'ocaml.interface',
+ ocamllex = 'ocaml.ocamllex',
+ reason = 'reason',
+}
+
+local get_language_id = function(_, ftype)
+ return language_id_of[ftype]
+end
+
+return {
+ default_config = {
+ cmd = { 'ocamllsp' },
+ filetypes = { 'ocaml', 'ocaml.menhir', 'ocaml.interface', 'ocaml.ocamllex', 'reason' },
+ root_dir = util.root_pattern('*.opam', 'esy.json', 'package.json', '.git'),
+ get_language_id = get_language_id,
+ },
+ docs = {
+ description = [[
+https://github.com/ocaml/ocaml-lsp
+
+`ocaml-lsp` can be installed as described in [installation guide](https://github.com/ocaml/ocaml-lsp#installation).
+
+To install the lsp server in a particular opam switch:
+```sh
+opam pin add ocaml-lsp-server https://github.com/ocaml/ocaml-lsp.git
+opam install ocaml-lsp-server
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("*.opam", "esy.json", "package.json", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ols.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ols.lua
new file mode 100644
index 0000000..65dd085
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/ols.lua
@@ -0,0 +1,20 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'ols' },
+ filetypes = { 'odin' },
+ root_dir = util.root_pattern('ols.json', '.git'),
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+ https://github.com/DanielGavin/ols
+
+ `Odin Language Server`.
+ ]],
+ default_config = {
+ root_dir = [[util.root_pattern("ols.json", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/omnisharp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/omnisharp.lua
new file mode 100644
index 0000000..b51d898
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/omnisharp.lua
@@ -0,0 +1,52 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ filetypes = { 'cs', 'vb' },
+ root_dir = function(fname)
+ return util.root_pattern '*.sln'(fname) or util.root_pattern '*.csproj'(fname)
+ end,
+ on_new_config = function(new_config, new_root_dir)
+ if new_root_dir then
+ table.insert(new_config.cmd, '-s')
+ table.insert(new_config.cmd, new_root_dir)
+ end
+ end,
+ init_options = {},
+ },
+ -- on_new_config = function(new_config) end;
+ -- on_attach = function(client, bufnr) end;
+ docs = {
+ description = [[
+https://github.com/omnisharp/omnisharp-roslyn
+OmniSharp server based on Roslyn workspaces
+
+`omnisharp-roslyn` can be installed by downloading and extracting a release from [here](https://github.com/OmniSharp/omnisharp-roslyn/releases).
+Omnisharp can also be built from source by following the instructions [here](https://github.com/omnisharp/omnisharp-roslyn#downloading-omnisharp).
+
+Omnisharp requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed.
+
+**By default, omnisharp-roslyn doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary.
+
+```lua
+local pid = vim.fn.getpid()
+-- On linux/darwin if using a release build, otherwise under scripts/OmniSharp(.Core)(.cmd)
+local omnisharp_bin = "/path/to/omnisharp-repo/run"
+-- on Windows
+-- local omnisharp_bin = "/path/to/omnisharp/OmniSharp.exe"
+require'lspconfig'.omnisharp.setup{
+ cmd = { omnisharp_bin, "--languageserver" , "--hostPID", tostring(pid) };
+ ...
+}
+```
+
+Note, if you download the executable for darwin you will need to strip the quarantine label to run:
+```bash
+find /path/to/omnisharp-osx | xargs xattr -r -d com.apple.quarantine
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern(".sln") or root_pattern(".csproj")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/opencl_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/opencl_ls.lua
new file mode 100644
index 0000000..dc88d24
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/opencl_ls.lua
@@ -0,0 +1,21 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'opencl-language-server' },
+ filetypes = { 'opencl' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ description = [[
+https://github.com/Galarius/opencl-language-server
+
+Build instructions can be found [here](https://github.com/Galarius/opencl-language-server/blob/main/_dev/build.md).
+
+Prebuilt binaries are available for Linux, macOS and Windows [here](https://github.com/Galarius/opencl-language-server/releases).
+]],
+ default_config = {
+ root_dir = [[util.root_pattern(".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/openscad_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/openscad_ls.lua
new file mode 100644
index 0000000..e5ca9ca
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/openscad_ls.lua
@@ -0,0 +1,32 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'openscad-language-server' },
+ filetypes = { 'openscad' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [=[
+https://github.com/dzhu/openscad-language-server
+
+A Language Server Protocol server for OpenSCAD
+
+You can build and install `openscad-language-server` binary with `cargo`:
+```sh
+cargo install openscad-language-server
+```
+
+Vim does not have built-in syntax for the `openscad` filetype currently.
+
+This can be added via an autocmd:
+
+```lua
+vim.cmd [[ autocmd BufRead,BufNewFile *.scad set filetype=openscad ]]
+```
+
+or by installing a filetype plugin such as https://github.com/sirtaj/vim-openscad
+]=],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pasls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pasls.lua
new file mode 100644
index 0000000..5758c82
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pasls.lua
@@ -0,0 +1,28 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'pasls' },
+ filetypes = { 'pascal' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/genericptr/pascal-language-server
+
+An LSP server implementation for Pascal variants that are supported by Free Pascal, including Object Pascal. It uses CodeTools from Lazarus as backend.
+
+First set `cmd` to the Pascal lsp binary.
+
+Customization options are passed to pasls as environment variables for example in your `.bashrc`:
+```bash
+export FPCDIR='/usr/lib/fpc/src' # FPC source directory (This is the only required option for the server to work).
+export PP='/usr/lib/fpc/3.2.2/ppcx64' # Path to the Free Pascal compiler executable.
+export LAZARUSDIR='/usr/lib/lazarus' # Path to the Lazarus sources.
+export FPCTARGET='' # Target operating system for cross compiling.
+export FPCTARGETCPU='x86_64' # Target CPU for cross compiling.
+```
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlls.lua
new file mode 100644
index 0000000..5d241a5
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlls.lua
@@ -0,0 +1,39 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = {
+ 'perl',
+ '-MPerl::LanguageServer',
+ '-e',
+ 'Perl::LanguageServer::run',
+ '--',
+ '--port 13603',
+ '--nostdio 0',
+ '--version 2.1.0',
+ },
+ settings = {
+ perl = {
+ perlCmd = 'perl',
+ perlInc = ' ',
+ fileFilter = { '.pm', '.pl' },
+ ignoreDirs = '.git',
+ },
+ },
+ filetypes = { 'perl' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/richterger/Perl-LanguageServer/tree/master/clients/vscode/perl
+
+`Perl-LanguageServer`, a language server for Perl.
+
+To use the language server, ensure that you have Perl::LanguageServer installed and perl command is on your path.
+]],
+ default_config = {
+ root_dir = "vim's starting directory",
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlnavigator.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlnavigator.lua
new file mode 100644
index 0000000..7ba3895
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlnavigator.lua
@@ -0,0 +1,39 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = {},
+ filetypes = { 'perl' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/bscan/PerlNavigator
+
+A Perl language server
+
+**By default, perlnavigator doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path.
+You have to install the language server manually.
+
+Clone the PerlNavigator repo, install based on the [instructions](https://github.com/bscan/PerlNavigator#installation-for-other-editors),
+and point `cmd` to `server.js` inside the `server/out` directory:
+
+```lua
+cmd = {'node', '<path_to_repo>/server/out/server.js', '--stdio'}
+```
+
+At minimum, you will need `perl` in your path. If you want to use a non-standard `perl` you will need to set your configuration like so:
+```lua
+settings = {
+ perlnavigator = {
+ perlPath = '/some/odd/location/my-perl'
+ }
+}
+```
+
+The `contributes.configuration.properties` section of `perlnavigator`'s `package.json` has all available configuration settings. All
+settings have a reasonable default, but, at minimum, you may want to point `perlnavigator` at your `perltidy` and `perlcritic` configurations.
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlpls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlpls.lua
new file mode 100644
index 0000000..3326028
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/perlpls.lua
@@ -0,0 +1,29 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'pls' },
+ settings = {
+ perl = {
+ perlcritic = { enabled = false },
+ syntax = { enabled = true },
+ },
+ },
+ filetypes = { 'perl' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/FractalBoy/perl-language-server
+https://metacpan.org/pod/PLS
+
+`PLS`, another language server for Perl.
+
+To use the language server, ensure that you have PLS installed and that it is in your path
+]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/phpactor.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/phpactor.lua
new file mode 100644
index 0000000..5a1f0d1
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/phpactor.lua
@@ -0,0 +1,26 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'phpactor', 'language-server' },
+ filetypes = { 'php' },
+ root_dir = function(pattern)
+ local cwd = vim.loop.cwd()
+ local root = util.root_pattern('composer.json', '.git')(pattern)
+
+ -- prefer cwd if root is a descendant
+ return util.path.is_descendant(cwd, root) and cwd or root
+ end,
+ },
+ docs = {
+ description = [[
+https://github.com/phpactor/phpactor
+
+Installation: https://phpactor.readthedocs.io/en/master/usage/standalone.html#global-installation
+]],
+ default_config = {
+ cmd = { 'phpactor', 'language-server' },
+ root_dir = [[root_pattern("composer.json", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/please.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/please.lua
new file mode 100644
index 0000000..085d1e7
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/please.lua
@@ -0,0 +1,19 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'plz', 'tool', 'lps' },
+ filetypes = { 'bzl' },
+ root_dir = util.root_pattern '.plzconfig',
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/thought-machine/please
+
+High-performance extensible build system for reproducible multi-language builds.
+
+The `plz` binary will automatically install the LSP for you on first run
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/powershell_es.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/powershell_es.lua
new file mode 100644
index 0000000..ac723f4
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/powershell_es.lua
@@ -0,0 +1,72 @@
+local util = require 'lspconfig.util'
+
+local temp_path = vim.fn.stdpath 'cache'
+
+local function make_cmd(new_config)
+ if new_config.bundle_path ~= nil then
+ local command_fmt =
+ [[%s/PowerShellEditorServices/Start-EditorServices.ps1 -BundledModulesPath %s -LogPath %s/powershell_es.log -SessionDetailsPath %s/powershell_es.session.json -FeatureFlags @() -AdditionalModules @() -HostName nvim -HostProfileId 0 -HostVersion 1.0.0 -Stdio -LogLevel Normal]]
+ local command = command_fmt:format(new_config.bundle_path, new_config.bundle_path, temp_path, temp_path)
+ return { new_config.shell, '-NoLogo', '-NoProfile', '-Command', command }
+ end
+end
+
+return {
+ default_config = {
+ shell = 'pwsh',
+ on_new_config = function(new_config, _)
+ -- Don't overwrite cmd if already set
+ if not new_config.cmd then
+ new_config.cmd = make_cmd(new_config)
+ end
+ end,
+
+ filetypes = { 'ps1' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/PowerShell/PowerShellEditorServices
+
+Language server for PowerShell.
+
+To install, download and extract PowerShellEditorServices.zip
+from the [releases](https://github.com/PowerShell/PowerShellEditorServices/releases).
+To configure the language server, set the property `bundle_path` to the root
+of the extracted PowerShellEditorServices.zip.
+
+The default configuration doesn't set `cmd` unless `bundle_path` is specified.
+
+```lua
+require'lspconfig'.powershell_es.setup{
+ bundle_path = 'c:/w/PowerShellEditorServices',
+}
+```
+
+By default the languageserver is started in `pwsh` (PowerShell Core). This can be changed by specifying `shell`.
+
+```lua
+require'lspconfig'.powershell_es.setup{
+ bundle_path = 'c:/w/PowerShellEditorServices',
+ shell = 'powershell.exe',
+}
+```
+
+Note that the execution policy needs to be set to `Unrestricted` for the languageserver run under PowerShell
+
+If necessary, specific `cmd` can be defined instead of `bundle_path`.
+See [PowerShellEditorServices](https://github.com/PowerShell/PowerShellEditorServices#stdio)
+to learn more.
+
+```lua
+require'lspconfig'.powershell_es.setup{
+ cmd = {'pwsh', '-NoLogo', '-NoProfile', '-Command', "c:/PSES/Start-EditorServices.ps1 ..."}
+}
+```
+]],
+ default_config = {
+ root_dir = 'git root or current directory',
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/prismals.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/prismals.lua
new file mode 100644
index 0000000..f330e25
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/prismals.lua
@@ -0,0 +1,34 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'prisma-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'prisma' },
+ settings = {
+ prisma = {
+ prismaFmtBinPath = '',
+ },
+ },
+ root_dir = util.root_pattern('.git', 'package.json'),
+ },
+ docs = {
+ description = [[
+Language Server for the Prisma JavaScript and TypeScript ORM
+
+`@prisma/language-server` can be installed via npm
+```sh
+npm install -g @prisma/language-server
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern(".git", "package.json")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/prosemd_lsp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/prosemd_lsp.lua
new file mode 100644
index 0000000..048e4b4
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/prosemd_lsp.lua
@@ -0,0 +1,22 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'prosemd-lsp', '--stdio' },
+ filetypes = { 'markdown' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/kitten/prosemd-lsp
+
+An experimental LSP for Markdown.
+
+Please see the manual installation instructions: https://github.com/kitten/prosemd-lsp#manual-installation
+]],
+ default_config = {
+ root_dir = util.find_git_ancestor,
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/psalm.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/psalm.lua
new file mode 100644
index 0000000..01f7581
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/psalm.lua
@@ -0,0 +1,29 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'psalm-language-server'
+
+if vim.fn.has 'win32' == 1 then
+ bin_name = bin_name .. '.bat'
+end
+
+return {
+ default_config = {
+ cmd = { bin_name },
+ filetypes = { 'php' },
+ root_dir = util.root_pattern('psalm.xml', 'psalm.xml.dist'),
+ },
+ docs = {
+ description = [[
+https://github.com/vimeo/psalm
+
+Can be installed with composer.
+```sh
+composer global require vimeo/psalm
+```
+]],
+ default_config = {
+ cmd = { 'psalm-language-server' },
+ root_dir = [[root_pattern("psalm.xml", "psalm.xml.dist")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/puppet.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/puppet.lua
new file mode 100644
index 0000000..18a1532
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/puppet.lua
@@ -0,0 +1,38 @@
+local util = require 'lspconfig.util'
+
+local root_files = {
+ 'manifests',
+ '.puppet-lint.rc',
+ 'hiera.yaml',
+ '.git',
+}
+
+return {
+ default_config = {
+ cmd = { 'puppet-languageserver', '--stdio' },
+ filetypes = { 'puppet' },
+ root_dir = util.root_pattern(unpack(root_files)),
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+LSP server for Puppet.
+
+Installation:
+
+- Clone the editor-services repository:
+ https://github.com/puppetlabs/puppet-editor-services
+
+- Navigate into that directory and run: `bundle install`
+
+- Install the 'puppet-lint' gem: `gem install puppet-lint`
+
+- Add that repository to $PATH.
+
+- Ensure you can run `puppet-languageserver` from outside the editor-services directory.
+]],
+ default_config = {
+ root_dir = [[root_pattern("manifests", ".puppet-lint.rc", "hiera.yaml", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/purescriptls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/purescriptls.lua
new file mode 100644
index 0000000..495133d
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/purescriptls.lua
@@ -0,0 +1,28 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'purescript-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'purescript' },
+ root_dir = util.root_pattern('bower.json', 'psc-package.json', 'spago.dhall'),
+ },
+ docs = {
+ description = [[
+https://github.com/nwolverson/purescript-language-server
+`purescript-language-server` can be installed via `npm`
+```sh
+npm install -g purescript-language-server
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("spago.dhall, 'psc-package.json', bower.json")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pylsp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pylsp.lua
new file mode 100644
index 0000000..7284fac
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pylsp.lua
@@ -0,0 +1,31 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'pylsp' },
+ filetypes = { 'python' },
+ root_dir = function(fname)
+ local root_files = {
+ 'pyproject.toml',
+ 'setup.py',
+ 'setup.cfg',
+ 'requirements.txt',
+ 'Pipfile',
+ }
+ return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/python-lsp/python-lsp-server
+
+A Python 3.6+ implementation of the Language Server Protocol.
+
+The language server can be installed via `pipx install 'python-lsp-server[all]'`.
+Further instructions can be found in the [project's README](https://github.com/python-lsp/python-lsp-server).
+
+Note: This is a community fork of `pyls`.
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pyre.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pyre.lua
new file mode 100644
index 0000000..5c2f8fb
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pyre.lua
@@ -0,0 +1,22 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'pyre', 'persistent' },
+ filetypes = { 'python' },
+ root_dir = util.root_pattern '.pyre_configuration',
+ },
+ docs = {
+ description = [[
+https://pyre-check.org/
+
+`pyre` a static type checker for Python 3.
+
+`pyre` offers an extremely limited featureset. It currently only supports diagnostics,
+which are triggered on save.
+
+Do not report issues for missing features in `pyre` to `lspconfig`.
+
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pyright.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pyright.lua
new file mode 100644
index 0000000..a198477
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/pyright.lua
@@ -0,0 +1,56 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'pyright-langserver'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+local root_files = {
+ 'pyproject.toml',
+ 'setup.py',
+ 'setup.cfg',
+ 'requirements.txt',
+ 'Pipfile',
+ 'pyrightconfig.json',
+}
+
+local function organize_imports()
+ local params = {
+ command = 'pyright.organizeimports',
+ arguments = { vim.uri_from_bufnr(0) },
+ }
+ vim.lsp.buf.execute_command(params)
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'python' },
+ root_dir = util.root_pattern(unpack(root_files)),
+ single_file_support = true,
+ settings = {
+ python = {
+ analysis = {
+ autoSearchPaths = true,
+ useLibraryCodeForTypes = true,
+ diagnosticMode = 'workspace',
+ },
+ },
+ },
+ },
+ commands = {
+ PyrightOrganizeImports = {
+ organize_imports,
+ description = 'Organize Imports',
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/microsoft/pyright
+
+`pyright`, a static type checker and language server for python
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/quick_lint_js.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/quick_lint_js.lua
new file mode 100644
index 0000000..29daa96
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/quick_lint_js.lua
@@ -0,0 +1,19 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'quick-lint-js', '--lsp-server' },
+ filetypes = { 'javascript' },
+ root_dir = util.root_pattern('package.json', 'jsconfig.json', '.git'),
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://quick-lint-js.com/
+
+quick-lint-js finds bugs in JavaScript programs.
+
+See installation [instructions](https://quick-lint-js.com/install/)
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/r_language_server.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/r_language_server.lua
new file mode 100644
index 0000000..7e1e3f3
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/r_language_server.lua
@@ -0,0 +1,28 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'R', '--slave', '-e', 'languageserver::run()' },
+ filetypes = { 'r', 'rmd' },
+ root_dir = function(fname)
+ return util.find_git_ancestor(fname) or vim.loop.os_homedir()
+ end,
+ log_level = vim.lsp.protocol.MessageType.Warning,
+ },
+ docs = {
+ description = [[
+[languageserver](https://github.com/REditorSupport/languageserver) is an
+implementation of the Microsoft's Language Server Protocol for the R
+language.
+
+It is released on CRAN and can be easily installed by
+
+```R
+install.packages("languageserver")
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern(".git") or os_homedir]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/racket_langserver.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/racket_langserver.lua
new file mode 100644
index 0000000..25bd0ab
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/racket_langserver.lua
@@ -0,0 +1,21 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'racket', '--lib', 'racket-langserver' },
+ filetypes = { 'racket', 'scheme' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+[https://github.com/jeapostrophe/racket-langserver](https://github.com/jeapostrophe/racket-langserver)
+
+The Racket language server. This project seeks to use
+[DrRacket](https://github.com/racket/drracket)'s public API to provide
+functionality that mimics DrRacket's code tools as closely as possible.
+
+Install via `raco`: `raco pkg install racket-langserver`
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/reason_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/reason_ls.lua
new file mode 100644
index 0000000..45e7d0b
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/reason_ls.lua
@@ -0,0 +1,23 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'reason-language-server' },
+ filetypes = { 'reason' },
+ root_dir = util.root_pattern('bsconfig.json', '.git'),
+ },
+ docs = {
+ description = [[
+Reason language server
+
+**By default, reason_ls doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path.
+You have to install the language server manually.
+
+You can install reason language server from [reason-language-server](https://github.com/jaredly/reason-language-server) repository.
+
+```lua
+cmd = {'<path_to_reason_language_server>'}
+```
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/remark_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/remark_ls.lua
new file mode 100644
index 0000000..4ef3717
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/remark_ls.lua
@@ -0,0 +1,50 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'remark-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'markdown' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/remarkjs/remark-language-server
+
+`remark-language-server` can be installed via `npm`:
+```sh
+npm install -g remark-language-server
+```
+
+`remark-language-server` uses the same
+[configuration files](https://github.com/remarkjs/remark/tree/main/packages/remark-cli#example-config-files-json-yaml-js)
+as `remark-cli`.
+
+This uses a plugin based system. Each plugin needs to be installed locally using `npm` or `yarn`.
+
+For example, given the following `.remarkrc.json`:
+
+```json
+{
+ "presets": [
+ "remark-preset-lint-recommended"
+ ]
+}
+```
+
+`remark-preset-lint-recommended` needs to be installed in the local project:
+
+```sh
+npm install remark-preset-lint-recommended
+```
+
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rescriptls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rescriptls.lua
new file mode 100644
index 0000000..1c80ada
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rescriptls.lua
@@ -0,0 +1,42 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = {},
+ filetypes = { 'rescript' },
+ root_dir = util.root_pattern('bsconfig.json', '.git'),
+ settings = {},
+ },
+ docs = {
+ description = [[
+https://github.com/rescript-lang/rescript-vscode
+
+ReScript language server
+
+**By default, rescriptls doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path.
+You have to install the language server manually.
+
+You can use the bundled language server inside the [vim-rescript](https://github.com/rescript-lang/vim-rescript) repo.
+
+Clone the vim-rescript repo and point `cmd` to `server.js` inside `server/out` directory:
+
+```lua
+cmd = {'node', '<path_to_repo>/server/out/server.js', '--stdio'}
+
+```
+
+If you have vim-rescript installed you can also use that installation. for example if you're using packer.nvim you can set cmd to something like this:
+
+```lua
+cmd = {
+ 'node',
+ '/home/username/.local/share/nvim/site/pack/packer/start/vim-rescript/server/out/server.js',
+ '--stdio'
+}
+```
+
+Another option is to use vscode extension [release](https://github.com/rescript-lang/rescript-vscode/releases).
+Take a look at [here](https://github.com/rescript-lang/rescript-vscode#use-with-other-editors) for instructions.
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rls.lua
new file mode 100644
index 0000000..363b81d
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rls.lua
@@ -0,0 +1,42 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'rls' },
+ filetypes = { 'rust' },
+ root_dir = util.root_pattern 'Cargo.toml',
+ },
+ docs = {
+ description = [[
+https://github.com/rust-lang/rls
+
+rls, a language server for Rust
+
+See https://github.com/rust-lang/rls#setup to setup rls itself.
+See https://github.com/rust-lang/rls#configuration for rls-specific settings.
+All settings listed on the rls configuration section of the readme
+must be set under settings.rust as follows:
+
+```lua
+nvim_lsp.rls.setup {
+ settings = {
+ rust = {
+ unstable_features = true,
+ build_on_save = false,
+ all_features = true,
+ },
+ },
+}
+```
+
+If you want to use rls for a particular build, eg nightly, set cmd as follows:
+
+```lua
+cmd = {"rustup", "run", "nightly", "rls"}
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("Cargo.toml")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rnix.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rnix.lua
new file mode 100644
index 0000000..aa7f00e
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rnix.lua
@@ -0,0 +1,28 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'rnix-lsp' },
+ filetypes = { 'nix' },
+ root_dir = function(fname)
+ return util.find_git_ancestor(fname) or vim.loop.os_homedir()
+ end,
+ settings = {},
+ init_options = {},
+ },
+ docs = {
+ description = [[
+https://github.com/nix-community/rnix-lsp
+
+A language server for Nix providing basic completion and formatting via nixpkgs-fmt.
+
+To install manually, run `cargo install rnix-lsp`. If you are using nix, rnix-lsp is in nixpkgs.
+
+This server accepts configuration via the `settings` key.
+
+ ]],
+ default_config = {
+ root_dir = "vim's starting directory",
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/robotframework_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/robotframework_ls.lua
new file mode 100644
index 0000000..7cb772b
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/robotframework_ls.lua
@@ -0,0 +1,21 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'robotframework_ls' },
+ filetypes = { 'robot' },
+ root_dir = function(fname)
+ return util.root_pattern('robotidy.toml', 'pyproject.toml')(fname) or util.find_git_ancestor(fname)
+ end,
+ },
+ docs = {
+ description = [[
+https://github.com/robocorp/robotframework-lsp
+
+Language Server Protocol implementation for Robot Framework.
+]],
+ default_config = {
+ root_dir = "util.root_pattern('robotidy.toml', 'pyproject.toml')(fname) or util.find_git_ancestor(fname)",
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rome.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rome.lua
new file mode 100644
index 0000000..075d31a
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rome.lua
@@ -0,0 +1,42 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'rome'
+local cmd = { bin_name, 'lsp' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, 'lsp' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = {
+ 'javascript',
+ 'javascriptreact',
+ 'json',
+ 'typescript',
+ 'typescript.tsx',
+ 'typescriptreact',
+ },
+ root_dir = function(fname)
+ return util.find_package_json_ancestor(fname)
+ or util.find_node_modules_ancestor(fname)
+ or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://rome.tools
+
+Language server for the Rome Frontend Toolchain.
+
+```sh
+npm install [-g] rome
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern('package.json', 'node_modules', '.git')]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rust_analyzer.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rust_analyzer.lua
new file mode 100644
index 0000000..6331cf5
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/rust_analyzer.lua
@@ -0,0 +1,79 @@
+local util = require 'lspconfig.util'
+
+local function reload_workspace(bufnr)
+ bufnr = util.validate_bufnr(bufnr)
+ vim.lsp.buf_request(bufnr, 'rust-analyzer/reloadWorkspace', nil, function(err)
+ if err then
+ error(tostring(err))
+ end
+ vim.notify 'Cargo workspace reloaded'
+ end)
+end
+
+return {
+ default_config = {
+ cmd = { 'rust-analyzer' },
+ filetypes = { 'rust' },
+ root_dir = function(fname)
+ local cargo_crate_dir = util.root_pattern 'Cargo.toml'(fname)
+ local cmd = { 'cargo', 'metadata', '--no-deps', '--format-version', '1' }
+ if cargo_crate_dir ~= nil then
+ cmd[#cmd + 1] = '--manifest-path'
+ cmd[#cmd + 1] = util.path.join(cargo_crate_dir, 'Cargo.toml')
+ end
+ local cargo_metadata = ''
+ local cargo_metadata_err = ''
+ local cm = vim.fn.jobstart(cmd, {
+ on_stdout = function(_, d, _)
+ cargo_metadata = table.concat(d, '\n')
+ end,
+ on_stderr = function(_, d, _)
+ cargo_metadata_err = table.concat(d, '\n')
+ end,
+ stdout_buffered = true,
+ stderr_buffered = true,
+ })
+ if cm > 0 then
+ cm = vim.fn.jobwait({ cm })[1]
+ else
+ cm = -1
+ end
+ local cargo_workspace_dir = nil
+ if cm == 0 then
+ cargo_workspace_dir = vim.fn.json_decode(cargo_metadata)['workspace_root']
+ else
+ vim.notify(
+ string.format('[lspconfig] cmd (%q) failed:\n%s', table.concat(cmd, ' '), cargo_metadata_err),
+ vim.log.levels.WARN
+ )
+ end
+ return cargo_workspace_dir
+ or cargo_crate_dir
+ or util.root_pattern 'rust-project.json'(fname)
+ or util.find_git_ancestor(fname)
+ end,
+ settings = {
+ ['rust-analyzer'] = {},
+ },
+ },
+ commands = {
+ CargoReload = {
+ function()
+ reload_workspace(0)
+ end,
+ description = 'Reload current cargo workspace',
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/rust-analyzer/rust-analyzer
+
+rust-analyzer (aka rls 2.0), a language server for Rust
+
+See [docs](https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/user#settings) for extra settings.
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("Cargo.toml", "rust-project.json")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/salt_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/salt_ls.lua
new file mode 100644
index 0000000..65d1d32
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/salt_ls.lua
@@ -0,0 +1,24 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'salt_lsp_server' },
+ filetypes = { 'sls' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+Language server for Salt configuration files.
+https://github.com/dcermak/salt-lsp
+
+The language server can be installed with `pip`:
+```sh
+pip install salt-lsp
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern('.git')]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/scry.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/scry.lua
new file mode 100644
index 0000000..8350a43
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/scry.lua
@@ -0,0 +1,22 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'scry' },
+ filetypes = { 'crystal' },
+ root_dir = function(fname)
+ return util.root_pattern 'shard.yml'(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/crystal-lang-tools/scry
+
+Crystal language server.
+]],
+ default_config = {
+ root_dir = [[root_pattern('shard.yml', '.git')]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/serve_d.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/serve_d.lua
new file mode 100644
index 0000000..09d1b10
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/serve_d.lua
@@ -0,0 +1,20 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'serve-d' },
+ filetypes = { 'd' },
+ root_dir = util.root_pattern('dub.json', 'dub.sdl', '.git'),
+ },
+ docs = {
+ description = [[
+ https://github.com/Pure-D/serve-d
+
+ `Microsoft language server protocol implementation for D using workspace-d.`
+ Download a binary from https://github.com/Pure-D/serve-d/releases and put it in your $PATH.
+ ]],
+ default_config = {
+ root_dir = [[util.root_pattern("dub.json", "dub.sdl", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sixtyfps.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sixtyfps.lua
new file mode 100644
index 0000000..da90fe3
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sixtyfps.lua
@@ -0,0 +1,28 @@
+return {
+ default_config = {
+ cmd = { 'sixtyfps-lsp' },
+ filetypes = { 'sixtyfps' },
+ single_file_support = true,
+ },
+ docs = {
+ description = [=[
+https://github.com/sixtyfpsui/sixtyfps
+`SixtyFPS`'s language server
+
+You can build and install `sixtyfps-lsp` binary with `cargo`:
+```sh
+cargo install sixtyfps-lsp
+```
+
+Vim does not have built-in syntax for the `sixtyfps` filetype currently.
+
+This can be added via an autocmd:
+
+```lua
+vim.cmd [[ autocmd BufRead,BufNewFile *.60 set filetype=sixtyfps ]]
+```
+
+or by installing a filetype plugin such as https://github.com/RustemB/sixtyfps-vim
+]=],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/slint_lsp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/slint_lsp.lua
new file mode 100644
index 0000000..e921cb6
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/slint_lsp.lua
@@ -0,0 +1,26 @@
+return {
+ default_config = {
+ cmd = { 'slint-lsp' },
+ filetypes = { 'slint' },
+ single_file_support = true,
+ },
+ docs = {
+ description = [=[
+https://github.com/slint-ui/slint
+`Slint`'s language server
+
+You can build and install `slint-lsp` binary with `cargo`:
+```sh
+cargo install slint-lsp
+```
+
+Vim does not have built-in syntax for the `slint` filetype at this time.
+
+This can be added via an autocmd:
+
+```lua
+vim.cmd [[ autocmd BufRead,BufNewFile *.slint set filetype=slint ]]
+```
+]=],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solang.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solang.lua
new file mode 100644
index 0000000..be1d1ec
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solang.lua
@@ -0,0 +1,27 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'solang', '--language-server', '--target', 'ewasm' },
+ filetypes = { 'solidity' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ description = [[
+A language server for Solidity
+
+See the [documentation](https://solang.readthedocs.io/en/latest/installing.html) for installation instructions.
+
+The language server only provides the following capabilities:
+* Syntax highlighting
+* Diagnostics
+* Hover
+
+There is currently no support for completion, goto definition, references, or other functionality.
+
+]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solargraph.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solargraph.lua
new file mode 100644
index 0000000..4fba400
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solargraph.lua
@@ -0,0 +1,38 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'solargraph'
+local cmd = { bin_name, 'stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, 'stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ settings = {
+ solargraph = {
+ diagnostics = true,
+ },
+ },
+ init_options = { formatting = true },
+ filetypes = { 'ruby' },
+ root_dir = util.root_pattern('Gemfile', '.git'),
+ },
+ docs = {
+ description = [[
+https://solargraph.org/
+
+solargraph, a language server for Ruby
+
+You can install solargraph via gem install.
+
+```sh
+gem install --user-install solargraph
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("Gemfile", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solc.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solc.lua
new file mode 100644
index 0000000..42e44fe
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solc.lua
@@ -0,0 +1,19 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'solc', '--lsp' },
+ filetypes = { 'solidity' },
+ root_dir = util.root_pattern '.git',
+ },
+ docs = {
+ description = [[
+https://docs.soliditylang.org/en/latest/installing-solidity.html
+
+solc is the native language server for the Solidity language.
+]],
+ default_config = {
+ root_dir = [[root_pattern(".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solidity_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solidity_ls.lua
new file mode 100644
index 0000000..4d4c490
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/solidity_ls.lua
@@ -0,0 +1,24 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'solidity-language-server'
+if vim.fn.has 'win32' == 1 then
+ bin_name = bin_name .. '.cmd'
+end
+
+return {
+ default_config = {
+ cmd = { bin_name, '--stdio' },
+ filetypes = { 'solidity' },
+ root_dir = util.root_pattern('.git', 'package.json'),
+ },
+ docs = {
+ description = [[
+npm install -g solidity-language-server
+
+solidity-language-server is a language server for the solidity language ported from the vscode solidity extension
+]],
+ default_config = {
+ root_dir = [[root_pattern(".git", "package.json")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sorbet.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sorbet.lua
new file mode 100644
index 0000000..86d3443
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sorbet.lua
@@ -0,0 +1,26 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'srb', 'tc', '--lsp' },
+ filetypes = { 'ruby' },
+ root_dir = util.root_pattern('Gemfile', '.git'),
+ },
+ docs = {
+ description = [[
+https://sorbet.org
+
+Sorbet is a fast, powerful type checker designed for Ruby.
+
+You can install Sorbet via gem install. You might also be interested in how to set
+Sorbet up for new projects: https://sorbet.org/docs/adopting.
+
+```sh
+gem install sorbet
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("Gemfile", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sourcekit.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sourcekit.lua
new file mode 100644
index 0000000..d90b30a
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sourcekit.lua
@@ -0,0 +1,19 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'sourcekit-lsp' },
+ filetypes = { 'swift', 'c', 'cpp', 'objective-c', 'objective-cpp' },
+ root_dir = util.root_pattern('Package.swift', '.git'),
+ },
+ docs = {
+ description = [[
+https://github.com/apple/sourcekit-lsp
+
+Language server for Swift and C/C++/Objective-C.
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("Package.swift", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sourcery.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sourcery.lua
new file mode 100644
index 0000000..9100c5a
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sourcery.lua
@@ -0,0 +1,55 @@
+local util = require 'lspconfig/util'
+
+local root_files = {
+ 'pyproject.toml',
+ 'setup.py',
+ 'setup.cfg',
+ 'requirements.txt',
+ 'Pipfile',
+ 'pyrightconfig.json',
+}
+
+return {
+ default_config = {
+ cmd = { 'sourcery', 'lsp' },
+ filetypes = { 'python' },
+ init_options = {
+ editor_version = 'vim',
+ extension_version = 'vim.lsp',
+ token = nil,
+ },
+ root_dir = function(fname)
+ return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ on_new_config = function(new_config, _)
+ if not new_config.init_options.token then
+ local notify = vim.notify_once or vim.notify
+ notify('[lspconfig] The authentication token must be provided in config.init_options', vim.log.levels.ERROR)
+ end
+ end,
+ docs = {
+ description = [[
+https://github.com/sourcery-ai/sourcery
+
+Refactor Python instantly using the power of AI.
+
+It requires the initializationOptions param to be populated as shown below and will respond with the list of ServerCapabilities that it supports.
+
+init_options = {
+ --- The Sourcery token for authenticating the user.
+ --- This is retrieved from the Sourcery website and must be
+ --- provided by each user. The extension must provide a
+ --- configuration option for the user to provide this value.
+ token = <YOUR_TOKEN>
+
+ --- The extension's name and version as defined by the extension.
+ extension_version = 'vim.lsp'
+
+ --- The editor's name and version as defined by the editor.
+ editor_version = 'vim'
+}
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/spectral.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/spectral.lua
new file mode 100644
index 0000000..e21b6cb
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/spectral.lua
@@ -0,0 +1,29 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'spectral-language-server'
+
+return {
+ default_config = {
+ cmd = { bin_name, '--stdio' },
+ filetypes = { 'yaml', 'json', 'yml' },
+ root_dir = util.root_pattern('.spectral.yaml', '.spectral.yml', '.spectral.json', '.spectral.js'),
+ single_file_support = true,
+ settings = {
+ enable = true,
+ run = 'onType',
+ validateLanguages = { 'yaml', 'json', 'yml' },
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/luizcorreia/spectral-language-server
+ `A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.`
+
+`spectral-language-server` can be installed via `npm`:
+```sh
+npm i -g spectral-language-server
+```
+See [vscode-spectral](https://github.com/stoplightio/vscode-spectral#extension-settings) for configuration options.
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sqlls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sqlls.lua
new file mode 100644
index 0000000..434a7ce
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sqlls.lua
@@ -0,0 +1,18 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'sql-language-server', 'up', '--method', 'stdio' },
+ filetypes = { 'sql', 'mysql' },
+ root_dir = util.root_pattern '.sqllsrc.json',
+ settings = {},
+ },
+ docs = {
+ description = [[
+https://github.com/joe-re/sql-language-server
+
+This LSP can be installed via `npm`. Find further instructions on manual installation of the sql-language-server at [joe-re/sql-language-server](https://github.com/joe-re/sql-language-server).
+<br>
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sqls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sqls.lua
new file mode 100644
index 0000000..2680253
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sqls.lua
@@ -0,0 +1,25 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'sqls' },
+ filetypes = { 'sql', 'mysql' },
+ root_dir = util.root_pattern 'config.yml',
+ single_file_support = true,
+ settings = {},
+ },
+ docs = {
+ description = [[
+https://github.com/lighttiger2505/sqls
+
+```lua
+require'lspconfig'.sqls.setup{
+ cmd = {"path/to/command", "-config", "path/to/config.yml"};
+ ...
+}
+```
+Sqls can be installed via `go get github.com/lighttiger2505/sqls`. Instructions for compiling Sqls from the source can be found at [lighttiger2505/sqls](https://github.com/lighttiger2505/sqls).
+
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/stylelint_lsp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/stylelint_lsp.lua
new file mode 100644
index 0000000..d471d26
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/stylelint_lsp.lua
@@ -0,0 +1,54 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'stylelint-lsp'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = {
+ 'css',
+ 'less',
+ 'scss',
+ 'sugarss',
+ 'vue',
+ 'wxss',
+ 'javascript',
+ 'javascriptreact',
+ 'typescript',
+ 'typescriptreact',
+ },
+ root_dir = util.root_pattern('.stylelintrc', 'package.json'),
+ settings = {},
+ },
+ docs = {
+ description = [[
+https://github.com/bmatcuk/stylelint-lsp
+
+`stylelint-lsp` can be installed via `npm`:
+
+```sh
+npm i -g stylelint-lsp
+```
+
+Can be configured by passing a `settings.stylelintplus` object to `stylelint_lsp.setup`:
+
+```lua
+require'lspconfig'.stylelint_lsp.setup{
+ settings = {
+ stylelintplus = {
+ -- see available options in stylelint-lsp documentation
+ }
+ }
+}
+```
+]],
+ default_config = {
+ root_dir = [[ root_pattern('.stylelintrc', 'package.json') ]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sumneko_lua.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sumneko_lua.lua
new file mode 100644
index 0000000..6338095
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/sumneko_lua.lua
@@ -0,0 +1,63 @@
+local util = require 'lspconfig.util'
+
+local root_files = {
+ '.luarc.json',
+ '.luacheckrc',
+ '.stylua.toml',
+ 'selene.toml',
+}
+return {
+ default_config = {
+ cmd = { 'lua-language-server' },
+ filetypes = { 'lua' },
+ root_dir = function(fname)
+ return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ log_level = vim.lsp.protocol.MessageType.Warning,
+ settings = { Lua = { telemetry = { enable = false } } },
+ },
+ docs = {
+ description = [[
+https://github.com/sumneko/lua-language-server
+
+Lua language server.
+
+`lua-language-server` can be installed by following the instructions [here](https://github.com/sumneko/lua-language-server/wiki/Build-and-Run). The default `cmd` assumes that the `lua-language-server` binary can be found in `$PATH`.
+
+```lua
+local runtime_path = vim.split(package.path, ';')
+table.insert(runtime_path, "lua/?.lua")
+table.insert(runtime_path, "lua/?/init.lua")
+
+require'lspconfig'.sumneko_lua.setup {
+ 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 = runtime_path,
+ },
+ diagnostics = {
+ -- Get the language server to recognize the `vim` global
+ globals = {'vim'},
+ },
+ 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,
+ },
+ },
+ },
+}
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern(".luarc.json", ".luacheckrc", ".stylua.toml", "selene.toml", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/svelte.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/svelte.lua
new file mode 100644
index 0000000..14db192
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/svelte.lua
@@ -0,0 +1,29 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'svelteserver'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'svelte' },
+ root_dir = util.root_pattern('package.json', '.git'),
+ },
+ docs = {
+ description = [[
+https://github.com/sveltejs/language-tools/tree/master/packages/language-server
+
+`svelte-language-server` can be installed via `npm`:
+```sh
+npm install -g svelte-language-server
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("package.json", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/svls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/svls.lua
new file mode 100644
index 0000000..ff4d810
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/svls.lua
@@ -0,0 +1,24 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'svls' },
+ filetypes = { 'verilog', 'systemverilog' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ description = [[
+https://github.com/dalance/svls
+
+Language server for verilog and SystemVerilog
+
+`svls` can be installed via `cargo`:
+ ```sh
+ cargo install svls
+ ```
+ ]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tailwindcss.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tailwindcss.lua
new file mode 100644
index 0000000..5a5abc0
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tailwindcss.lua
@@ -0,0 +1,126 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'tailwindcss-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ -- filetypes copied and adjusted from tailwindcss-intellisense
+ filetypes = {
+ -- html
+ 'aspnetcorerazor',
+ 'astro',
+ 'astro-markdown',
+ 'blade',
+ 'django-html',
+ 'htmldjango',
+ 'edge',
+ 'eelixir', -- vim ft
+ 'ejs',
+ 'erb',
+ 'eruby', -- vim ft
+ 'gohtml',
+ 'haml',
+ 'handlebars',
+ 'hbs',
+ 'html',
+ -- 'HTML (Eex)',
+ -- 'HTML (EEx)',
+ 'html-eex',
+ 'heex',
+ 'jade',
+ 'leaf',
+ 'liquid',
+ 'markdown',
+ 'mdx',
+ 'mustache',
+ 'njk',
+ 'nunjucks',
+ 'php',
+ 'razor',
+ 'slim',
+ 'twig',
+ -- css
+ 'css',
+ 'less',
+ 'postcss',
+ 'sass',
+ 'scss',
+ 'stylus',
+ 'sugarss',
+ -- js
+ 'javascript',
+ 'javascriptreact',
+ 'reason',
+ 'rescript',
+ 'typescript',
+ 'typescriptreact',
+ -- mixed
+ 'vue',
+ 'svelte',
+ },
+ init_options = {
+ userLanguages = {
+ eelixir = 'html-eex',
+ eruby = 'erb',
+ },
+ },
+ settings = {
+ tailwindCSS = {
+ validate = true,
+ lint = {
+ cssConflict = 'warning',
+ invalidApply = 'error',
+ invalidScreen = 'error',
+ invalidVariant = 'error',
+ invalidConfigPath = 'error',
+ invalidTailwindDirective = 'error',
+ recommendedVariantOrder = 'warning',
+ },
+ classAttributes = {
+ 'class',
+ 'className',
+ 'classList',
+ 'ngClass',
+ },
+ },
+ },
+ on_new_config = function(new_config)
+ if not new_config.settings then
+ new_config.settings = {}
+ end
+ if not new_config.settings.editor then
+ new_config.settings.editor = {}
+ end
+ if not new_config.settings.editor.tabSize then
+ -- set tab size for hover
+ new_config.settings.editor.tabSize = vim.lsp.util.get_effective_tabstop()
+ end
+ end,
+ root_dir = function(fname)
+ return util.root_pattern('tailwind.config.js', 'tailwind.config.ts')(fname)
+ or util.root_pattern('postcss.config.js', 'postcss.config.ts')(fname)
+ or util.find_package_json_ancestor(fname)
+ or util.find_node_modules_ancestor(fname)
+ or util.find_git_ancestor(fname)
+ end,
+ },
+ docs = {
+ description = [[
+https://github.com/tailwindlabs/tailwindcss-intellisense
+
+Tailwind CSS Language Server can be installed via npm:
+```sh
+npm install -g @tailwindcss/language-server
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern('tailwind.config.js', 'tailwind.config.ts', 'postcss.config.js', 'postcss.config.ts', 'package.json', 'node_modules', '.git')]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/taplo.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/taplo.lua
new file mode 100644
index 0000000..320ced9
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/taplo.lua
@@ -0,0 +1,27 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'taplo', 'lsp', 'stdio' },
+ filetypes = { 'toml' },
+ root_dir = function(fname)
+ return util.root_pattern '*.toml'(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://taplo.tamasfe.dev/lsp/
+
+Language server for Taplo, a TOML toolkit.
+
+`taplo-cli` can be installed via `cargo`:
+```sh
+cargo install --locked taplo-cli
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("*.toml", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/teal_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/teal_ls.lua
new file mode 100644
index 0000000..b554add
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/teal_ls.lua
@@ -0,0 +1,29 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = {
+ 'teal-language-server',
+ -- use this to enable logging in /tmp/teal-language-server.log
+ -- "logging=on",
+ },
+ filetypes = {
+ 'teal',
+ -- "lua", -- Also works for lua, but you may get type errors that cannot be resolved within lua itself
+ },
+ root_dir = util.root_pattern('tlconfig.lua', '.git'),
+ },
+ docs = {
+ description = [[
+https://github.com/teal-language/teal-language-server
+
+Install with:
+```
+luarocks install --dev teal-language-server
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("tlconfig.lua", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/terraform_lsp.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/terraform_lsp.lua
new file mode 100644
index 0000000..48a6fc5
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/terraform_lsp.lua
@@ -0,0 +1,43 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'terraform-lsp' },
+ filetypes = { 'terraform', 'hcl' },
+ root_dir = util.root_pattern('.terraform', '.git'),
+ },
+ docs = {
+ description = [[
+https://github.com/juliosueiras/terraform-lsp
+
+Terraform language server
+Download a released binary from
+https://github.com/juliosueiras/terraform-lsp/releases.
+
+From https://github.com/hashicorp/terraform-ls#terraform-ls-vs-terraform-lsp:
+
+Both HashiCorp and the maintainer of terraform-lsp expressed interest in
+collaborating on a language server and are working towards a _long-term_
+goal of a single stable and feature-complete implementation.
+
+For the time being both projects continue to exist, giving users the
+choice:
+
+- `terraform-ls` providing
+ - overall stability (by relying only on public APIs)
+ - compatibility with any provider and any Terraform >=0.12.0 currently
+ less features
+ - due to project being younger and relying on public APIs which may
+ not offer the same functionality yet
+
+- `terraform-lsp` providing
+ - currently more features
+ - compatibility with a single particular Terraform (0.12.20 at time of writing)
+ - configs designed for other 0.12 versions may work, but interpretation may be inaccurate
+ - less stability (due to reliance on Terraform's own internal packages)
+]],
+ default_config = {
+ root_dir = [[root_pattern(".terraform", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/terraformls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/terraformls.lua
new file mode 100644
index 0000000..3eb4a1c
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/terraformls.lua
@@ -0,0 +1,42 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'terraform-ls', 'serve' },
+ filetypes = { 'terraform' },
+ root_dir = util.root_pattern('.terraform', '.git'),
+ },
+ docs = {
+ description = [[
+https://github.com/hashicorp/terraform-ls
+
+Terraform language server
+Download a released binary from https://github.com/hashicorp/terraform-ls/releases.
+
+From https://github.com/hashicorp/terraform-ls#terraform-ls-vs-terraform-lsp:
+
+Both HashiCorp and the maintainer of terraform-lsp expressed interest in
+collaborating on a language server and are working towards a _long-term_
+goal of a single stable and feature-complete implementation.
+
+For the time being both projects continue to exist, giving users the
+choice:
+
+- `terraform-ls` providing
+ - overall stability (by relying only on public APIs)
+ - compatibility with any provider and any Terraform >=0.12.0 currently
+ less features
+ - due to project being younger and relying on public APIs which may
+ not offer the same functionality yet
+
+- `terraform-lsp` providing
+ - currently more features
+ - compatibility with a single particular Terraform (0.12.20 at time of writing)
+ - configs designed for other 0.12 versions may work, but interpretation may be inaccurate
+ - less stability (due to reliance on Terraform's own internal packages)
+]],
+ default_config = {
+ root_dir = [[root_pattern(".terraform", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/texlab.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/texlab.lua
new file mode 100644
index 0000000..88bfa20
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/texlab.lua
@@ -0,0 +1,126 @@
+local util = require 'lspconfig.util'
+
+local texlab_build_status = vim.tbl_add_reverse_lookup {
+ Success = 0,
+ Error = 1,
+ Failure = 2,
+ Cancelled = 3,
+}
+
+local texlab_forward_status = vim.tbl_add_reverse_lookup {
+ Success = 0,
+ Error = 1,
+ Failure = 2,
+ Unconfigured = 3,
+}
+
+local function buf_build(bufnr)
+ bufnr = util.validate_bufnr(bufnr)
+ local texlab_client = util.get_active_client_by_name(bufnr, 'texlab')
+ local params = {
+ textDocument = { uri = vim.uri_from_bufnr(bufnr) },
+ }
+ if texlab_client then
+ texlab_client.request('textDocument/build', params, function(err, result)
+ if err then
+ error(tostring(err))
+ end
+ print('Build ' .. texlab_build_status[result.status])
+ end, bufnr)
+ else
+ print 'method textDocument/build is not supported by any servers active on the current buffer'
+ end
+end
+
+local function buf_search(bufnr)
+ bufnr = util.validate_bufnr(bufnr)
+ local texlab_client = util.get_active_client_by_name(bufnr, 'texlab')
+ local params = {
+ textDocument = { uri = vim.uri_from_bufnr(bufnr) },
+ position = { line = vim.fn.line '.' - 1, character = vim.fn.col '.' },
+ }
+ if texlab_client then
+ texlab_client.request('textDocument/forwardSearch', params, function(err, result)
+ if err then
+ error(tostring(err))
+ end
+ print('Search ' .. texlab_forward_status[result.status])
+ end, bufnr)
+ else
+ print 'method textDocument/forwardSearch is not supported by any servers active on the current buffer'
+ end
+end
+
+-- bufnr isn't actually required here, but we need a valid buffer in order to
+-- be able to find the client for buf_request.
+-- TODO find a client by looking through buffers for a valid client?
+-- local function build_cancel_all(bufnr)
+-- bufnr = util.validate_bufnr(bufnr)
+-- local params = { token = "texlab-build-*" }
+-- lsp.buf_request(bufnr, 'window/progress/cancel', params, function(err, method, result, client_id)
+-- if err then error(tostring(err)) end
+-- print("Cancel result", vim.inspect(result))
+-- end)
+-- end
+
+return {
+ default_config = {
+ cmd = { 'texlab' },
+ filetypes = { 'tex', 'bib' },
+ root_dir = function(fname)
+ return util.root_pattern '.latexmkrc'(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ settings = {
+ texlab = {
+ rootDirectory = nil,
+ build = {
+ executable = 'latexmk',
+ args = { '-pdf', '-interaction=nonstopmode', '-synctex=1', '%f' },
+ onSave = false,
+ forwardSearchAfter = false,
+ },
+ auxDirectory = '.',
+ forwardSearch = {
+ executable = nil,
+ args = {},
+ },
+ chktex = {
+ onOpenAndSave = false,
+ onEdit = false,
+ },
+ diagnosticsDelay = 300,
+ latexFormatter = 'latexindent',
+ latexindent = {
+ ['local'] = nil, -- local is a reserved keyword
+ modifyLineBreaks = false,
+ },
+ bibtexFormatter = 'texlab',
+ formatterLineLength = 80,
+ },
+ },
+ },
+ commands = {
+ TexlabBuild = {
+ function()
+ buf_build(0)
+ end,
+ description = 'Build the current buffer',
+ },
+ TexlabForward = {
+ function()
+ buf_search(0)
+ end,
+ description = 'Forward search from current position',
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/latex-lsp/texlab
+
+A completion engine built from scratch for (La)TeX.
+
+See https://github.com/latex-lsp/texlab/blob/master/docs/options.md for configuration options.
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tflint.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tflint.lua
new file mode 100644
index 0000000..de2a1d8
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tflint.lua
@@ -0,0 +1,20 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'tflint', '--langserver' },
+ filetypes = { 'terraform' },
+ root_dir = util.root_pattern('.terraform', '.git', '.tflint.hcl'),
+ },
+ docs = {
+ description = [[
+https://github.com/terraform-linters/tflint
+
+A pluggable Terraform linter that can act as lsp server.
+Installation instructions can be found in https://github.com/terraform-linters/tflint#installation.
+]],
+ default_config = {
+ root_dir = [[root_pattern(".terraform", ".git", ".tflint.hcl")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/theme_check.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/theme_check.lua
new file mode 100644
index 0000000..94d6774
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/theme_check.lua
@@ -0,0 +1,31 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'theme-check-language-server'
+
+return {
+ default_config = {
+ cmd = { bin_name, '--stdio' },
+ filetypes = { 'liquid' },
+ root_dir = util.root_pattern '.theme-check.yml',
+ settings = {},
+ },
+ docs = {
+ description = [[
+https://github.com/Shopify/shopify-cli
+
+`theme-check-language-server` is bundled with `shopify-cli` or it can also be installed via
+
+https://github.com/Shopify/theme-check#installation
+
+**NOTE:**
+If installed via Homebrew, `cmd` must be set to 'theme-check-liquid-server'
+
+```lua
+require lspconfig.theme_check.setup {
+ cmd = { 'theme-check-liquid-server' }
+}
+```
+
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tsserver.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tsserver.lua
new file mode 100644
index 0000000..0f916fe
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/tsserver.lua
@@ -0,0 +1,60 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'typescript-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ init_options = { hostInfo = 'neovim' },
+ cmd = cmd,
+ filetypes = {
+ 'javascript',
+ 'javascriptreact',
+ 'javascript.jsx',
+ 'typescript',
+ 'typescriptreact',
+ 'typescript.tsx',
+ },
+ root_dir = function(fname)
+ return util.root_pattern 'tsconfig.json'(fname)
+ or util.root_pattern('package.json', 'jsconfig.json', '.git')(fname)
+ end,
+ },
+ docs = {
+ description = [[
+https://github.com/theia-ide/typescript-language-server
+
+`typescript-language-server` depends on `typescript`. Both packages can be installed via `npm`:
+```sh
+npm install -g typescript typescript-language-server
+```
+
+To configure type language server, add a
+[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) or
+[`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to the root of your
+project.
+
+Here's an example that disables type checking in JavaScript files.
+
+```json
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es6",
+ "checkJs": false
+ },
+ "exclude": [
+ "node_modules"
+ ]
+}
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/typeprof.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/typeprof.lua
new file mode 100644
index 0000000..ab9dc8e
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/typeprof.lua
@@ -0,0 +1,19 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'typeprof', '--lsp', '--stdio' },
+ filetypes = { 'ruby', 'eruby' },
+ root_dir = util.root_pattern('Gemfile', '.git'),
+ },
+ docs = {
+ description = [[
+https://github.com/ruby/typeprof
+
+`typeprof` is the built-in analysis and LSP tool for Ruby 3.1+.
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("Gemfile", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vala_ls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vala_ls.lua
new file mode 100644
index 0000000..842c561
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vala_ls.lua
@@ -0,0 +1,40 @@
+local util = require 'lspconfig.util'
+
+local meson_matcher = function(path)
+ local pattern = 'meson.build'
+ local f = vim.fn.glob(util.path.join(path, pattern))
+ if f == '' then
+ return nil
+ end
+ for line in io.lines(f) do
+ -- skip meson comments
+ if not line:match '^%s*#.*' then
+ local str = line:gsub('%s+', '')
+ if str ~= '' then
+ if str:match '^project%(' then
+ return path
+ else
+ break
+ end
+ end
+ end
+ end
+end
+
+return {
+ default_config = {
+ cmd = { 'vala-language-server' },
+ filetypes = { 'vala', 'genie' },
+ root_dir = function(fname)
+ local root = util.search_ancestors(fname, meson_matcher)
+ return root or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = 'https://github.com/Prince781/vala-language-server',
+ default_config = {
+ root_dir = [[root_pattern("meson.build", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vdmj.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vdmj.lua
new file mode 100644
index 0000000..9699b93
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vdmj.lua
@@ -0,0 +1,128 @@
+local util = require 'lspconfig.util'
+
+local mavenrepo = util.path.join(vim.env.HOME, '.m2', 'repository', 'com', 'fujitsu')
+
+local function get_jar_path(config, package, version)
+ return util.path.join(config.options.mavenrepo, package, version, package .. '-' .. version .. '.jar')
+end
+
+local function with_precision(version, is_high_precision)
+ return is_high_precision and version:gsub('([%d.]+)', '%1-P') or version
+end
+
+local function get_latest_installed_version(repo)
+ local path = util.path.join(repo, 'lsp')
+ local sort = vim.fn.sort
+
+ local subdirs = function(file)
+ local stat = vim.loop.fs_stat(util.path.join(path, file))
+ return stat.type == 'directory' and 1 or 0
+ end
+
+ local candidates = vim.fn.readdir(path, subdirs)
+ local sorted = sort(sort(candidates, 'l'), 'N')
+ return sorted[#sorted]
+end
+
+-- Special case, as vdmj store particular settings under root_dir/.vscode
+local function find_vscode_ancestor(startpath)
+ return util.search_ancestors(startpath, function(path)
+ if util.path.is_dir(util.path.join(path, '.vscode')) then
+ return path
+ end
+ end)
+end
+
+return {
+ default_config = {
+ cmd = { 'java' },
+ filetypes = { 'vdmsl', 'vdmpp', 'vdmrt' },
+ root_dir = function(fname)
+ return util.find_git_ancestor(fname) or find_vscode_ancestor(fname)
+ end,
+ options = {
+ java = vim.env.JAVA_HOME and util.path.join(vim.env.JAVA_HOME, 'bin', 'java') or 'java',
+ java_opts = { '-Xmx3000m', '-Xss1m' },
+ annotation_paths = {},
+ mavenrepo = mavenrepo,
+ version = get_latest_installed_version(mavenrepo),
+ logfile = util.path.join(vim.fn.stdpath 'cache', 'vdm-lsp.log'),
+ debugger_port = -1,
+ high_precision = false,
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/nickbattle/vdmj
+
+The VDMJ language server can be installed by cloning the VDMJ repository and
+running `mvn clean install`.
+
+Various options are provided to configure the language server (see below). In
+particular:
+- `annotation_paths` is a list of folders and/or jar file paths for annotations
+that should be used with the language server;
+- any value of `debugger_port` less than zero will disable the debugger; note
+that if a non-zero value is used, only one instance of the server can be active
+at a time.
+
+More settings for VDMJ can be changed in a file called `vdmj.properties` under
+`root_dir/.vscode`. For a description of the available settings, see
+[Section 7 of the VDMJ User Guide](https://raw.githubusercontent.com/nickbattle/vdmj/master/vdmj/documentation/UserGuide.pdf).
+
+Note: proof obligations and combinatorial testing are not currently supported
+by neovim.
+]],
+ default_config = {
+ cmd = 'Generated from the options given',
+ root_dir = 'util.find_git_ancestor(fname) or find_vscode_ancestor(fname)',
+ options = {
+ java = '$JAVA_HOME/bin/java',
+ java_opts = { '-Xmx3000m', '-Xss1m' },
+ annotation_paths = {},
+ mavenrepo = '$HOME/.m2/repository/com/fujitsu',
+ version = 'The latest version installed in `mavenrepo`',
+ logfile = "path.join(vim.fn.stdpath 'cache', 'vdm-lsp.log')",
+ debugger_port = -1,
+ high_precision = false,
+ },
+ },
+ },
+ on_new_config = function(config, root_dir)
+ local version = with_precision(
+ config.options.version or get_latest_installed_version(config.options.mavenrepo),
+ config.options.high_precision
+ )
+
+ local classpath = table.concat({
+ get_jar_path(config, 'vdmj', version),
+ get_jar_path(config, 'annotations', version),
+ get_jar_path(config, 'lsp', version),
+ util.path.join(root_dir, '.vscode'),
+ unpack(config.options.annotation_paths),
+ }, ':')
+
+ local java_cmd = {
+ config.options.java,
+ config.options.java_opts,
+ '-Dlsp.log.filename=' .. config.options.logfile,
+ '-cp',
+ classpath,
+ }
+
+ local dap = {}
+
+ if config.options.debugger_port >= 0 then
+ -- TODO: LS will fail to start if port is already in use
+ dap = { '-dap', tostring(config.options.debugger_port) }
+ end
+
+ local vdmj_cmd = {
+ 'lsp.LSPServerStdio',
+ '-' .. vim.bo.filetype,
+ dap,
+ }
+
+ config.cmd = vim.tbl_flatten { java_cmd, vdmj_cmd }
+ end,
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/verible.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/verible.lua
new file mode 100644
index 0000000..3c4823a
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/verible.lua
@@ -0,0 +1,21 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'verible-verilog-ls' },
+ filetypes = { 'systemverilog', 'verilog' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ description = [[
+https://github.com/chipsalliance/verible
+
+A linter and formatter for verilog and SystemVerilog files.
+
+Release binaries can be downloaded from [here](https://github.com/chipsalliance/verible/releases)
+and placed in a directory on PATH.
+
+See https://github.com/chipsalliance/verible/tree/master/verilog/tools/ls/README.md for options.
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vimls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vimls.lua
new file mode 100644
index 0000000..4f0d1d9
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vimls.lua
@@ -0,0 +1,41 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'vim-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ 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
+```
+]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vls.lua
new file mode 100644
index 0000000..36255c0
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vls.lua
@@ -0,0 +1,32 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ filetypes = { 'vlang' },
+ root_dir = util.root_pattern('v.mod', '.git'),
+ },
+ docs = {
+ description = [[
+https://github.com/vlang/vls
+
+V language server.
+
+`v-language-server` can be installed by following the instructions [here](https://github.com/vlang/vls#installation).
+
+**By default, v-language-server doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of your unzipped and compiled v-language-server.
+
+```lua
+-- set the path to the vls installation;
+local vls_root_path = vim.fn.stdpath('cache')..'/lspconfig/vls'
+local vls_binary = vls_root_path.."/cmd/vls/vls"
+
+require'lspconfig'.vls.setup {
+ cmd = {vls_binary},
+}
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("v.mod", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/volar.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/volar.lua
new file mode 100644
index 0000000..7742757
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/volar.lua
@@ -0,0 +1,138 @@
+local util = require 'lspconfig.util'
+
+local function get_typescript_server_path(root_dir)
+ local project_root = util.find_node_modules_ancestor(root_dir)
+ return project_root and (util.path.join(project_root, 'node_modules', 'typescript', 'lib', 'tsserverlibrary.js'))
+ or ''
+end
+
+-- https://github.com/johnsoncodehk/volar/blob/master/packages/shared/src/types.ts
+local volar_init_options = {
+ typescript = {
+ serverPath = '',
+ },
+ languageFeatures = {
+ implementation = true,
+ -- not supported - https://github.com/neovim/neovim/pull/14122
+ semanticTokens = false,
+ references = true,
+ definition = true,
+ typeDefinition = true,
+ callHierarchy = true,
+ hover = true,
+ rename = true,
+ renameFileRefactoring = true,
+ signatureHelp = true,
+ codeAction = true,
+ completion = {
+ defaultTagNameCase = 'both',
+ defaultAttrNameCase = 'kebabCase',
+ },
+ schemaRequestService = true,
+ documentHighlight = true,
+ documentLink = true,
+ codeLens = true,
+ diagnostics = true,
+ },
+ documentFeatures = {
+ -- not supported - https://github.com/neovim/neovim/pull/13654
+ documentColor = false,
+ selectionRange = true,
+ foldingRange = true,
+ linkedEditingRange = true,
+ documentSymbol = true,
+ documentFormatting = {
+ defaultPrintWidth = 100,
+ },
+ },
+}
+
+local bin_name = 'vue-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'vue' },
+ root_dir = util.root_pattern 'package.json',
+ init_options = volar_init_options,
+ on_new_config = function(new_config, new_root_dir)
+ if
+ new_config.init_options
+ and new_config.init_options.typescript
+ and new_config.init_options.typescript.serverPath == ''
+ then
+ new_config.init_options.typescript.serverPath = get_typescript_server_path(new_root_dir)
+ end
+ end,
+ },
+ docs = {
+ description = [[
+https://github.com/johnsoncodehk/volar/tree/master/packages/vue-language-server
+
+Volar language server for Vue
+
+Volar can be installed via npm:
+
+```sh
+npm install -g @volar/vue-language-server
+```
+
+Volar by default supports Vue 3 projects. Vue 2 projects need [additional configuration](https://github.com/johnsoncodehk/volar/blob/master/extensions/vscode-vue-language-features/README.md?plain=1#L28-L63).
+
+**Take Over Mode**
+Volar can serve as a language server for both Vue and TypeScript via [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471).
+
+To enable Take Over Mode, override the default filetypes in `setup{}` as follows:
+
+```lua
+require'lspconfig'.volar.setup{
+ filetypes = {'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue', 'json'}
+}
+```
+
+**Overriding the default TypeScript Server used by Volar**
+The default config looks for TS in the local node_modules. The alternatives are:
+
+- use a global TypeScript Server installation
+
+```lua
+require'lspconfig'.volar.setup{
+ init_options = {
+ typescript = {
+ serverPath = '/path/to/.npm/lib/node_modules/typescript/lib/tsserverlib.js'
+ }
+ }
+}
+```
+
+- use a global TypeScript Server installation if a local server is not found
+
+```lua
+local util = require 'lspconfig.util'
+
+local function get_typescript_server_path(root_dir)
+ local project_root = util.find_node_modules_ancestor(root_dir)
+
+ local local_tsserverlib = project_root ~= nil and util.path.join(project_root, 'node_modules', 'typescript', 'lib', 'tsserverlibrary.js')
+ local global_tsserverlib = '/home/[yourusernamehere]/.npm/lib/node_modules/typescript/lib/tsserverlibrary.js'
+
+ if local_tsserverlib and util.path.exists(local_tsserverlib) then
+ return local_tsserverlib
+ else
+ return global_tsserverlib
+ end
+end
+
+require'lspconfig'.volar.setup{
+ on_new_config = function(new_config, new_root_dir)
+ new_config.init_options.typescript.serverPath = get_typescript_server_path(new_root_dir)
+ end,
+}
+```
+ ]],
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vuels.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vuels.lua
new file mode 100644
index 0000000..d3d2d92
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/vuels.lua
@@ -0,0 +1,68 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'vls'
+local cmd = { bin_name }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'vue' },
+ root_dir = util.root_pattern('package.json', 'vue.config.js'),
+ init_options = {
+ config = {
+ vetur = {
+ useWorkspaceDependencies = false,
+ validation = {
+ template = true,
+ style = true,
+ script = true,
+ },
+ completion = {
+ autoImport = false,
+ useScaffoldSnippets = false,
+ tagCasing = 'kebab',
+ },
+ format = {
+ defaultFormatter = {
+ js = 'none',
+ ts = 'none',
+ },
+ defaultFormatterOptions = {},
+ scriptInitialIndent = false,
+ styleInitialIndent = false,
+ },
+ },
+ css = {},
+ html = {
+ suggest = {},
+ },
+ javascript = {
+ format = {},
+ },
+ typescript = {
+ format = {},
+ },
+ emmet = {},
+ stylusSupremacy = {},
+ },
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/vuejs/vetur/tree/master/server
+
+Vue language server(vls)
+`vue-language-server` can be installed via `npm`:
+```sh
+npm install -g vls
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern("package.json", "vue.config.js")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/yamlls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/yamlls.lua
new file mode 100644
index 0000000..52d8e6f
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/yamlls.lua
@@ -0,0 +1,87 @@
+local util = require 'lspconfig.util'
+
+local bin_name = 'yaml-language-server'
+local cmd = { bin_name, '--stdio' }
+
+if vim.fn.has 'win32' == 1 then
+ cmd = { 'cmd.exe', '/C', bin_name, '--stdio' }
+end
+
+return {
+ default_config = {
+ cmd = cmd,
+ filetypes = { 'yaml', 'yaml.docker-compose' },
+ root_dir = util.find_git_ancestor,
+ single_file_support = true,
+ settings = {
+ -- https://github.com/redhat-developer/vscode-redhat-telemetry#how-to-disable-telemetry-reporting
+ redhat = { telemetry = { enabled = false } },
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/redhat-developer/yaml-language-server
+
+`yaml-language-server` can be installed via `yarn`:
+```sh
+yarn global add yaml-language-server
+```
+
+To use a schema for validation, there are two options:
+
+1. Add a modeline to the file. A modeline is a comment of the form:
+
+```
+# yaml-language-server: $schema=<urlToTheSchema|relativeFilePath|absoluteFilePath}>
+```
+
+where the relative filepath is the path relative to the open yaml file, and the absolute filepath
+is the filepath relative to the filesystem root ('/' on unix systems)
+
+2. Associated a schema url, relative , or absolute (to root of project, not to filesystem root) path to
+the a glob pattern relative to the detected project root. Check `:LspInfo` to determine the resolved project
+root.
+
+```lua
+require('lspconfig').yamlls.setup {
+ ... -- other configuration for setup {}
+ settings = {
+ yaml = {
+ ... -- other settings. note this overrides the lspconfig defaults.
+ schemas = {
+ ["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*"
+ ["../path/relative/to/file.yml"] = "/.github/workflows/*"
+ ["/path/from/root/of/project"] = "/.github/workflows/*"
+ },
+ },
+ }
+}
+```
+
+Currently, kubernetes is special-cased in yammls, see the following upstream issues:
+* [#211](https://github.com/redhat-developer/yaml-language-server/issues/211).
+* [#307](https://github.com/redhat-developer/yaml-language-server/issues/307).
+
+To override a schema to use a specific k8s schema version (for example, to use 1.18):
+
+```lua
+require('lspconfig').yamlls.setup {
+ ... -- other configuration for setup {}
+ settings = {
+ yaml = {
+ ... -- other settings. note this overrides the lspconfig defaults.
+ schemas = {
+ ["https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.18.0-standalone-strict/all.json"] = "/*.k8s.yaml",
+ ... -- other schemas
+ },
+ },
+ }
+}
+```
+
+]],
+ default_config = {
+ root_dir = [[util.find_git_ancestor]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zeta_note.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zeta_note.lua
new file mode 100644
index 0000000..9798af9
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zeta_note.lua
@@ -0,0 +1,28 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ filetypes = { 'markdown' },
+ root_dir = util.root_pattern '.zeta.toml',
+ },
+ docs = {
+ description = [[
+https://github.com/artempyanykh/zeta-note
+
+Markdown LSP server for easy note-taking with cross-references and diagnostics.
+
+Binaries can be downloaded from https://github.com/artempyanykh/zeta-note/releases
+
+**By default, zeta-note doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of your zeta-note binary.
+
+```lua
+require'lspconfig'.zeta_note.setup{
+ cmd = {'path/to/zeta-note'}
+}
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern(".zeta.toml")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zk.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zk.lua
new file mode 100644
index 0000000..c289045
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zk.lua
@@ -0,0 +1,48 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'zk', 'lsp' },
+ filetypes = { 'markdown' },
+ root_dir = util.root_pattern '.zk',
+ },
+ commands = {
+ ZkIndex = {
+ function()
+ vim.lsp.buf.execute_command {
+ command = 'zk.index',
+ arguments = { vim.api.nvim_buf_get_name(0) },
+ }
+ end,
+ description = 'Index',
+ },
+ ZkNew = {
+ function(...)
+ vim.lsp.buf_request(0, 'workspace/executeCommand', {
+ command = 'zk.new',
+ arguments = {
+ vim.api.nvim_buf_get_name(0),
+ ...,
+ },
+ }, function(_, result, _, _)
+ if not (result and result.path) then
+ return
+ end
+ vim.cmd('edit ' .. result.path)
+ end)
+ end,
+
+ description = 'ZkNew',
+ },
+ },
+ docs = {
+ description = [[
+github.com/mickael-menu/zk
+
+A plain text note-taking assistant
+]],
+ default_config = {
+ root_dir = [[root_pattern(".zk")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zls.lua b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zls.lua
new file mode 100644
index 0000000..d890fb6
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/server_configurations/zls.lua
@@ -0,0 +1,20 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'zls' },
+ filetypes = { 'zig', 'zir' },
+ root_dir = util.root_pattern('zls.json', '.git'),
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/zigtools/zls
+
+Zig LSP implementation + Zig Language Server
+ ]],
+ default_config = {
+ root_dir = [[util.root_pattern("zls.json", ".git")]],
+ },
+ },
+}
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/ui/lspinfo.lua b/start/lspconfig-0.1.3/lua/lspconfig/ui/lspinfo.lua
new file mode 100644
index 0000000..42a7fed
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/ui/lspinfo.lua
@@ -0,0 +1,225 @@
+local configs = require 'lspconfig.configs'
+local windows = require 'lspconfig.ui.windows'
+local util = require 'lspconfig.util'
+
+local error_messages = {
+ cmd_not_found = 'Unable to find executable. Please check your path and ensure the server is installed',
+ no_filetype_defined = 'No filetypes defined, Please define filetypes in setup()',
+}
+
+local function trim_blankspace(cmd)
+ local trimmed_cmd = {}
+ for _, str in pairs(cmd) do
+ table.insert(trimmed_cmd, str:match '^%s*(.*)')
+ end
+ return trimmed_cmd
+end
+
+local function indent_lines(lines, offset)
+ return vim.tbl_map(function(val)
+ return offset .. val
+ end, lines)
+end
+
+local function remove_newlines(cmd)
+ cmd = trim_blankspace(cmd)
+ cmd = table.concat(cmd, ' ')
+ cmd = vim.split(cmd, '\n')
+ cmd = trim_blankspace(cmd)
+ cmd = table.concat(cmd, ' ')
+ return cmd
+end
+
+local function make_config_info(config)
+ local config_info = {}
+ config_info.name = config.name
+ if config.cmd then
+ config_info.cmd = remove_newlines(config.cmd)
+ if vim.fn.executable(config.cmd[1]) == 1 then
+ config_info.cmd_is_executable = 'true'
+ else
+ config_info.cmd_is_executable = error_messages.cmd_not_found
+ end
+ else
+ config_info.cmd = 'cmd not defined'
+ config_info.cmd_is_executable = 'NA'
+ end
+
+ local buffer_dir = vim.fn.expand '%:p:h'
+ config_info.root_dir = config.get_root_dir(buffer_dir) or 'NA'
+ config_info.autostart = (config.autostart and 'true') or 'false'
+ config_info.handlers = table.concat(vim.tbl_keys(config.handlers), ', ')
+ config_info.filetypes = table.concat(config.filetypes or {}, ', ')
+
+ local lines = {
+ 'Config: ' .. config_info.name,
+ }
+
+ local info_lines = {
+ 'filetypes: ' .. config_info.filetypes,
+ 'root directory: ' .. config_info.root_dir,
+ 'cmd: ' .. config_info.cmd,
+ 'cmd is executable: ' .. config_info.cmd_is_executable,
+ 'autostart: ' .. config_info.autostart,
+ 'custom handlers: ' .. config_info.handlers,
+ }
+
+ vim.list_extend(lines, indent_lines(info_lines, '\t'))
+
+ return lines
+end
+
+local function make_client_info(client)
+ local client_info = {}
+
+ client_info.cmd = remove_newlines(client.config.cmd)
+ if client.workspaceFolders then
+ client_info.root_dir = client.workspaceFolders[1].name
+ else
+ client_info.root_dir = 'Running in single file mode.'
+ end
+ client_info.filetypes = table.concat(client.config.filetypes or {}, ', ')
+ client_info.autostart = (client.config.autostart and 'true') or 'false'
+ client_info.attached_buffers_list = table.concat(vim.lsp.get_buffers_by_client_id(client.id), ', ')
+
+ local lines = {
+ '',
+ 'Client: '
+ .. client.name
+ .. ' (id: '
+ .. tostring(client.id)
+ .. ', pid: '
+ .. tostring(client.rpc.pid)
+ .. ', bufnr: ['
+ .. client_info.attached_buffers_list
+ .. '])',
+ }
+
+ local info_lines = {
+ 'filetypes: ' .. client_info.filetypes,
+ 'autostart: ' .. client_info.autostart,
+ 'root directory: ' .. client_info.root_dir,
+ 'cmd: ' .. client_info.cmd,
+ }
+
+ if client.config.lspinfo then
+ local server_specific_info = client.config.lspinfo(client.config)
+ info_lines = vim.list_extend(info_lines, server_specific_info)
+ end
+
+ vim.list_extend(lines, indent_lines(info_lines, '\t'))
+
+ return lines
+end
+
+return function()
+ -- These options need to be cached before switching to the floating
+ -- buffer.
+ local buf_clients = vim.lsp.buf_get_clients()
+ local clients = vim.lsp.get_active_clients()
+ local buffer_filetype = vim.bo.filetype
+
+ local win_info = windows.percentage_range_window(0.8, 0.7)
+ local bufnr, win_id = win_info.bufnr, win_info.win_id
+
+ local buf_lines = {}
+
+ local buf_client_names = {}
+ for _, client in pairs(buf_clients) do
+ table.insert(buf_client_names, client.name)
+ end
+
+ local buf_client_ids = {}
+ for _, client in pairs(buf_clients) do
+ table.insert(buf_client_ids, client.id)
+ end
+
+ local other_active_clients = {}
+ local client_names = {}
+ for _, client in pairs(clients) do
+ if not vim.tbl_contains(buf_client_ids, client.id) then
+ table.insert(other_active_clients, client)
+ end
+ table.insert(client_names, client.name)
+ end
+
+ local header = {
+ '',
+ 'Language client log: ' .. (vim.lsp.get_log_path()),
+ 'Detected filetype: ' .. buffer_filetype,
+ }
+ vim.list_extend(buf_lines, header)
+
+ local buffer_clients_header = {
+ '',
+ tostring(#vim.tbl_keys(buf_clients)) .. ' client(s) attached to this buffer: ',
+ }
+
+ vim.list_extend(buf_lines, buffer_clients_header)
+ for _, client in pairs(buf_clients) do
+ local client_info = make_client_info(client)
+ vim.list_extend(buf_lines, client_info)
+ end
+
+ local other_active_section_header = {
+ '',
+ tostring(#other_active_clients) .. ' active client(s) not attached to this buffer: ',
+ }
+ if not vim.tbl_isempty(other_active_clients) then
+ vim.list_extend(buf_lines, other_active_section_header)
+ end
+ for _, client in pairs(other_active_clients) do
+ local client_info = make_client_info(client)
+ vim.list_extend(buf_lines, client_info)
+ end
+
+ local other_matching_configs_header = {
+ '',
+ 'Other clients that match the filetype: ' .. buffer_filetype,
+ '',
+ }
+
+ local other_matching_configs = util.get_other_matching_providers(buffer_filetype)
+
+ if not vim.tbl_isempty(other_matching_configs) then
+ vim.list_extend(buf_lines, other_matching_configs_header)
+ for _, config in pairs(other_matching_configs) do
+ vim.list_extend(buf_lines, make_config_info(config))
+ end
+ end
+
+ local matching_config_header = {
+ '',
+ 'Configured servers list: ' .. table.concat(vim.tbl_keys(configs), ', '),
+ }
+ vim.list_extend(buf_lines, matching_config_header)
+
+ local fmt_buf_lines = indent_lines(buf_lines, ' ')
+
+ fmt_buf_lines = vim.lsp.util._trim(fmt_buf_lines, {})
+
+ vim.api.nvim_buf_set_lines(bufnr, 0, -1, true, fmt_buf_lines)
+ vim.api.nvim_buf_set_option(bufnr, 'modifiable', false)
+ vim.api.nvim_buf_set_option(bufnr, 'filetype', 'lspinfo')
+
+ vim.api.nvim_buf_set_keymap(bufnr, 'n', '<esc>', '<cmd>bd<CR>', { noremap = true })
+ vim.api.nvim_command(
+ string.format('autocmd BufHidden,BufLeave <buffer> ++once lua pcall(vim.api.nvim_win_close, %d, true)', win_id)
+ )
+
+ vim.fn.matchadd(
+ 'Error',
+ error_messages.no_filetype_defined .. '.\\|' .. 'cmd not defined\\|' .. error_messages.cmd_not_found
+ )
+ vim.cmd 'let m=matchadd("string", "true")'
+ vim.cmd 'let m=matchadd("error", "false")'
+ for _, config in pairs(configs) do
+ vim.fn.matchadd('Title', '\\%(Client\\|Config\\):.*\\zs' .. config.name .. '\\ze')
+ vim.fn.matchadd('Visual', 'list:.*\\zs' .. config.name .. '\\ze')
+ if config.filetypes then
+ for _, ft in pairs(config.filetypes) do
+ vim.fn.matchadd('Type', '\\%(filetypes\\|filetype\\):.*\\zs' .. ft .. '\\ze')
+ end
+ end
+ end
+end
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/ui/windows.lua b/start/lspconfig-0.1.3/lua/lspconfig/ui/windows.lua
new file mode 100644
index 0000000..8a39204
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/ui/windows.lua
@@ -0,0 +1,117 @@
+-- The following is extracted and modified from plenary.vnim by
+-- TJ Devries. It is not a stable API, and is expected to change
+--
+local function apply_defaults(original, defaults)
+ if original == nil then
+ original = {}
+ end
+
+ original = vim.deepcopy(original)
+
+ for k, v in pairs(defaults) do
+ if original[k] == nil then
+ original[k] = v
+ end
+ end
+
+ return original
+end
+
+local win_float = {}
+
+win_float.default_options = {
+ winblend = 15,
+ percentage = 0.9,
+}
+
+function win_float.default_opts(options)
+ options = apply_defaults(options, win_float.default_options)
+
+ local width = math.floor(vim.o.columns * options.percentage)
+ local height = math.floor(vim.o.lines * options.percentage)
+
+ local top = math.floor(((vim.o.lines - height) / 2) - 1)
+ local left = math.floor((vim.o.columns - width) / 2)
+
+ local opts = {
+ relative = 'editor',
+ row = top,
+ col = left,
+ width = width,
+ height = height,
+ style = 'minimal',
+ border = {
+ { ' ', 'NormalFloat' },
+ { ' ', 'NormalFloat' },
+ { ' ', 'NormalFloat' },
+ { ' ', 'NormalFloat' },
+ { ' ', 'NormalFloat' },
+ { ' ', 'NormalFloat' },
+ { ' ', 'NormalFloat' },
+ { ' ', 'NormalFloat' },
+ },
+ }
+
+ return opts
+end
+
+--- Create window that takes up certain percentags of the current screen.
+---
+--- Works regardless of current buffers, tabs, splits, etc.
+--@param col_range number | Table:
+-- If number, then center the window taking up this percentage of the screen.
+-- If table, first index should be start, second_index should be end
+--@param row_range number | Table:
+-- If number, then center the window taking up this percentage of the screen.
+-- If table, first index should be start, second_index should be end
+function win_float.percentage_range_window(col_range, row_range, options)
+ options = apply_defaults(options, win_float.default_options)
+
+ local win_opts = win_float.default_opts(options)
+ win_opts.relative = 'editor'
+
+ local height_percentage, row_start_percentage
+ if type(row_range) == 'number' then
+ assert(row_range <= 1)
+ assert(row_range > 0)
+ height_percentage = row_range
+ row_start_percentage = (1 - height_percentage) / 2
+ elseif type(row_range) == 'table' then
+ height_percentage = row_range[2] - row_range[1]
+ row_start_percentage = row_range[1]
+ else
+ error(string.format("Invalid type for 'row_range': %p", row_range))
+ end
+
+ win_opts.height = math.ceil(vim.o.lines * height_percentage)
+ win_opts.row = math.ceil(vim.o.lines * row_start_percentage)
+
+ local width_percentage, col_start_percentage
+ if type(col_range) == 'number' then
+ assert(col_range <= 1)
+ assert(col_range > 0)
+ width_percentage = col_range
+ col_start_percentage = (1 - width_percentage) / 2
+ elseif type(col_range) == 'table' then
+ width_percentage = col_range[2] - col_range[1]
+ col_start_percentage = col_range[1]
+ else
+ error(string.format("Invalid type for 'col_range': %p", col_range))
+ end
+
+ win_opts.col = math.floor(vim.o.columns * col_start_percentage)
+ win_opts.width = math.floor(vim.o.columns * width_percentage)
+
+ local bufnr = options.bufnr or vim.api.nvim_create_buf(false, true)
+ local win_id = vim.api.nvim_open_win(bufnr, true, win_opts)
+ vim.api.nvim_win_set_buf(win_id, bufnr)
+
+ vim.cmd 'setlocal nocursorcolumn ts=2 sw=2'
+
+ return {
+ bufnr = bufnr,
+ win_id = win_id,
+ }
+end
+
+return win_float
diff --git a/start/lspconfig-0.1.3/lua/lspconfig/util.lua b/start/lspconfig-0.1.3/lua/lspconfig/util.lua
new file mode 100644
index 0000000..3febafc
--- /dev/null
+++ b/start/lspconfig-0.1.3/lua/lspconfig/util.lua
@@ -0,0 +1,426 @@
+local vim = vim
+local validate = vim.validate
+local api = vim.api
+local lsp = vim.lsp
+local uv = vim.loop
+local fn = vim.fn
+
+local M = {}
+
+M.default_config = {
+ log_level = lsp.protocol.MessageType.Warning,
+ message_level = lsp.protocol.MessageType.Warning,
+ settings = vim.empty_dict(),
+ init_options = vim.empty_dict(),
+ handlers = {},
+ autostart = true,
+}
+
+-- global on_setup hook
+M.on_setup = nil
+
+function M.bufname_valid(bufname)
+ if bufname and bufname ~= '' and (bufname:match '^([a-zA-Z]:).*' or bufname:match '^/') then
+ return true
+ else
+ return false
+ end
+end
+
+function M.validate_bufnr(bufnr)
+ validate {
+ bufnr = { bufnr, 'n' },
+ }
+ return bufnr == 0 and api.nvim_get_current_buf() or bufnr
+end
+
+function M.add_hook_before(func, new_fn)
+ if func then
+ return function(...)
+ -- TODO which result?
+ new_fn(...)
+ return func(...)
+ end
+ else
+ return new_fn
+ end
+end
+
+function M.add_hook_after(func, new_fn)
+ if func then
+ return function(...)
+ -- TODO which result?
+ func(...)
+ return new_fn(...)
+ end
+ else
+ return new_fn
+ end
+end
+
+function M.create_module_commands(module_name, commands)
+ for command_name, def in pairs(commands) do
+ local parts = { 'command!' }
+ -- Insert attributes.
+ for k, v in pairs(def) do
+ if type(k) == 'string' and type(v) == 'boolean' and v then
+ table.insert(parts, '-' .. k)
+ elseif type(k) == 'number' and type(v) == 'string' and v:match '^%-' then
+ table.insert(parts, v)
+ end
+ end
+ table.insert(parts, command_name)
+ -- The command definition.
+ table.insert(
+ parts,
+ string.format("lua require'lspconfig'[%q].commands[%q][1](<f-args>)", module_name, command_name)
+ )
+ api.nvim_command(table.concat(parts, ' '))
+ end
+end
+
+function M.has_bins(...)
+ for i = 1, select('#', ...) do
+ if 0 == fn.executable((select(i, ...))) then
+ return false
+ end
+ end
+ return true
+end
+
+M.script_path = function()
+ local str = debug.getinfo(2, 'S').source:sub(2)
+ return str:match '(.*[/\\])'
+end
+
+-- Some path utilities
+M.path = (function()
+ local is_windows = uv.os_uname().version:match 'Windows'
+
+ local function sanitize(path)
+ if is_windows then
+ path = path:sub(1, 1):upper() .. path:sub(2)
+ path = path:gsub('\\', '/')
+ end
+ return path
+ end
+
+ local function exists(filename)
+ local stat = uv.fs_stat(filename)
+ return stat and stat.type or false
+ end
+
+ local function is_dir(filename)
+ return exists(filename) == 'directory'
+ end
+
+ local function is_file(filename)
+ return exists(filename) == 'file'
+ end
+
+ local function is_fs_root(path)
+ if is_windows then
+ return path:match '^%a:$'
+ else
+ return path == '/'
+ end
+ end
+
+ local function is_absolute(filename)
+ if is_windows then
+ return filename:match '^%a:' or filename:match '^\\\\'
+ else
+ return filename:match '^/'
+ end
+ end
+
+ local function dirname(path)
+ local strip_dir_pat = '/([^/]+)$'
+ local strip_sep_pat = '/$'
+ if not path or #path == 0 then
+ return
+ end
+ local result = path:gsub(strip_sep_pat, ''):gsub(strip_dir_pat, '')
+ if #result == 0 then
+ if is_windows then
+ return path:sub(1, 2):upper()
+ else
+ return '/'
+ end
+ end
+ return result
+ end
+
+ local function path_join(...)
+ return table.concat(vim.tbl_flatten { ... }, '/')
+ end
+
+ -- Traverse the path calling cb along the way.
+ local function traverse_parents(path, cb)
+ path = uv.fs_realpath(path)
+ local dir = path
+ -- Just in case our algo is buggy, don't infinite loop.
+ for _ = 1, 100 do
+ dir = dirname(dir)
+ if not dir then
+ return
+ end
+ -- If we can't ascend further, then stop looking.
+ if cb(dir, path) then
+ return dir, path
+ end
+ if is_fs_root(dir) then
+ break
+ end
+ end
+ end
+
+ -- Iterate the path until we find the rootdir.
+ local function iterate_parents(path)
+ local function it(_, v)
+ if v and not is_fs_root(v) then
+ v = dirname(v)
+ else
+ return
+ end
+ if v and uv.fs_realpath(v) then
+ return v, path
+ else
+ return
+ end
+ end
+ return it, path, path
+ end
+
+ local function is_descendant(root, path)
+ if not path then
+ return false
+ end
+
+ local function cb(dir, _)
+ return dir == root
+ end
+
+ local dir, _ = traverse_parents(path, cb)
+
+ return dir == root
+ end
+
+ return {
+ is_dir = is_dir,
+ is_file = is_file,
+ is_absolute = is_absolute,
+ exists = exists,
+ dirname = dirname,
+ join = path_join,
+ sanitize = sanitize,
+ traverse_parents = traverse_parents,
+ iterate_parents = iterate_parents,
+ is_descendant = is_descendant,
+ }
+end)()
+
+-- Returns a function(root_dir), which, when called with a root_dir it hasn't
+-- seen before, will call make_config(root_dir) and start a new client.
+function M.server_per_root_dir_manager(make_config)
+ local clients = {}
+ local single_file_clients = {}
+ local manager = {}
+
+ function manager.add(root_dir, single_file)
+ local client_id
+ -- This is technically unnecessary, as lspconfig's path utilities should be hermetic,
+ -- however users are free to return strings in custom root resolvers.
+ root_dir = M.path.sanitize(root_dir)
+ if single_file then
+ client_id = single_file_clients[root_dir]
+ elseif root_dir and M.path.is_dir(root_dir) then
+ client_id = clients[root_dir]
+ else
+ return
+ end
+
+ -- Check if we have a client already or start and store it.
+ if not client_id then
+ local new_config = make_config(root_dir)
+ -- do nothing if the client is not enabled
+ if new_config.enabled == false then
+ return
+ end
+ if not new_config.cmd then
+ vim.notify(
+ string.format(
+ '[lspconfig] cmd not defined for %q. Manually set cmd in the setup {} call according to server_configurations.md, see :help lspconfig-index.',
+ new_config.name
+ ),
+ vim.log.levels.ERROR
+ )
+ return
+ end
+ new_config.on_exit = M.add_hook_before(new_config.on_exit, function()
+ clients[root_dir] = nil
+ single_file_clients[root_dir] = nil
+ end)
+
+ -- Launch the server in the root directory used internally by lspconfig, if otherwise unset
+ -- also check that the path exist
+ if not new_config.cmd_cwd and uv.fs_realpath(root_dir) then
+ new_config.cmd_cwd = root_dir
+ end
+
+ -- Sending rootDirectory and workspaceFolders as null is not explicitly
+ -- codified in the spec. Certain servers crash if initialized with a NULL
+ -- root directory.
+ if single_file then
+ new_config.root_dir = nil
+ new_config.workspace_folders = nil
+ end
+ client_id = lsp.start_client(new_config)
+
+ -- Handle failures in start_client
+ if not client_id then
+ return
+ end
+
+ if single_file then
+ single_file_clients[root_dir] = client_id
+ else
+ clients[root_dir] = client_id
+ end
+ end
+ return client_id
+ end
+
+ function manager.clients()
+ local res = {}
+ for _, id in pairs(clients) do
+ local client = lsp.get_client_by_id(id)
+ if client then
+ table.insert(res, client)
+ end
+ end
+ return res
+ end
+
+ return manager
+end
+
+function M.search_ancestors(startpath, func)
+ validate { func = { func, 'f' } }
+ if func(startpath) then
+ return startpath
+ end
+ local guard = 100
+ for path in M.path.iterate_parents(startpath) do
+ -- Prevent infinite recursion if our algorithm breaks
+ guard = guard - 1
+ if guard == 0 then
+ return
+ end
+
+ if func(path) then
+ return path
+ end
+ end
+end
+
+function M.root_pattern(...)
+ local patterns = vim.tbl_flatten { ... }
+ local function matcher(path)
+ for _, pattern in ipairs(patterns) do
+ for _, p in ipairs(vim.fn.glob(M.path.join(path, pattern), true, true)) do
+ if M.path.exists(p) then
+ return path
+ end
+ end
+ end
+ end
+ return function(startpath)
+ return M.search_ancestors(startpath, matcher)
+ end
+end
+function M.find_git_ancestor(startpath)
+ return M.search_ancestors(startpath, function(path)
+ -- Support git directories and git files (worktrees)
+ if M.path.is_dir(M.path.join(path, '.git')) or M.path.is_file(M.path.join(path, '.git')) then
+ return path
+ end
+ end)
+end
+function M.find_node_modules_ancestor(startpath)
+ return M.search_ancestors(startpath, function(path)
+ if M.path.is_dir(M.path.join(path, 'node_modules')) then
+ return path
+ end
+ end)
+end
+function M.find_package_json_ancestor(startpath)
+ return M.search_ancestors(startpath, function(path)
+ if M.path.is_file(M.path.join(path, 'package.json')) then
+ return path
+ end
+ end)
+end
+
+function M.get_active_clients_list_by_ft(filetype)
+ local clients = vim.lsp.get_active_clients()
+ local clients_list = {}
+ for _, client in pairs(clients) do
+ local filetypes = client.config.filetypes or {}
+ for _, ft in pairs(filetypes) do
+ if ft == filetype then
+ table.insert(clients_list, client.name)
+ end
+ end
+ end
+ return clients_list
+end
+
+function M.get_other_matching_providers(filetype)
+ local configs = require 'lspconfig.configs'
+ local active_clients_list = M.get_active_clients_list_by_ft(filetype)
+ local other_matching_configs = {}
+ for _, config in pairs(configs) do
+ if not vim.tbl_contains(active_clients_list, config.name) then
+ local filetypes = config.filetypes or {}
+ for _, ft in pairs(filetypes) do
+ if ft == filetype then
+ table.insert(other_matching_configs, config)
+ end
+ end
+ end
+ end
+ return other_matching_configs
+end
+
+function M.get_clients_from_cmd_args(arg)
+ local result = {}
+ for id in (arg or ''):gmatch '(%d+)' do
+ result[id] = vim.lsp.get_client_by_id(tonumber(id))
+ end
+ if vim.tbl_isempty(result) then
+ return M.get_managed_clients()
+ end
+ return vim.tbl_values(result)
+end
+
+function M.get_active_client_by_name(bufnr, servername)
+ for _, client in pairs(vim.lsp.buf_get_clients(bufnr)) do
+ if client.name == servername then
+ return client
+ end
+ end
+end
+
+function M.get_managed_clients()
+ local configs = require 'lspconfig.configs'
+ local clients = {}
+ for _, config in pairs(configs) do
+ if config.manager then
+ vim.list_extend(clients, config.manager.clients())
+ end
+ end
+ return clients
+end
+
+return M