From f69a19a4bd00ad92843b903db3d5967d11095edd Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 30 Oct 2025 09:24:20 +0530 Subject: Dumb snippets --- autoload/lsp-config.kak | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'autoload/lsp-config.kak') diff --git a/autoload/lsp-config.kak b/autoload/lsp-config.kak index 22ed178..c9af393 100644 --- a/autoload/lsp-config.kak +++ b/autoload/lsp-config.kak @@ -9,18 +9,18 @@ lsp-enable lsp-inlay-diagnostics-enable global -map global user l ':enter-user-mode lsp' -docstring 'LSP mode' +map global user l ': enter-user-mode lsp' -docstring 'LSP mode' # map global user t ':enter-user-mode tree-sitter' -docstring 'Treesitter mode' map global object f 'lsp-object Function Method' -docstring 'LSP function or method' map global object t 'lsp-object Class Interface Struct' -docstring 'LSP class interface or struct' map global object d 'lsp-diagnostic-object --include-warnings' -docstring 'LSP errors and warnings' -map global insert ':lsp-snippets-select-next-placeholders' -docstring 'Select next snippet placeholder' +map global insert ': lsp-snippets-select-next-placeholders' -docstring 'Select next snippet placeholder' hook global InsertCompletionShow .* %{ - unmap global insert ':lsp-snippets-select-next-placeholders' + unmap global insert ': lsp-snippets-select-next-placeholders' } hook global InsertCompletionHide .* %{ - map global insert ':lsp-snippets-select-next-placeholders' -docstring 'Select next snippet placeholder' + map global insert ': lsp-snippets-select-next-placeholders' -docstring 'Select next snippet placeholder' } hook global BufSetOption filetype=(?:javascript|typescript) %{ @@ -39,6 +39,15 @@ hook global BufSetOption filetype=(?:javascript|typescript) %{ } } +remove-hooks global lsp-filetype-c-family +hook global BufSetOption filetype=(?:c|cpp|objc) %{ + set-option buffer lsp_servers %{ + [clangd] + args = ["--log=error"] + root_globs = ["compile_commands.json", ".clangd", ".git"] + } +} + hook global BufSetOption filetype=ruby %{ set-option buffer lsp_servers %{ [ruby-lsp] -- cgit v1.3.1