mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-17 07:43:21 +00:00
Compare commits
No commits in common. "6e82a568f2c2565839eb4fda8be818adbaeb2498" and "95c0cc3bb07ec294101562f5300ab0f5cbae1258" have entirely different histories.
6e82a568f2
...
95c0cc3bb0
4 changed files with 47 additions and 78 deletions
|
|
@ -301,7 +301,6 @@
|
||||||
- Add more applicable filetypes to illuminate denylist.
|
- Add more applicable filetypes to illuminate denylist.
|
||||||
- Disable mini.indentscope for applicable filetypes.
|
- Disable mini.indentscope for applicable filetypes.
|
||||||
- Fix fzf-lua having a hard dependency on fzf.
|
- Fix fzf-lua having a hard dependency on fzf.
|
||||||
- Enable inlay hints support - `config.vim.lsp.inlayHints`.
|
|
||||||
|
|
||||||
[tebuevd](https://github.com/tebuevd):
|
[tebuevd](https://github.com/tebuevd):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,9 @@
|
||||||
|
|
||||||
cfg = config.vim.diagnostics;
|
cfg = config.vim.diagnostics;
|
||||||
|
|
||||||
# Takes a boolean, a table, or a Lua list ({key = value}). We
|
|
||||||
# would like to allow all of those types, while clearly expressing
|
|
||||||
# them in the option's type. As such, this type is what it is.
|
|
||||||
diagnosticType = oneOf [(attrsOf anything) bool luaInline];
|
diagnosticType = oneOf [(attrsOf anything) bool luaInline];
|
||||||
diagnosticsSubmodule = submodule {
|
diagnosticsSubmodule = submodule {
|
||||||
# The table might need to be extended, so let's allow that case
|
|
||||||
# with a freeform type of what is supported by diagnostics opts.
|
|
||||||
freeformType = attrsOf diagnosticType;
|
freeformType = attrsOf diagnosticType;
|
||||||
options = {
|
|
||||||
underline = mkOption {
|
underline = mkOption {
|
||||||
type = diagnosticType;
|
type = diagnosticType;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
@ -77,7 +71,6 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
options.vim = {
|
options.vim = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.generators) mkLuaInline;
|
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.strings) optionalString;
|
inherit (lib.strings) optionalString;
|
||||||
inherit (lib.trivial) boolToString;
|
inherit (lib.trivial) boolToString;
|
||||||
|
|
@ -29,25 +28,6 @@ in {
|
||||||
sourcePlugins = ["cmp-nvim-lsp"];
|
sourcePlugins = ["cmp-nvim-lsp"];
|
||||||
};
|
};
|
||||||
|
|
||||||
autocmds =
|
|
||||||
if cfg.inlayHints.enable
|
|
||||||
then [
|
|
||||||
{
|
|
||||||
callback = mkLuaInline ''
|
|
||||||
function(event)
|
|
||||||
local bufnr = event.buf
|
|
||||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
|
||||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
|
|
||||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr })
|
|
||||||
end
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
desc = "LSP on-attach enable inlay hints autocmd";
|
|
||||||
event = ["LspAttach"];
|
|
||||||
}
|
|
||||||
]
|
|
||||||
else [];
|
|
||||||
|
|
||||||
pluginRC.lsp-setup = ''
|
pluginRC.lsp-setup = ''
|
||||||
vim.g.formatsave = ${boolToString cfg.formatOnSave};
|
vim.g.formatsave = ${boolToString cfg.formatOnSave};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,6 @@ in {
|
||||||
options.vim.lsp = {
|
options.vim.lsp = {
|
||||||
enable = mkEnableOption "LSP, also enabled automatically through null-ls and lspconfig options";
|
enable = mkEnableOption "LSP, also enabled automatically through null-ls and lspconfig options";
|
||||||
formatOnSave = mkEnableOption "format on save";
|
formatOnSave = mkEnableOption "format on save";
|
||||||
inlayHints = {
|
|
||||||
enable = mkEnableOption "inlay hints";
|
|
||||||
};
|
|
||||||
mappings = {
|
mappings = {
|
||||||
goToDefinition =
|
goToDefinition =
|
||||||
mkMappingOption "Go to definition"
|
mkMappingOption "Go to definition"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue