Add some scala-specific stuff

This commit is contained in:
Natsu Kagami 2022-10-09 17:17:18 +02:00
parent 5155634b39
commit 61924ba95f
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51

View file

@ -161,6 +161,22 @@ hook global WinSetOption filetype=(rust) %{
set-option buffer makecmd "cargo check" set-option buffer makecmd "cargo check"
} }
hook global WinSetOption filetype=(scala) %{
# Format the document if possible
hook -group scala-fmt window BufWritePre .* %{ lsp-formatting-sync }
set window tabstop 2
set window indentwidth 2
}
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 %{ def -hidden insert-c-n %{
try %{ try %{
lsp-snippets-select-next-placeholders lsp-snippets-select-next-placeholders