Add some basic frontend LSP servers
This commit is contained in:
parent
535e7e6cc3
commit
490aa3ad35
|
@ -38,9 +38,22 @@ let
|
|||
) ++ (with pkgs; [ libiconv ]);
|
||||
};
|
||||
|
||||
kak-lsp-frontend = { pkgs, lib, ... }:
|
||||
let
|
||||
langserver = name: {
|
||||
args = [ "--stdio" ];
|
||||
command = "${pkgs.nodePackages.vscode-langservers-extracted}/bin/vscode-${name}-language-server";
|
||||
filetypes = [ name ];
|
||||
roots = [ "package.json" ".git" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.kak-lsp.languages = lib.attrsets.genAttrs [ "html" "css" "json" ] langserver;
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
imports = [ ../modules/programs/my-kakoune ./kaktex.nix ];
|
||||
imports = [ ../modules/programs/my-kakoune ./kaktex.nix kak-lsp-frontend ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# ctags for peneira
|
||||
|
|
|
@ -89,7 +89,7 @@ hook global InsertCompletionHide .* %{
|
|||
try %{
|
||||
eval %sh{test -z "$WE_STARTED_KAK" && kak-lsp --kakoune -s $kak_session}
|
||||
}
|
||||
hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c|cpp|tex|latex|fsharp|ocaml|haskell|nix|scala|typst) %{
|
||||
hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c|cpp|tex|latex|fsharp|ocaml|haskell|nix|scala|typst|html|css|json) %{
|
||||
lsp-enable-window
|
||||
map window lsp N -docstring "Display the next message request" ": lsp-show-message-request-next<ret>"
|
||||
map window normal <c-l> ": enter-user-mode lsp<ret>"
|
||||
|
|
Loading…
Reference in a new issue