Skip to content

Commit

Permalink
Setup LSP for Helix (#745)
Browse files Browse the repository at this point in the history
* Install LSP in global for helix use

* Print helix LSP state in CI
  • Loading branch information
kachick committed Aug 16, 2024
1 parent bcce218 commit f420ca2
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci-home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
zsh -c 'irb --version'
zsh -c 'alacritty --version'
zsh -c 'ssh -V'
zsh -c 'hx --health'
- name: Run homemade commands
run: |
zsh -c 'la ~; lat ~/.config'
Expand Down
71 changes: 70 additions & 1 deletion home-manager/editor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@
# To avoid conflicting with markdown headers. Should be synced with core.commentchar
comment-token = ";";
}
{
name = "bash";
auto-format = true;
formatter = {
command = lib.getExe pkgs.shfmt;
args = [
"--language-dialect"
"bash"
];
};
}
];
};

Expand All @@ -115,7 +126,65 @@
".node_modules/"
];

extraPackages = with pkgs; [ marksman ];
extraPackages = with pkgs; [
# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L714
nil

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L925
nodePackages.bash-language-server

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L207
rust-analyzer

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L578
gopls
# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L132-L133
golangci-lint-langserver

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L1478
marksman

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L1164
lua-language-server

## Not helpful. Didin't activated?
#
# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L1202
# nodePackages.yaml-language-server

# # https://github.com/helix-editor/helix/blob/24.03/languages.toml#L271
# taplo

## Keep minimum for global use. Inject in each project repositories if you need these

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L714
# nodePackages.typescript-language-server

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L1547
# https://github.com/NixOS/nixpkgs/blob/733f5a9806175f86380b14529cb29e953690c148/pkgs/development/tools/language-servers/dockerfile-language-server-nodejs/default.nix#L28
# nodePackages.dockerfile-language-server-nodejs

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L1651
# nodePackages.graphql-language-service-cli

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L509
# crystalline

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L870
# solargraph # Can we prefer steep here?

# # https://github.com/helix-editor/helix/blob/24.03/languages.toml#L1967
# nu-lsp

# # https://github.com/helix-editor/helix/blob/24.03/languages.toml#L1669
# elm-language-server

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L1217
# haskell-language-server

# https://github.com/helix-editor/helix/blob/24.03/languages.toml#L1260
# zls
];
};

# https://github.com/nix-community/home-manager/blob/release-24.05/modules/programs/vim.nix
Expand Down

0 comments on commit f420ca2

Please sign in to comment.