diff options
| author | atusy <30277794+atusy@users.noreply.github.com> | 2026-02-24 19:40:31 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-24 05:40:31 -0500 |
| commit | 6b688a87d23666df11677e04cd71a5cfad4973df (patch) | |
| tree | dd95621c625f0311b0d2aae611beab14c3a03c3b | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-6b688a87d23666df11677e04cd71a5cfad4973df.tar nvim-lspconfig-6b688a87d23666df11677e04cd71a5cfad4973df.tar.gz nvim-lspconfig-6b688a87d23666df11677e04cd71a5cfad4973df.tar.bz2 nvim-lspconfig-6b688a87d23666df11677e04cd71a5cfad4973df.tar.lz nvim-lspconfig-6b688a87d23666df11677e04cd71a5cfad4973df.tar.xz nvim-lspconfig-6b688a87d23666df11677e04cd71a5cfad4973df.tar.zst nvim-lspconfig-6b688a87d23666df11677e04cd71a5cfad4973df.zip | |
feat: kakehashi #4317
Tree-sitter-based language server that bridges languages, editors,
and tooling — providing semantic tokens, selection ranges, and LSP
bridging for embedded languages (e.g., code blocks in Markdown).
| -rw-r--r-- | lsp/kakehashi.lua | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lsp/kakehashi.lua b/lsp/kakehashi.lua new file mode 100644 index 00000000..b37ff7b6 --- /dev/null +++ b/lsp/kakehashi.lua @@ -0,0 +1,41 @@ +--- @brief +--- +--- https://github.com/atusy/kakehashi +--- +--- Tree-sitter-based language server that provides semantic tokens, selection ranges, +--- and LSP bridging for embedded languages (e.g., code blocks in Markdown). +--- +--- kakehashi works with any language that has a Tree-sitter grammar. +--- Parsers and queries are automatically installed on first use +--- when `autoInstall` is enabled (the default). This requires the +--- `tree-sitter` CLI, a C compiler, and Git. +--- +--- **You must specify `filetypes` in your call to `vim.lsp.config`** to +--- restrict which files activate the server: +--- +--- ```lua +--- vim.lsp.config('kakehashi', { +--- filetypes = { 'markdown', 'lua', 'rust', 'python' }, +--- init_options = { +--- autoInstall = true, +--- -- Optional: bridge LSP requests in injection regions +--- languageServers = { +--- ['lua_ls'] = { +--- cmd = { 'lua-language-server' }, +--- languages = { 'lua' }, +--- }, +--- }, +--- languages = { +--- markdown = { +--- bridge = { lua_ls = { enabled = true } }, +--- }, +--- }, +--- }, +--- }) +--- ``` + +---@type vim.lsp.Config +return { + cmd = { 'kakehashi' }, + root_markers = { 'kakehashi.toml', '.git' }, +} |
