Move kakoune to a full-fledged package #4

Merged
nki merged 69 commits from kakoune-package into master 2025-03-21 18:43:18 +00:00
2 changed files with 16 additions and 13 deletions
Showing only changes of commit 5c8c02915c - Show all commits

View file

@ -131,14 +131,6 @@ hook global WinSetOption filetype=(typst) %{
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window markdown-.+ }
}
define-command -params 0 -docstring "Set up build" scala-build-connect %{
lsp-execute-command 'build-connect' '"[]"'
}
define-command -params 0 -docstring "Import build" scala-build-import %{
lsp-execute-command 'build-import' '"[]"'
}
def -hidden insert-c-n %{
try %{
lsp-snippets-select-next-placeholders

View file

@ -135,10 +135,9 @@ let
roots = [ "build.sbt" "build.sc" "build.mill" ];
settings_section = "metals";
settings.metals = {
enableSemanticHighlighting = true;
showInferredType = true;
decorationProvider = true;
inlineDecorationProvider = true;
inlayHints.inferredTypes.enable = true;
inlayHints.typeParameters.enable = true;
inlayHints.hintsInPatternMatch.enable = true;
# From kakoune-lsp's own options
icons = "unicode";
isHttpEnabled = true;
@ -300,7 +299,7 @@ in
hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c|cpp|tex|latex|haskell|nix|fsharp|templ) %{
# Format the document if possible
hook window BufWritePre .* %{ lsp-formatting-sync }
hook window -group lsp-formatting BufWritePre .* %{ lsp-formatting-sync }
}
hook global WinSetOption filetype=(rust|scala|fsharp) %{
@ -316,6 +315,18 @@ in
remove-hooks window semantic-tokens
}
}
define-command -params 0 -docstring "Set up build" scala-build-connect %{
lsp-execute-command 'build-connect' '[]'
}
define-command -params 0 -docstring "Change bsp build server" scala-bsp-switch %{
lsp-execute-command 'bsp-switch' '[]'
}
define-command -params 0 -docstring "Import build" scala-build-import %{
lsp-execute-command 'build-import' '[]'
}
}
'';
}