1

Update generated neovim config

This commit is contained in:
2024-09-22 20:41:25 +02:00
parent 1743764e48
commit aa1271c42c
1247 changed files with 26512 additions and 15067 deletions

View File

@ -27,6 +27,10 @@ local function server_alias(name)
to = 'lua_ls',
version = '0.2.0',
},
tsserver = {
to = 'ts_ls',
version = '0.2.0',
},
}
return aliases[name]

View File

@ -10,6 +10,10 @@ return {
cmd = { bin_name },
filetypes = { 'ada' },
root_dir = util.root_pattern('Makefile', '.git', '*.gpr', '*.adc'),
deprecate = {
to = 'github.com/TamaMcGlinn/nvim-lspconfig-ada',
version = '0.2.0',
},
},
docs = {
description = [[

View File

@ -21,6 +21,31 @@ local function switch_source_header(bufnr)
end
end
local function symbol_info()
local bufnr = vim.api.nvim_get_current_buf()
local clangd_client = util.get_active_client_by_name(bufnr, 'clangd')
if not clangd_client or not clangd_client.supports_method 'textDocument/symbolInfo' then
return vim.notify('Clangd client not found', vim.log.levels.ERROR)
end
local params = vim.lsp.util.make_position_params()
clangd_client.request('textDocument/symbolInfo', params, function(err, res)
if err or #res == 0 then
-- Clangd always returns an error, there is not reason to parse it
return
end
local container = string.format('container: %s', res[1].containerName) ---@type string
local name = string.format('name: %s', res[1].name) ---@type string
vim.lsp.util.open_floating_preview({ name, container }, '', {
height = 2,
width = math.max(string.len(name), string.len(container)),
focusable = false,
focus = false,
border = require('lspconfig.ui.windows').default_options.border or 'single',
title = 'Symbol Info',
})
end, bufnr)
end
local root_files = {
'.clangd',
'.clang-tidy',
@ -56,6 +81,12 @@ return {
end,
description = 'Switch between source/header',
},
ClangdShowSymbolInfo = {
function()
symbol_info()
end,
description = 'Show symbol info',
},
},
docs = {
description = [[

View File

@ -0,0 +1,28 @@
local util = require 'lspconfig.util'
local root_files = {
'Gothic.src',
'Camera.src',
'Menu.src',
'Music.src',
'ParticleFX.src',
'SFX.src',
'VisualFX.src',
}
return {
default_config = {
cmd = { 'DaedalusLanguageServer' },
filetypes = { 'd' },
root_dir = util.root_pattern(unpack(root_files)),
settings = {
DaedalusLanguageServer = {
loglevel = 'debug',
inlayHints = { constants = true },
numParserThreads = 16,
fileEncoding = 'Windows-1252',
srcFileEncoding = 'Windows-1252',
},
},
},
}

View File

@ -17,7 +17,7 @@ return {
},
docs = {
description = [[
https://github.com/gnikit/fortls
https://fortls.fortran-lang.org/index.html
fortls is a Fortran Language Server, the server can be installed via pip
@ -27,7 +27,7 @@ pip install fortls
Settings to the server can be passed either through the `cmd` option or through
a local configuration file e.g. `.fortls`. For more information
see the `fortls` [documentation](https://gnikit.github.io/fortls/options.html).
see the `fortls` [documentation](https://fortls.fortran-lang.org/options.html).
]],
default_config = {
root_dir = [[root_pattern(".fortls")]],

View File

@ -1,18 +1,33 @@
local util = require 'lspconfig.util'
local function find_hxml(path)
return vim.fs.find(function(name)
return name:match '.hxml$'
end, { path = path, type = 'file' })
end
return {
default_config = {
cmd = { 'haxe-language-server' },
filetypes = { 'haxe' },
root_dir = util.root_pattern '*.hxml',
root_dir = util.root_pattern('*.hxml', '.git'),
settings = {
haxe = {
executable = 'haxe',
},
},
init_options = {
displayArguments = { 'build.hxml' },
},
init_options = {},
on_new_config = function(new_config, new_root_dir)
if new_config.init_options.displayArguments then
return
end
local hxml = find_hxml(new_root_dir)[1]
if hxml then
vim.notify('Using HXML: ' .. hxml)
new_config.init_options.displayArguments = { hxml }
end
end,
},
docs = {
description = [[
@ -36,12 +51,24 @@ lspconfig.haxe_language_server.setup({
})
```
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.
By default, the language server is configured with the HXML compiler arguments
contained in the first `.hxml` file found in your project's root directory.
If you want to specify which one to use, set the `init_options.displayArguments`
setting:
```lua
lspconfig.haxe_language_server.setup({
-- ...
init_options = {
displayArguments = { "build.hxml" },
},
})
```
]],
default_config = {
root_dir = [[root_pattern("*.hxml")]],
root_dir = [[root_pattern("*.hxml", ".git")]],
init_options = 'default value is set by on_new_config',
},
},
}

View File

@ -3,7 +3,54 @@ local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'htmx-lsp' },
filetypes = { 'html', 'templ' },
filetypes = { -- filetypes copied and adjusted from tailwindcss-intellisense
-- html
'aspnetcorerazor',
'astro',
'astro-markdown',
'blade',
'clojure',
'django-html',
'htmldjango',
'edge',
'eelixir', -- vim ft
'elixir',
'ejs',
'erb',
'eruby', -- vim ft
'gohtml',
'gohtmltmpl',
'haml',
'handlebars',
'hbs',
'html',
'htmlangular',
'html-eex',
'heex',
'jade',
'leaf',
'liquid',
'markdown',
'mdx',
'mustache',
'njk',
'nunjucks',
'php',
'razor',
'slim',
'twig',
-- js
'javascript',
'javascriptreact',
'reason',
'rescript',
'typescript',
'typescriptreact',
-- mixed
'vue',
'svelte',
'templ',
},
single_file_support = true,
root_dir = function(fname)
return util.find_git_ancestor(fname)

View File

@ -3,7 +3,7 @@ local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'hyprls', '--stdio' },
filetypes = { 'hyprlang', '*.hl', 'hypr*.conf', '.config/hypr/*.conf' },
filetypes = { 'hyprlang' },
root_dir = util.find_git_ancestor,
single_file_support = true,
},

View File

@ -22,7 +22,7 @@ vscode-json-language-server, a language server for JSON and JSON schema
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.
`vscode-json-language-server` only provides completions when snippet support is enabled. If you use Neovim older than v0.10 you need 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

View File

@ -0,0 +1,20 @@
local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'kcl-language-server' },
filetypes = { 'kcl' },
root_dir = util.root_pattern '.git',
},
docs = {
description = [[
https://github.com/kcl-lang/kcl.nvim
Language server for the KCL configuration and policy language.
]],
default_config = {
root_dir = [[root_pattern(".git")]],
},
},
}

View File

@ -4,7 +4,7 @@ return {
default_config = {
cmd = { 'mesonlsp', '--lsp' },
filetypes = { 'meson' },
root_dir = util.root_pattern('meson_options.txt', 'meson.options', '.git'),
root_dir = util.root_pattern('meson.build', 'meson_options.txt', 'meson.options', '.git'),
},
docs = {
description = [[
@ -13,7 +13,7 @@ https://github.com/JCWasmx86/mesonlsp
An unofficial, unendorsed language server for meson written in C++
]],
default_config = {
root_dir = [[util.root_pattern("meson_options.txt", "meson.options", ".git")]],
root_dir = [[util.root_pattern("meson.build", "meson_options.txt", "meson.options", ".git")]],
},
},
}

View File

@ -2,7 +2,7 @@ local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'R', '--slave', '-e', 'languageserver::run()' },
cmd = { 'R', '--no-echo', '-e', 'languageserver::run()' },
filetypes = { 'r', 'rmd' },
root_dir = function(fname)
return util.find_git_ancestor(fname) or vim.loop.os_homedir()

View File

@ -8,7 +8,17 @@ return {
settings = {},
init_options = {
extensionConfiguration = {
-- buggy, prompts much too often, superseded by incrementalTypechecking, below
askToStartBuild = false,
allowBuiltInFormatter = true, -- lower latency
incrementalTypechecking = { -- removes the need for external build process
enabled = true,
acrossFiles = true,
},
cache = { projectConfig = { enabled = true } }, -- speed up latency dramatically
codeLens = true,
inlayHints = { enable = true },
},
},
},
@ -21,7 +31,21 @@ ReScript Language Server can be installed via npm:
npm install -g @rescript/language-server
```
See the init_options supported (see https://github.com/rescript-lang/rescript-vscode/tree/master/server/config.md):
See [package.json](https://github.com/rescript-lang/rescript-vscode/blob/master/package.json#L139)
for init_options supported.
For example, in order to disable the `inlayHints` option:
```lua
require'lspconfig'.pylsp.setup{
settings = {
rescript = {
settings = {
inlayHints = { enable = false },
},
},
}
}
```
]],
root_dir = [[root_pattern('bsconfig.json', 'rescript.json', '.git')]],
},

View File

@ -1,6 +1,5 @@
local util = require 'lspconfig.util'
local bin_name = 'scheme-langserver'
local cmd = { bin_name }
local cmd = { 'scheme-langserver', '~/.scheme-langserver.log', 'enable', 'disable' }
local root_files = {
'Akku.manifest',
'.git',

View File

@ -0,0 +1,19 @@
local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'snakeskin-cli', 'lsp', '--stdio' },
filetypes = { 'ss' },
root_dir = util.root_pattern 'package.json',
},
docs = {
description = [[
https://www.npmjs.com/package/@snakeskin/cli
`snakeskin cli` can be installed via `npm`:
```sh
npm install -g @snakeskin/cli
```
]],
},
}

View File

@ -10,7 +10,7 @@ return {
description = [[
https://github.com/sveltejs/language-tools/tree/master/packages/language-server
Note: assuming that [tsserver](#tsserver) is setup, full JavaScript/TypeScript support (find references, rename, etc of symbols in Svelte files when working in JS/TS files) requires per-project installation and configuration of [typescript-svelte-plugin](https://github.com/sveltejs/language-tools/tree/master/packages/typescript-plugin#usage).
Note: assuming that [ts_ls](#ts_ls) is setup, full JavaScript/TypeScript support (find references, rename, etc of symbols in Svelte files when working in JS/TS files) requires per-project installation and configuration of [typescript-svelte-plugin](https://github.com/sveltejs/language-tools/tree/master/packages/typescript-plugin#usage).
`svelte-language-server` can be installed via `npm`:
```sh

View File

@ -4,7 +4,7 @@ return {
default_config = {
cmd = { 'Swift-MesonLSP', '--lsp' },
filetypes = { 'meson' },
root_dir = util.root_pattern('meson_options.txt', 'meson.options', '.git'),
root_dir = util.root_pattern('meson.build', 'meson_options.txt', 'meson.options', '.git'),
},
docs = {
description = [[
@ -13,7 +13,7 @@ https://github.com/JCWasmx86/Swift-MesonLSP
Meson language server written in Swift
]],
default_config = {
root_dir = [[util.root_pattern("meson_options.txt", "meson.options", ".git")]],
root_dir = [[util.root_pattern("meson.build", "meson_options.txt", "meson.options", ".git")]],
},
},
}

View File

@ -4,9 +4,7 @@ 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,
root_dir = util.find_git_ancestor,
single_file_support = true,
},
docs = {

View File

@ -4,14 +4,11 @@ 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'),
root_dir = util.root_pattern 'tlconfig.lua',
},
docs = {
description = [[
@ -19,11 +16,16 @@ https://github.com/teal-language/teal-language-server
Install with:
```
luarocks install --dev teal-language-server
luarocks install teal-language-server
```
Optional Command Args:
* "--log-mode=by_date" - Enable logging in $HOME/.cache/teal-language-server. Log name will be date + pid of process
* "--log-mode=by_proj_path" - Enable logging in $HOME/.cache/teal-language-server. Log name will be project path + pid of process
* "--verbose=true" - Increases log level. Does nothing unless log-mode is set
]],
default_config = {
root_dir = [[root_pattern("tlconfig.lua", ".git")]],
root_dir = [[root_pattern("tlconfig.lua")]],
},
},
}

View File

@ -14,16 +14,11 @@ local texlab_forward_status = {
[3] = 'Unconfigured',
}
local function buf_build(bufnr)
bufnr = util.validate_bufnr(bufnr)
local function buf_build()
local bufnr = vim.api.nvim_get_current_buf()
local texlab_client = util.get_active_client_by_name(bufnr, 'texlab')
local pos = vim.api.nvim_win_get_cursor(0)
local params = {
textDocument = { uri = vim.uri_from_bufnr(bufnr) },
position = { line = pos[1] - 1, character = pos[2] },
}
if texlab_client then
texlab_client.request('textDocument/build', params, function(err, result)
texlab_client.request('textDocument/build', vim.lsp.util.make_position_params(), function(err, result)
if err then
error(tostring(err))
end
@ -37,16 +32,11 @@ local function buf_build(bufnr)
end
end
local function buf_search(bufnr)
bufnr = util.validate_bufnr(bufnr)
local function buf_search()
local bufnr = vim.api.nvim_get_current_buf()
local texlab_client = util.get_active_client_by_name(bufnr, 'texlab')
local pos = vim.api.nvim_win_get_cursor(0)
local params = {
textDocument = { uri = vim.uri_from_bufnr(bufnr) },
position = { line = pos[1] - 1, character = pos[2] },
}
if texlab_client then
texlab_client.request('textDocument/forwardSearch', params, function(err, result)
texlab_client.request('textDocument/forwardSearch', vim.lsp.util.make_position_params(), function(err, result)
if err then
error(tostring(err))
end
@ -60,8 +50,8 @@ local function buf_search(bufnr)
end
end
local function buf_cancel_build(bufnr)
bufnr = util.validate_bufnr(bufnr)
local function buf_cancel_build()
local bufnr = vim.api.nvim_get_current_buf()
if not util.get_active_client_by_name(bufnr, 'texlab') then
return vim.notify('Texlab client not found', vim.log.levels.ERROR)
end
@ -69,8 +59,8 @@ local function buf_cancel_build(bufnr)
vim.notify('Build cancelled', vim.log.levels.INFO)
end
local function dependency_graph(bufnr)
bufnr = util.validate_bufnr(bufnr)
local function dependency_graph()
local bufnr = vim.api.nvim_get_current_buf()
local texlab_client = util.get_active_client_by_name(bufnr, 'texlab')
if not texlab_client then
return vim.notify('Texlab client not found', vim.log.levels.ERROR)
@ -83,8 +73,8 @@ local function dependency_graph(bufnr)
end, 0)
end
local function cleanArtifacts(bufnr)
bufnr = util.validate_bufnr(bufnr)
local function cleanArtifacts()
local bufnr = vim.api.nvim_get_current_buf()
if not util.get_active_client_by_name(bufnr, 'texlab') then
return vim.notify('Texlab client not found', vim.log.levels.ERROR)
end
@ -95,8 +85,8 @@ local function cleanArtifacts(bufnr)
vim.notify('Artifacts cleaned successfully', vim.log.levels.INFO)
end
local function cleanAuxiliary(bufnr)
bufnr = util.validate_bufnr(bufnr)
local function cleanAuxiliary()
local bufnr = vim.api.nvim_get_current_buf()
if not util.get_active_client_by_name(bufnr, 'texlab') then
return vim.notify('Texlab client not found', vim.log.levels.ERROR)
end
@ -107,31 +97,41 @@ local function cleanAuxiliary(bufnr)
vim.notify('Auxiliary files cleaned successfully', vim.log.levels.INFO)
end
local function buf_find_envs(bufnr)
bufnr = util.validate_bufnr(bufnr)
local function buf_find_envs()
local bufnr = vim.api.nvim_get_current_buf()
local texlab_client = util.get_active_client_by_name(bufnr, 'texlab')
if not texlab_client then
return vim.notify('Texlab client not found', vim.log.levels.ERROR)
end
local pos = vim.api.nvim_win_get_cursor(0)
texlab_client.request('workspace/executeCommand', {
command = 'texlab.findEnvironments',
arguments = {
{
textDocument = { uri = vim.uri_from_bufnr(bufnr) },
position = { line = pos[1] - 1, character = pos[2] },
},
},
arguments = { vim.lsp.util.make_position_params() },
}, function(err, result)
if err then
return vim.notify(err.code .. ': ' .. err.message, vim.log.levels.ERROR)
end
return vim.notify('The environments are:\n' .. vim.inspect(result), vim.log.levels.INFO)
local env_names = {}
local max_length = 1
for _, env in ipairs(result) do
table.insert(env_names, env.name.text)
max_length = math.max(max_length, string.len(env.name.text))
end
for i, name in ipairs(env_names) do
env_names[i] = string.rep(' ', i - 1) .. name
end
vim.lsp.util.open_floating_preview(env_names, '', {
height = #env_names,
width = math.max((max_length + #env_names - 1), (string.len 'Environments')),
focusable = false,
focus = false,
border = require('lspconfig.ui.windows').default_options.border or 'single',
title = 'Environments',
})
end, bufnr)
end
local function buf_change_env(bufnr)
bufnr = util.validate_bufnr(bufnr)
local function buf_change_env()
local bufnr = vim.api.nvim_get_current_buf()
if not util.get_active_client_by_name(bufnr, 'texlab') then
return vim.notify('Texlab client not found', vim.log.levels.ERROR)
end
@ -152,18 +152,6 @@ local function buf_change_env(bufnr)
}
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' },
@ -202,49 +190,49 @@ return {
commands = {
TexlabBuild = {
function()
buf_build(0)
buf_build()
end,
description = 'Build the current buffer',
},
TexlabForward = {
function()
buf_search(0)
buf_search()
end,
description = 'Forward search from current position',
},
TexlabCancelBuild = {
function()
buf_cancel_build(0)
buf_cancel_build()
end,
description = 'Cancel the current build',
},
TexlabDependencyGraph = {
function()
dependency_graph(0)
dependency_graph()
end,
description = 'Show the dependency graph',
},
TexlabCleanArtifacts = {
function()
cleanArtifacts(0)
cleanArtifacts()
end,
description = 'Clean the artifacts',
},
TexlabCleanAuxiliary = {
function()
cleanAuxiliary(0)
cleanAuxiliary()
end,
description = 'Clean the auxiliary files',
},
TexlabFindEnvironments = {
function()
buf_find_envs(0)
buf_find_envs()
end,
description = 'Find the environments at current position',
},
TexlabChangeEnvironment = {
function()
buf_change_env(0)
buf_change_env()
end,
description = 'Change the environment at current position',
},

View File

@ -19,6 +19,8 @@ return {
description = [[
https://github.com/typescript-language-server/typescript-language-server
`ts_ls`, aka `typescript-language-server`, is a Language Server Protocol implementation for TypeScript wrapping `tsserver`. Note that `ts_ls` is not `tsserver`.
`typescript-language-server` depends on `typescript`. Both packages can be installed via `npm`:
```sh
npm install -g typescript typescript-language-server
@ -52,7 +54,7 @@ adds Vue support to this language server.
*IMPORTANT*: It is crucial to ensure that `@vue/typescript-plugin` and `volar `are of identical versions.
```lua
require'lspconfig'.tsserver.setup{
require'lspconfig'.ts_ls.setup{
init_options = {
plugins = {
{

View File

@ -0,0 +1,19 @@
local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'python', '-m', 'ffi_navigator.langserver' },
filetypes = { 'python', 'cpp' },
root_dir = util.root_pattern('pyproject.toml', '.git'),
},
docs = {
description = [[
https://github.com/tqchen/ffi-navigator
The Language Server for FFI calls in TVM to be able jump between python and C++
FFI navigator can be installed with `pip install ffi-navigator`, buf for more details, please see
https://github.com/tqchen/ffi-navigator?tab=readme-ov-file#installation
]],
},
}

View File

@ -3,7 +3,6 @@ local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'typos-lsp' },
filetypes = { '*' },
root_dir = util.root_pattern('typos.toml', '_typos.toml', '.typos.toml'),
single_file_support = true,
settings = {},

View File

@ -8,11 +8,11 @@ return {
},
docs = {
description = [[
https://github.com/v-analyzer/v-analyzer
https://github.com/vlang/v-analyzer
V language server.
`v-analyzer` can be installed by following the instructions [here](https://github.com/v-analyzer/v-analyzer#installation).
`v-analyzer` can be installed by following the instructions [here](https://github.com/vlang/v-analyzer#installation).
]],
default_config = {
root_dir = [[root_pattern("v.mod", ".git")]],

View File

@ -44,8 +44,8 @@ Volar by default supports Vue 3 projects. Vue 2 projects need
[additional configuration](https://github.com/vuejs/language-tools/tree/master/packages/vscode-vue#usage).
**TypeScript support**
As of release 2.0.0, Volar no longer wraps around tsserver. For typescript
support, `tsserver` needs to be configured with the `@vue/typescript-plugin`
As of release 2.0.0, Volar no longer wraps around ts_ls. For typescript
support, `ts_ls` needs to be configured with the `@vue/typescript-plugin`
plugin.
**Take Over Mode**

View File

@ -17,7 +17,7 @@ cargo install --git https://github.com/wgsl-analyzer/wgsl-analyzer wgsl_analyzer
```
]],
default_config = {
root_dir = [[root_pattern(".git"]],
root_dir = [[root_pattern(".git")]],
},
},
}

View File

@ -0,0 +1,21 @@
local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'ziggy', 'lsp' },
filetypes = { 'ziggy' },
root_dir = util.find_git_ancestor,
single_file_support = true,
},
docs = {
description = [[
https://ziggy-lang.io/documentation/ziggy-lsp/
Language server for the Ziggy data serialization format
]],
default_config = {
root_dir = [[util.find_git_ancestor]],
},
},
}

View File

@ -0,0 +1,21 @@
local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'ziggy', 'lsp', '--schema' },
filetypes = { 'ziggy_schema' },
root_dir = util.find_git_ancestor,
single_file_support = true,
},
docs = {
description = [[
https://ziggy-lang.io/documentation/ziggy-lsp/
Language server for schema files of the Ziggy data serialization format
]],
default_config = {
root_dir = [[util.find_git_ancestor]],
},
},
}

View File

@ -1,5 +1,13 @@
local util = require 'lspconfig.util'
local function find_zk_root(startpath)
for dir in vim.fs.parents(startpath) do
if vim.fn.isdirectory(vim.fs.joinpath(dir, '.zk')) == 1 then
return dir
end
end
end
return {
default_config = {
cmd = { 'zk', 'lsp' },
@ -16,6 +24,29 @@ return {
end,
description = 'ZkIndex',
},
ZkList = {
function()
local bufpath = vim.api.nvim_buf_get_name(0)
local root = find_zk_root(bufpath)
vim.lsp.buf_request(0, 'workspace/executeCommand', {
command = 'zk.list',
arguments = { root, { select = { 'path' } } },
}, function(_, result, _, _)
if not result then
return
end
local paths = vim.tbl_map(function(item)
return item.path
end, result)
vim.ui.select(paths, {}, function(choice)
vim.cmd('edit ' .. choice)
end)
end)
end,
description = 'ZkList',
},
ZkNew = {
function(...)
vim.lsp.buf_request(0, 'workspace/executeCommand', {