mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-15 23:17:48 +00:00
We do a bit of documentation
This commit is contained in:
parent
970e4a52cd
commit
0ea818e702
4 changed files with 15 additions and 9 deletions
|
|
@ -15,6 +15,7 @@ Language specific support means there is a combination of language specific plug
|
||||||
* SQL: <<opt-vim.languages.sql.enable>>
|
* SQL: <<opt-vim.languages.sql.enable>>
|
||||||
* Dart: <<opt-vim.languages.dart.enable>>
|
* Dart: <<opt-vim.languages.dart.enable>>
|
||||||
* Go: <<opt-vim.languages.go.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.
|
Adding support for more languages, and improving support for existing ones are great places where you can contribute with a PR.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ in {
|
||||||
./tidal
|
./tidal
|
||||||
./dart
|
./dart
|
||||||
./elixir
|
./elixir
|
||||||
./ruby
|
|
||||||
|
|
||||||
|
./ruby.nix
|
||||||
./clang.nix
|
./clang.nix
|
||||||
./go.nix
|
./go.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,24 @@ with builtins; let
|
||||||
lspConfig = ''
|
lspConfig = ''
|
||||||
lspconfig.rubocop.setup {
|
lspconfig.rubocop.setup {
|
||||||
on_attach = attach_keymaps,
|
on_attach = attach_keymaps,
|
||||||
cmd = { "${cfg.lsp.package}/bin/bundle", "exec", "rubocop", "--lsp" },
|
cmd = { "rubocop", "--lsp" },
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
options.vim.languages.ruby = {
|
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 = {
|
treesitter = {
|
||||||
enable = mkEnableOption "Enable Ruby treesitter" // {default = config.vim.languages.enableTreesitter;};
|
enable = mkEnableOption "Enable Ruby treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||||
|
|
@ -52,7 +62,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
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;
|
type = types.package;
|
||||||
default = servers.${cfg.lsp.server}.package;
|
default = servers.${cfg.lsp.server}.package;
|
||||||
};
|
};
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
./ruby.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue