We do a bit of documentation

This commit is contained in:
Yoni FIRROLONI 2023-07-25 15:30:54 +02:00
commit 0ea818e702
4 changed files with 15 additions and 9 deletions

View file

@ -15,6 +15,7 @@ Language specific support means there is a combination of language specific plug
* SQL: <<opt-vim.languages.sql.enable>>
* Dart: <<opt-vim.languages.dart.enable>>
* Go: <<opt-vim.languages.go.enable>>
* Ruby: <<opt-vim.languages.ruby.enable>>
Adding support for more languages, and improving support for existing ones are great places where you can contribute with a PR.

View file

@ -12,8 +12,8 @@ in {
./tidal
./dart
./elixir
./ruby
./ruby.nix
./clang.nix
./go.nix
./nix.nix

View file

@ -28,14 +28,24 @@ with builtins; let
lspConfig = ''
lspconfig.rubocop.setup {
on_attach = attach_keymaps,
cmd = { "${cfg.lsp.package}/bin/bundle", "exec", "rubocop", "--lsp" },
cmd = { "rubocop", "--lsp" },
}
'';
};
};
in {
options.vim.languages.ruby = {
enable = mkEnableOption "Ruby/Ruby on Rails language support";
enable = mkEnableOption ''
Ruby/Ruby on Rails language support.
CAUTION: Ruby relies on your system for your project's dependencies, and it works the other way around too for code quality checking softwares.
What that means is you have to have:
* The language server(rubocop or solargraph) specified in your Gemfile
* Your project's gems installed on your system
You can either install them declaratively, or use a `shell.nix` along with a bundix setup to make your dependenicies available (special mention to libv8-node, which you cannot install via a gemset.nix due to it downloading nodejs with wget...)
'';
treesitter = {
enable = mkEnableOption "Enable Ruby treesitter" // {default = config.vim.languages.enableTreesitter;};
@ -52,7 +62,7 @@ in {
};
package = mkOption {
description = "Ruby/RoR LSP server package";
description = "Ruby package to use for ruby LSP (important if you have a specific version of ruby)";
type = types.package;
default = servers.${cfg.lsp.server}.package;
};

View file

@ -1,5 +0,0 @@
{...}: {
imports = [
./ruby.nix
];
}