mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-07 16:05:58 +01:00
Merge c5c026a185
into c957b23aaa
This commit is contained in:
commit
37f5cc822e
9 changed files with 85 additions and 2 deletions
|
@ -19,6 +19,7 @@ isMaximal: {
|
||||||
lspsaga.enable = false;
|
lspsaga.enable = false;
|
||||||
trouble.enable = true;
|
trouble.enable = true;
|
||||||
lspSignature.enable = true;
|
lspSignature.enable = true;
|
||||||
|
otter.enable = isMaximal;
|
||||||
lsplines.enable = isMaximal;
|
lsplines.enable = isMaximal;
|
||||||
nvim-docs-view.enable = isMaximal;
|
nvim-docs-view.enable = isMaximal;
|
||||||
};
|
};
|
||||||
|
@ -155,7 +156,7 @@ isMaximal: {
|
||||||
};
|
};
|
||||||
|
|
||||||
utility = {
|
utility = {
|
||||||
ccc.enable = isMaximal;
|
ccc.enable = false;
|
||||||
vim-wakatime.enable = false;
|
vim-wakatime.enable = false;
|
||||||
icon-picker.enable = isMaximal;
|
icon-picker.enable = isMaximal;
|
||||||
surround.enable = isMaximal;
|
surround.enable = isMaximal;
|
||||||
|
|
|
@ -196,3 +196,5 @@ everyone.
|
||||||
[Soliprem](https://github.com/Soliprem)
|
[Soliprem](https://github.com/Soliprem)
|
||||||
|
|
||||||
- Add LSP and Treesitter support for R under `vim.languages.R`.
|
- Add LSP and Treesitter support for R under `vim.languages.R`.
|
||||||
|
- Add Otter support under `vim.lsp.otter` and an assert to prevent conflict with
|
||||||
|
ccc
|
||||||
|
|
17
flake.lock
17
flake.lock
|
@ -1373,6 +1373,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"plugin-otter-nvim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1724585935,
|
||||||
|
"narHash": "sha256-euHwoK2WHLF/hrjLY2P4yGrIbYyBN38FL3q4CKNZmLY=",
|
||||||
|
"owner": "jmbuhr",
|
||||||
|
"repo": "otter.nvim",
|
||||||
|
"rev": "ca9ce67d0399380b659923381b58d174344c9ee7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "jmbuhr",
|
||||||
|
"repo": "otter.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"plugin-oxocarbon": {
|
"plugin-oxocarbon": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -1861,6 +1877,7 @@
|
||||||
"plugin-obsidian-nvim": "plugin-obsidian-nvim",
|
"plugin-obsidian-nvim": "plugin-obsidian-nvim",
|
||||||
"plugin-onedark": "plugin-onedark",
|
"plugin-onedark": "plugin-onedark",
|
||||||
"plugin-orgmode-nvim": "plugin-orgmode-nvim",
|
"plugin-orgmode-nvim": "plugin-orgmode-nvim",
|
||||||
|
"plugin-otter-nvim": "plugin-otter-nvim",
|
||||||
"plugin-oxocarbon": "plugin-oxocarbon",
|
"plugin-oxocarbon": "plugin-oxocarbon",
|
||||||
"plugin-plenary-nvim": "plugin-plenary-nvim",
|
"plugin-plenary-nvim": "plugin-plenary-nvim",
|
||||||
"plugin-project-nvim": "plugin-project-nvim",
|
"plugin-project-nvim": "plugin-project-nvim",
|
||||||
|
|
|
@ -156,6 +156,11 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugin-otter-nvim = {
|
||||||
|
url = "github:jmbuhr/otter.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
# Language support
|
# Language support
|
||||||
plugin-sqls-nvim = {
|
plugin-sqls-nvim = {
|
||||||
url = "github:nanotee/sqls.nvim";
|
url = "github:nanotee/sqls.nvim";
|
||||||
|
|
|
@ -226,7 +226,7 @@ in {
|
||||||
{
|
{
|
||||||
assertion = cfg.lsp.enable -> cfg.lsp.server != "tsserver";
|
assertion = cfg.lsp.enable -> cfg.lsp.server != "tsserver";
|
||||||
message = ''
|
message = ''
|
||||||
As of a recent lspconfig update, he `tsserver` configuration has been renamed
|
As of a recent lspconfig update, the `tsserver` configuration has been renamed
|
||||||
to `ts_ls` to match upstream behaviour of `lspconfig`, and the name `tsserver`
|
to `ts_ls` to match upstream behaviour of `lspconfig`, and the name `tsserver`
|
||||||
is no longer considered valid by nvf. Please set `vim.languages.ts.lsp.server`
|
is no longer considered valid by nvf. Please set `vim.languages.ts.lsp.server`
|
||||||
to `"ts_ls"` instead of to `${cfg.lsp.server}`
|
to `"ts_ls"` instead of to `${cfg.lsp.server}`
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
./trouble
|
./trouble
|
||||||
./lsp-signature
|
./lsp-signature
|
||||||
./lightbulb
|
./lightbulb
|
||||||
|
./otter
|
||||||
./lspkind
|
./lspkind
|
||||||
./lsplines
|
./lsplines
|
||||||
./nvim-docs-view
|
./nvim-docs-view
|
||||||
|
|
38
modules/plugins/lsp/otter/config.nix
Normal file
38
modules/plugins/lsp/otter/config.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding;
|
||||||
|
|
||||||
|
cfg = config.vim.lsp;
|
||||||
|
|
||||||
|
self = import ./otter.nix {inherit lib;};
|
||||||
|
mappingDefinitions = self.options.vim.lsp.otter.mappings;
|
||||||
|
mappings = addDescriptionsToMappings cfg.otter.mappings mappingDefinitions;
|
||||||
|
in {
|
||||||
|
config = mkIf (cfg.enable && cfg.otter.enable) {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = !config.vim.utility.ccc.enable;
|
||||||
|
message = ''
|
||||||
|
ccc and otter have a breaking conflict. It's been reported upstream. Until it's fixed, disable one of them
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
vim = {
|
||||||
|
startPlugins = ["otter-nvim"];
|
||||||
|
|
||||||
|
maps.normal = mkMerge [
|
||||||
|
(mkSetBinding mappings.toggle "<cmd>lua require'otter'.activate()<CR>")
|
||||||
|
];
|
||||||
|
|
||||||
|
pluginRC.otter = entryAnywhere ''
|
||||||
|
-- Enable otter diagnostics viewer
|
||||||
|
require("otter").setup()
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
6
modules/plugins/lsp/otter/default.nix
Normal file
6
modules/plugins/lsp/otter/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./otter.nix
|
||||||
|
./config.nix
|
||||||
|
];
|
||||||
|
}
|
13
modules/plugins/lsp/otter/otter.nix
Normal file
13
modules/plugins/lsp/otter/otter.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
inherit (lib.nvim.binds) mkMappingOption;
|
||||||
|
in {
|
||||||
|
options.vim.lsp = {
|
||||||
|
otter = {
|
||||||
|
enable = mkEnableOption "Otter LSP Injector";
|
||||||
|
mappings = {
|
||||||
|
toggle = mkMappingOption "Activate LSP on Cursor Position [otter]" "<leader>lo";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue