Finally put in full LSP keybinds.

This commit is contained in:
vorboyvo 2024-12-27 16:33:05 -05:00
parent e67cebfef2
commit cf1a0af296

View file

@ -42,15 +42,6 @@
option = "filetype=markdown";
commands = "set-option window lintcmd \"proselint\"";
}
# {
# name = "BufSetOption";
# option = "filetype=markdown";
# commands = ''
# hook buffer BufWritePost .* %{ %sh{
#
# } };
# '';
# }
];
keyMappings = [
# Define select all
@ -60,25 +51,10 @@
effect = "*%s<ret>";
docstring = "Select all";
}
# Define usermode yank/copy and paste
{
key = "y";
mode = "user";
effect = "<a-|> wl-copy<ret>";
}
{
key = "p";
mode = "user";
effect = "<a-!> wl-paste -n<ret>";
}
{
key = "P";
mode = "user";
effect = "! wl-paste -n<ret>";
}
];
};
extraConfig = ''
extraConfig =
''
# highlight trailing whitespace
add-highlighter global/trailing-whitespace regex '\h+$' 0:Error
@ -93,7 +69,20 @@
eval %sh{kak-lsp --kakoune -s $kak_session}
lsp-enable
'';
''
+
''
map global user l ':enter-user-mode lsp<ret>' -docstring 'LSP mode'
map global insert <tab> '<a-;>:try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
map global object a '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
map global object <a-a> '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
map global object f '<a-semicolon>lsp-object Function Method<ret>' -docstring 'LSP function or method'
map global object t '<a-semicolon>lsp-object Class Interface Struct<ret>' -docstring 'LSP class interface or struct'
map global object d '<a-semicolon>lsp-diagnostic-object --include-warnings<ret>' -docstring 'LSP errors and warnings'
map global object D '<a-semicolon>lsp-diagnostic-object<ret>' -docstring 'LSP errors'
'' # LSP mappings
+
"";
};
xdg.configFile."kak-lsp/kak-lsp.toml".source =