new formatting, nixvim is working
This commit is contained in:
parent
9d1dfa44d7
commit
88db34c822
88 changed files with 1994 additions and 1845 deletions
|
@ -1 +1 @@
|
|||
_: { imports = [ ./emacs.nix ./helix.nix ./kakoune.nix ./nixvim ]; }
|
||||
_: {imports = [./emacs.nix ./helix.nix ./kakoune.nix ./nixvim];}
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
# Taken from: https://github.com/hlissner/dotfiles/blob/master/modules/editors/emacs.nix
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.editors.emacs;
|
||||
username = config.modules.other.system.username;
|
||||
repoUrl = inputs.doomemacs;
|
||||
|
@ -20,18 +24,18 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
## Emacs itself as an overlay
|
||||
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
|
||||
nixpkgs.overlays = [inputs.emacs-overlay.overlay];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
binutils # native-comp needs 'as', provided by this
|
||||
# 28.2 + native-comp
|
||||
((emacsPackagesFor emacsNativeComp).emacsWithPackages
|
||||
(epkgs: [ epkgs.vterm ]))
|
||||
(epkgs: [epkgs.vterm]))
|
||||
|
||||
emacs-desktop-symbol
|
||||
## Doom dependencies
|
||||
git
|
||||
(ripgrep.override { withPCRE2 = true; })
|
||||
(ripgrep.override {withPCRE2 = true;})
|
||||
gnutls # for TLS connectivity
|
||||
|
||||
## Optional dependencies
|
||||
|
@ -41,7 +45,7 @@ in {
|
|||
|
||||
## Module dependencies
|
||||
# :checkers spell
|
||||
(aspellWithDicts (ds: with ds; [ en en-computers en-science ]))
|
||||
(aspellWithDicts (ds: with ds; [en en-computers en-science]))
|
||||
# :tools editorconfig
|
||||
editorconfig-core-c # per-project style config
|
||||
# :tools lookup & :lang org +roam
|
||||
|
@ -52,12 +56,11 @@ in {
|
|||
beancount
|
||||
];
|
||||
|
||||
home-manager.users.${username}.home.sessionPath =
|
||||
[ "/home/vali/.config/emacs/bin" ];
|
||||
home-manager.users.${username}.home.sessionPath = ["/home/vali/.config/emacs/bin"];
|
||||
|
||||
# modules.shell.zsh.rcFiles = [ "${configDir}/emacs/aliases.zsh" ];
|
||||
|
||||
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
|
||||
fonts.fonts = [pkgs.emacs-all-the-icons-fonts];
|
||||
|
||||
system.userActivationScripts = mkIf cfg.doom.enable {
|
||||
installDoomEmacs = ''
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.modules.editors.helix;
|
||||
username = config.modules.other.system.username;
|
||||
in {
|
||||
|
@ -16,26 +20,25 @@ in {
|
|||
bufferline = "multiple";
|
||||
soft-wrap.enable = true;
|
||||
lsp.display-messages = true;
|
||||
cursor-shape = { insert = "bar"; };
|
||||
statusline.left =
|
||||
|
||||
[ "mode" "spinner" "version-control" "file-name" ];
|
||||
cursor-shape = {insert = "bar";};
|
||||
statusline.left = ["mode" "spinner" "version-control" "file-name"];
|
||||
};
|
||||
keys.normal = {
|
||||
C-g =
|
||||
[ ":new" ":insert-output lazygit" ":buffer-close!" ":redraw" ];
|
||||
C-t = [ ":new" ":insert-output fish" ":buffer-close!" ":redraw" ];
|
||||
esc = [ "collapse_selection" "keep_primary_selection" ];
|
||||
C-g = [":new" ":insert-output lazygit" ":buffer-close!" ":redraw"];
|
||||
C-t = [":new" ":insert-output fish" ":buffer-close!" ":redraw"];
|
||||
esc = ["collapse_selection" "keep_primary_selection"];
|
||||
A-H = "goto_previous_buffer";
|
||||
A-L = "goto_next_buffer";
|
||||
A-w = ":buffer-close";
|
||||
};
|
||||
};
|
||||
languages.language = [{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt";
|
||||
}];
|
||||
languages.language = [
|
||||
{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.editors.kakoune;
|
||||
username = config.modules.other.system.username;
|
||||
# inherit (inputs.kakoune.packages.${pkgs.system}) kakoun;
|
||||
|
@ -41,8 +45,7 @@ in {
|
|||
mode = "normal";
|
||||
key = "<esc>";
|
||||
effect = ";,";
|
||||
docstring =
|
||||
"Press escape to clear highlighted text and collapse cursors";
|
||||
docstring = "Press escape to clear highlighted text and collapse cursors";
|
||||
}
|
||||
{
|
||||
mode = "normal";
|
||||
|
@ -119,6 +122,5 @@ in {
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
_: { imports = [ ./kakoune.nix ]; }
|
||||
_: {imports = [./kakoune.nix];}
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
{ config, lib, pkgs, buildGoModule, ... }:
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
buildGoModule,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.programs.kakoune;
|
||||
username = config.modules.other.system.username;
|
||||
kakship = pkgs.rustPlatform.buildRustPackage rec {
|
||||
|
@ -16,8 +21,7 @@ let
|
|||
lockFile = "${src}/Cargo.lock";
|
||||
outputHashes = {
|
||||
"kak-0.1.2" = "sha256-RhtHQkC9yCSJtr/kbC5c9MavbL79acrsiEGXyoAST8U=";
|
||||
"yew-ansi-0.1.0" =
|
||||
"sha256-dSaEzqiOon+OqCZKQudzLRNP+Iv97kC+XZcTElKNrzs=";
|
||||
"yew-ansi-0.1.0" = "sha256-dSaEzqiOon+OqCZKQudzLRNP+Iv97kC+XZcTElKNrzs=";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -70,7 +74,7 @@ let
|
|||
description = "Handy Kakoune companion.";
|
||||
homepage = "https://github.com/kkga/kks";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ kalbasit ];
|
||||
maintainers = with maintainers; [kalbasit];
|
||||
};
|
||||
};
|
||||
kak-alacritty = pkgs.kakouneUtils.buildKakounePluginFrom2Nix rec {
|
||||
|
@ -97,7 +101,7 @@ let
|
|||
in {
|
||||
options.modules.programs.kakoune.enable = mkEnableOption "kakoune";
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = { programs.kakoune.enable = true; };
|
||||
home-manager.users.${username} = {programs.kakoune.enable = true;};
|
||||
environment.systemPackages = with pkgs; [
|
||||
rust-analyzer
|
||||
rustfmt # Rust LSP
|
||||
|
|
|
@ -244,7 +244,8 @@
|
|||
{
|
||||
mode = "n";
|
||||
key = "<C-d>";
|
||||
action = "<C-d>zz";
|
||||
action = "<C-d>";
|
||||
#action = "<C-d>zz";
|
||||
options = {
|
||||
desc = "Allow C-d and C-u to keep the cursor in the middle";
|
||||
};
|
||||
|
@ -253,7 +254,8 @@
|
|||
{
|
||||
mode = "n";
|
||||
key = "<C-u>";
|
||||
action = "<C-u>zz";
|
||||
#action = "<C-u>zz";
|
||||
action = "<C-u>";
|
||||
options = {
|
||||
desc = "Allow C-d and C-u to keep the cursor in the middle";
|
||||
};
|
||||
|
|
|
@ -1,122 +1,122 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
cmp-emoji = {enable = true;};
|
||||
cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autoEnableSources = true;
|
||||
experimental = {ghost_text = true;};
|
||||
performance = {
|
||||
debounce = 60;
|
||||
fetchingTimeout = 200;
|
||||
maxViewEntries = 30;
|
||||
};
|
||||
snippet = {expand = "luasnip";};
|
||||
formatting = {fields = ["kind" "abbr" "menu"];};
|
||||
sources = [
|
||||
{name = "nvim_lsp";}
|
||||
{name = "emoji";}
|
||||
{
|
||||
name = "buffer"; # text within current buffer
|
||||
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||
keywordLength = 3;
|
||||
}
|
||||
{
|
||||
name = "path"; # file system paths
|
||||
keywordLength = 3;
|
||||
}
|
||||
{
|
||||
name = "luasnip"; # snippets
|
||||
keywordLength = 3;
|
||||
}
|
||||
];
|
||||
cmp-emoji = {enable = true;};
|
||||
cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autoEnableSources = true;
|
||||
experimental = {ghost_text = true;};
|
||||
performance = {
|
||||
debounce = 60;
|
||||
fetchingTimeout = 200;
|
||||
maxViewEntries = 30;
|
||||
};
|
||||
snippet = {expand = "luasnip";};
|
||||
formatting = {fields = ["kind" "abbr" "menu"];};
|
||||
sources = [
|
||||
{name = "nvim_lsp";}
|
||||
{name = "emoji";}
|
||||
{
|
||||
name = "buffer"; # text within current buffer
|
||||
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||
keywordLength = 3;
|
||||
}
|
||||
{
|
||||
name = "path"; # file system paths
|
||||
keywordLength = 3;
|
||||
}
|
||||
{
|
||||
name = "luasnip"; # snippets
|
||||
keywordLength = 3;
|
||||
}
|
||||
];
|
||||
|
||||
window = {
|
||||
completion = {border = "solid";};
|
||||
documentation = {border = "solid";};
|
||||
};
|
||||
window = {
|
||||
completion = {border = "solid";};
|
||||
documentation = {border = "solid";};
|
||||
};
|
||||
|
||||
mapping = {
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<C-j>" = "cmp.mapping.select_next_item()";
|
||||
"<C-k>" = "cmp.mapping.select_prev_item()";
|
||||
"<C-e>" = "cmp.mapping.abort()";
|
||||
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
|
||||
mapping = {
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<C-j>" = "cmp.mapping.select_next_item()";
|
||||
"<C-k>" = "cmp.mapping.select_prev_item()";
|
||||
"<C-e>" = "cmp.mapping.abort()";
|
||||
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
|
||||
};
|
||||
};
|
||||
};
|
||||
cmp-nvim-lsp = {enable = true;}; # lsp
|
||||
cmp-buffer = {enable = true;};
|
||||
cmp-path = {enable = true;}; # file system paths
|
||||
cmp_luasnip = {enable = true;}; # snippets
|
||||
cmp-cmdline = {enable = false;}; # autocomplete for cmdline
|
||||
};
|
||||
cmp-nvim-lsp = {enable = true;}; # lsp
|
||||
cmp-buffer = {enable = true;};
|
||||
cmp-path = {enable = true;}; # file system paths
|
||||
cmp_luasnip = {enable = true;}; # snippets
|
||||
cmp-cmdline = {enable = false;}; # autocomplete for cmdline
|
||||
};
|
||||
extraConfigLua = ''
|
||||
luasnip = require("luasnip")
|
||||
kind_icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
}
|
||||
extraConfigLua = ''
|
||||
luasnip = require("luasnip")
|
||||
kind_icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
}
|
||||
|
||||
local cmp = require'cmp'
|
||||
local cmp = require'cmp'
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({'/', "?" }, {
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({'/', "?" }, {
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}),
|
||||
-- formatting = {
|
||||
-- format = function(_, vim_item)
|
||||
-- vim_item.kind = cmdIcons[vim_item.kind] or "FOO"
|
||||
-- return vim_item
|
||||
-- end
|
||||
-- }
|
||||
}) '';
|
||||
};
|
||||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}),
|
||||
-- formatting = {
|
||||
-- format = function(_, vim_item)
|
||||
-- vim_item.kind = cmdIcons[vim_item.kind] or "FOO"
|
||||
-- return vim_item
|
||||
-- end
|
||||
-- }
|
||||
}) '';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,78 +1,78 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings = {
|
||||
trouble = true;
|
||||
current_line_blame = true;
|
||||
signs = {
|
||||
add = {
|
||||
text = "│";
|
||||
};
|
||||
change = {
|
||||
text = "│";
|
||||
};
|
||||
delete = {
|
||||
text = "_";
|
||||
};
|
||||
topdelete = {
|
||||
text = "‾";
|
||||
};
|
||||
changedelete = {
|
||||
text = "~";
|
||||
};
|
||||
untracked = {
|
||||
text = "│";
|
||||
enable = true;
|
||||
settings = {
|
||||
trouble = true;
|
||||
current_line_blame = true;
|
||||
signs = {
|
||||
add = {
|
||||
text = "│";
|
||||
};
|
||||
change = {
|
||||
text = "│";
|
||||
};
|
||||
delete = {
|
||||
text = "_";
|
||||
};
|
||||
topdelete = {
|
||||
text = "‾";
|
||||
};
|
||||
changedelete = {
|
||||
text = "~";
|
||||
};
|
||||
untracked = {
|
||||
text = "│";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>gh";
|
||||
action = "gitsigns";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "+hunks";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghb";
|
||||
action = ":Gitsigns blame_line<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Blame line";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghd";
|
||||
action = ":Gitsigns diffthis<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Diff This";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghR";
|
||||
action = ":Gitsigns reset_buffer<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Reset Buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghS";
|
||||
action = ":Gitsigns stage_buffer<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Stage Buffer";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>gh";
|
||||
action = "gitsigns";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "+hunks";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghb";
|
||||
action = ":Gitsigns blame_line<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Blame line";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghd";
|
||||
action = ":Gitsigns diffthis<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Diff This";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghR";
|
||||
action = ":Gitsigns reset_buffer<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Reset Buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghS";
|
||||
action = ":Gitsigns stage_buffer<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Stage Buffer";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
{pkgs, ...}: {
|
||||
programs.nixvim = {
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
lazygit-nvim
|
||||
];
|
||||
lazygit-nvim
|
||||
];
|
||||
|
||||
extraConfigLua = ''
|
||||
require("telescope").load_extension("lazygit")
|
||||
'';
|
||||
extraConfigLua = ''
|
||||
require("telescope").load_extension("lazygit")
|
||||
'';
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>gg";
|
||||
action = "<cmd>LazyGit<CR>";
|
||||
options = {
|
||||
desc = "LazyGit (root dir)";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>gg";
|
||||
action = "<cmd>LazyGit<CR>";
|
||||
options = {
|
||||
desc = "LazyGit (root dir)";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,101 +1,101 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins.fidget = {
|
||||
enable = true;
|
||||
logger = {
|
||||
level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
|
||||
floatPrecision = 0.01; # Limit the number of decimals displayed for floats
|
||||
};
|
||||
progress = {
|
||||
pollRate = 0; # How and when to poll for progress messages
|
||||
suppressOnInsert = true; # Suppress new messages while in insert mode
|
||||
ignoreDoneAlready = false; # Ignore new tasks that are already complete
|
||||
ignoreEmptyMessage = false; # Ignore new tasks that don't contain a message
|
||||
clearOnDetach =
|
||||
# Clear notification group when LSP server detaches
|
||||
''
|
||||
function(client_id)
|
||||
local client = vim.lsp.get_client_by_id(client_id)
|
||||
return client and client.name or nil
|
||||
plugins.fidget = {
|
||||
enable = true;
|
||||
logger = {
|
||||
level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
|
||||
floatPrecision = 0.01; # Limit the number of decimals displayed for floats
|
||||
};
|
||||
progress = {
|
||||
pollRate = 0; # How and when to poll for progress messages
|
||||
suppressOnInsert = true; # Suppress new messages while in insert mode
|
||||
ignoreDoneAlready = false; # Ignore new tasks that are already complete
|
||||
ignoreEmptyMessage = false; # Ignore new tasks that don't contain a message
|
||||
clearOnDetach =
|
||||
# Clear notification group when LSP server detaches
|
||||
''
|
||||
function(client_id)
|
||||
local client = vim.lsp.get_client_by_id(client_id)
|
||||
return client and client.name or nil
|
||||
end
|
||||
'';
|
||||
notificationGroup =
|
||||
# How to get a progress message's notification group key
|
||||
''
|
||||
function(msg) return msg.lsp_client.name end
|
||||
'';
|
||||
ignore = []; # List of LSP servers to ignore
|
||||
lsp = {
|
||||
progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size
|
||||
};
|
||||
display = {
|
||||
renderLimit = 16; # How many LSP messages to show at once
|
||||
doneTtl = 3; # How long a message should persist after completion
|
||||
doneIcon = "✔"; # Icon shown when all LSP progress tasks are complete
|
||||
doneStyle = "Constant"; # Highlight group for completed LSP tasks
|
||||
progressTtl = "math.huge"; # How long a message should persist when in progress
|
||||
progressIcon = {
|
||||
pattern = "dots";
|
||||
period = 1;
|
||||
}; # Icon shown when LSP progress tasks are in progress
|
||||
progressStyle = "WarningMsg"; # Highlight group for in-progress LSP tasks
|
||||
groupStyle = "Title"; # Highlight group for group name (LSP server name)
|
||||
iconStyle = "Question"; # Highlight group for group icons
|
||||
priority = 30; # Ordering priority for LSP notification group
|
||||
skipHistory = true; # Whether progress notifications should be omitted from history
|
||||
formatMessage = ''
|
||||
require ("fidget.progress.display").default_format_message
|
||||
''; # How to format a progress message
|
||||
formatAnnote = ''
|
||||
function (msg) return msg.title end
|
||||
''; # How to format a progress annotation
|
||||
formatGroupName = ''
|
||||
function (group) return tostring (group) end
|
||||
''; # How to format a progress notification group's name
|
||||
overrides = {
|
||||
rust_analyzer = {
|
||||
name = "rust-analyzer";
|
||||
};
|
||||
}; # Override options from the default notification config
|
||||
};
|
||||
};
|
||||
notification = {
|
||||
pollRate = 10; # How frequently to update and render notifications
|
||||
filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
|
||||
historySize = 128; # Number of removed messages to retain in history
|
||||
overrideVimNotify = true;
|
||||
redirect = ''
|
||||
function(msg, level, opts)
|
||||
if opts and opts.on_open then
|
||||
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
|
||||
end
|
||||
end
|
||||
'';
|
||||
notificationGroup =
|
||||
# How to get a progress message's notification group key
|
||||
''
|
||||
function(msg) return msg.lsp_client.name end
|
||||
'';
|
||||
ignore = []; # List of LSP servers to ignore
|
||||
lsp = {
|
||||
progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size
|
||||
};
|
||||
display = {
|
||||
renderLimit = 16; # How many LSP messages to show at once
|
||||
doneTtl = 3; # How long a message should persist after completion
|
||||
doneIcon = "✔"; # Icon shown when all LSP progress tasks are complete
|
||||
doneStyle = "Constant"; # Highlight group for completed LSP tasks
|
||||
progressTtl = "math.huge"; # How long a message should persist when in progress
|
||||
progressIcon = {
|
||||
pattern = "dots";
|
||||
period = 1;
|
||||
}; # Icon shown when LSP progress tasks are in progress
|
||||
progressStyle = "WarningMsg"; # Highlight group for in-progress LSP tasks
|
||||
groupStyle = "Title"; # Highlight group for group name (LSP server name)
|
||||
iconStyle = "Question"; # Highlight group for group icons
|
||||
priority = 30; # Ordering priority for LSP notification group
|
||||
skipHistory = true; # Whether progress notifications should be omitted from history
|
||||
formatMessage = ''
|
||||
require ("fidget.progress.display").default_format_message
|
||||
''; # How to format a progress message
|
||||
formatAnnote = ''
|
||||
function (msg) return msg.title end
|
||||
''; # How to format a progress annotation
|
||||
formatGroupName = ''
|
||||
function (group) return tostring (group) end
|
||||
''; # How to format a progress notification group's name
|
||||
overrides = {
|
||||
rust_analyzer = {
|
||||
name = "rust-analyzer";
|
||||
};
|
||||
}; # Override options from the default notification config
|
||||
};
|
||||
};
|
||||
notification = {
|
||||
pollRate = 10; # How frequently to update and render notifications
|
||||
filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
|
||||
historySize = 128; # Number of removed messages to retain in history
|
||||
overrideVimNotify = true;
|
||||
redirect = ''
|
||||
function(msg, level, opts)
|
||||
if opts and opts.on_open then
|
||||
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
|
||||
end
|
||||
end
|
||||
'';
|
||||
configs = {
|
||||
default = "require('fidget.notification').default_config";
|
||||
};
|
||||
configs = {
|
||||
default = "require('fidget.notification').default_config";
|
||||
};
|
||||
|
||||
window = {
|
||||
normalHl = "Comment";
|
||||
winblend = 0;
|
||||
border = "none"; # none, single, double, rounded, solid, shadow
|
||||
zindex = 45;
|
||||
maxWidth = 0;
|
||||
maxHeight = 0;
|
||||
xPadding = 1;
|
||||
yPadding = 0;
|
||||
align = "bottom";
|
||||
relative = "editor";
|
||||
};
|
||||
view = {
|
||||
stackUpwards = true; # Display notification items from bottom to top
|
||||
iconSeparator = " "; # Separator between group name and icon
|
||||
groupSeparator = "---"; # Separator between notification groups
|
||||
groupSeparatorHl =
|
||||
# Highlight group used for group separator
|
||||
"Comment";
|
||||
window = {
|
||||
normalHl = "Comment";
|
||||
winblend = 0;
|
||||
border = "none"; # none, single, double, rounded, solid, shadow
|
||||
zindex = 45;
|
||||
maxWidth = 0;
|
||||
maxHeight = 0;
|
||||
xPadding = 1;
|
||||
yPadding = 0;
|
||||
align = "bottom";
|
||||
relative = "editor";
|
||||
};
|
||||
view = {
|
||||
stackUpwards = true; # Display notification items from bottom to top
|
||||
iconSeparator = " "; # Separator between group name and icon
|
||||
groupSeparator = "---"; # Separator between notification groups
|
||||
groupSeparatorHl =
|
||||
# Highlight group used for group separator
|
||||
"Comment";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,98 +1,98 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
lsp-format = {enable = true;};
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
eslint = {enable = true;};
|
||||
html = {enable = true;};
|
||||
lua-ls = {enable = true;};
|
||||
nil_ls = {enable = true;};
|
||||
marksman = {enable = true;};
|
||||
pyright = {enable = true;};
|
||||
gopls = {enable = true;};
|
||||
terraformls = {enable = true;};
|
||||
tsserver = {enable = false;};
|
||||
yamlls = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
keymaps = {
|
||||
silent = true;
|
||||
lspBuf = {
|
||||
gd = {
|
||||
action = "definition";
|
||||
desc = "Goto Definition";
|
||||
};
|
||||
gr = {
|
||||
action = "references";
|
||||
desc = "Goto References";
|
||||
};
|
||||
gD = {
|
||||
action = "declaration";
|
||||
desc = "Goto Declaration";
|
||||
};
|
||||
gI = {
|
||||
action = "implementation";
|
||||
desc = "Goto Implementation";
|
||||
};
|
||||
gT = {
|
||||
action = "type_definition";
|
||||
desc = "Type Definition";
|
||||
};
|
||||
K = {
|
||||
action = "hover";
|
||||
desc = "Hover";
|
||||
};
|
||||
"<leader>cw" = {
|
||||
action = "workspace_symbol";
|
||||
desc = "Workspace Symbol";
|
||||
};
|
||||
"<leader>cr" = {
|
||||
action = "rename";
|
||||
desc = "Rename";
|
||||
plugins = {
|
||||
lsp-format = {enable = true;};
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
eslint = {enable = true;};
|
||||
html = {enable = true;};
|
||||
lua-ls = {enable = true;};
|
||||
nil_ls = {enable = true;};
|
||||
marksman = {enable = true;};
|
||||
pyright = {enable = true;};
|
||||
gopls = {enable = true;};
|
||||
terraformls = {enable = true;};
|
||||
tsserver = {enable = false;};
|
||||
yamlls = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
diagnostic = {
|
||||
"<leader>cd" = {
|
||||
action = "open_float";
|
||||
desc = "Line Diagnostics";
|
||||
keymaps = {
|
||||
silent = true;
|
||||
lspBuf = {
|
||||
gd = {
|
||||
action = "definition";
|
||||
desc = "Goto Definition";
|
||||
};
|
||||
gr = {
|
||||
action = "references";
|
||||
desc = "Goto References";
|
||||
};
|
||||
gD = {
|
||||
action = "declaration";
|
||||
desc = "Goto Declaration";
|
||||
};
|
||||
gI = {
|
||||
action = "implementation";
|
||||
desc = "Goto Implementation";
|
||||
};
|
||||
gT = {
|
||||
action = "type_definition";
|
||||
desc = "Type Definition";
|
||||
};
|
||||
K = {
|
||||
action = "hover";
|
||||
desc = "Hover";
|
||||
};
|
||||
"<leader>cw" = {
|
||||
action = "workspace_symbol";
|
||||
desc = "Workspace Symbol";
|
||||
};
|
||||
"<leader>cr" = {
|
||||
action = "rename";
|
||||
desc = "Rename";
|
||||
};
|
||||
};
|
||||
"[d" = {
|
||||
action = "goto_next";
|
||||
desc = "Next Diagnostic";
|
||||
};
|
||||
"]d" = {
|
||||
action = "goto_prev";
|
||||
desc = "Previous Diagnostic";
|
||||
diagnostic = {
|
||||
"<leader>cd" = {
|
||||
action = "open_float";
|
||||
desc = "Line Diagnostics";
|
||||
};
|
||||
"[d" = {
|
||||
action = "goto_next";
|
||||
desc = "Next Diagnostic";
|
||||
};
|
||||
"]d" = {
|
||||
action = "goto_prev";
|
||||
desc = "Previous Diagnostic";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
extraConfigLua = ''
|
||||
local _border = "rounded"
|
||||
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
|
||||
vim.lsp.handlers.hover, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
||||
vim.lsp.handlers.signature_help, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.diagnostic.config{
|
||||
float={border=_border}
|
||||
};
|
||||
|
||||
require('lspconfig.ui.windows').default_options = {
|
||||
border = _border
|
||||
}
|
||||
'';
|
||||
};
|
||||
extraConfigLua = ''
|
||||
local _border = "rounded"
|
||||
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
|
||||
vim.lsp.handlers.hover, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
||||
vim.lsp.handlers.signature_help, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.diagnostic.config{
|
||||
float={border=_border}
|
||||
};
|
||||
|
||||
require('lspconfig.ui.windows').default_options = {
|
||||
border = _border
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,188 +1,188 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins.lspsaga = {
|
||||
enable = true;
|
||||
beacon = {
|
||||
plugins.lspsaga = {
|
||||
enable = true;
|
||||
};
|
||||
ui = {
|
||||
border = "rounded"; # One of none, single, double, rounded, solid, shadow
|
||||
codeAction = "💡"; # Can be any symbol you want 💡
|
||||
};
|
||||
hover = {
|
||||
openCmd = "!floorp"; # Choose your browser
|
||||
openLink = "gx";
|
||||
};
|
||||
diagnostic = {
|
||||
borderFollow = true;
|
||||
diagnosticOnlyCurrent = false;
|
||||
showCodeAction = true;
|
||||
};
|
||||
symbolInWinbar = {
|
||||
enable = true; # Breadcrumbs
|
||||
};
|
||||
codeAction = {
|
||||
extendGitSigns = false;
|
||||
showServerName = true;
|
||||
onlyInCursor = true;
|
||||
numShortcut = true;
|
||||
keys = {
|
||||
exec = "<CR>";
|
||||
quit = ["<Esc>" "q"];
|
||||
beacon = {
|
||||
enable = true;
|
||||
};
|
||||
ui = {
|
||||
border = "rounded"; # One of none, single, double, rounded, solid, shadow
|
||||
codeAction = "💡"; # Can be any symbol you want 💡
|
||||
};
|
||||
hover = {
|
||||
openCmd = "!floorp"; # Choose your browser
|
||||
openLink = "gx";
|
||||
};
|
||||
diagnostic = {
|
||||
borderFollow = true;
|
||||
diagnosticOnlyCurrent = false;
|
||||
showCodeAction = true;
|
||||
};
|
||||
symbolInWinbar = {
|
||||
enable = true; # Breadcrumbs
|
||||
};
|
||||
codeAction = {
|
||||
extendGitSigns = false;
|
||||
showServerName = true;
|
||||
onlyInCursor = true;
|
||||
numShortcut = true;
|
||||
keys = {
|
||||
exec = "<CR>";
|
||||
quit = ["<Esc>" "q"];
|
||||
};
|
||||
};
|
||||
lightbulb = {
|
||||
enable = false;
|
||||
sign = false;
|
||||
virtualText = true;
|
||||
};
|
||||
implement = {
|
||||
enable = false;
|
||||
};
|
||||
rename = {
|
||||
autoSave = false;
|
||||
keys = {
|
||||
exec = "<CR>";
|
||||
quit = ["<C-k>" "<Esc>"];
|
||||
select = "x";
|
||||
};
|
||||
};
|
||||
outline = {
|
||||
autoClose = true;
|
||||
autoPreview = true;
|
||||
closeAfterJump = true;
|
||||
layout = "normal"; # normal or float
|
||||
winPosition = "right"; # left or right
|
||||
keys = {
|
||||
jump = "e";
|
||||
quit = "q";
|
||||
toggleOrJump = "o";
|
||||
};
|
||||
};
|
||||
scrollPreview = {
|
||||
scrollDown = "<C-f>";
|
||||
scrollUp = "<C-b>";
|
||||
};
|
||||
};
|
||||
lightbulb = {
|
||||
enable = false;
|
||||
sign = false;
|
||||
virtualText = true;
|
||||
};
|
||||
implement = {
|
||||
enable = false;
|
||||
};
|
||||
rename = {
|
||||
autoSave = false;
|
||||
keys = {
|
||||
exec = "<CR>";
|
||||
quit = ["<C-k>" "<Esc>"];
|
||||
select = "x";
|
||||
};
|
||||
};
|
||||
outline = {
|
||||
autoClose = true;
|
||||
autoPreview = true;
|
||||
closeAfterJump = true;
|
||||
layout = "normal"; # normal or float
|
||||
winPosition = "right"; # left or right
|
||||
keys = {
|
||||
jump = "e";
|
||||
quit = "q";
|
||||
toggleOrJump = "o";
|
||||
};
|
||||
};
|
||||
scrollPreview = {
|
||||
scrollDown = "<C-f>";
|
||||
scrollUp = "<C-b>";
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "gd";
|
||||
action = "<cmd>Lspsaga finder def<CR>";
|
||||
options = {
|
||||
desc = "Goto Definition";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "gr";
|
||||
action = "<cmd>Lspsaga finder ref<CR>";
|
||||
options = {
|
||||
desc = "Goto References";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "gD";
|
||||
# action = "<cmd>Lspsaga show_line_diagnostics<CR>";
|
||||
# options = {
|
||||
# desc = "Goto Declaration";
|
||||
# silent = true;
|
||||
# };
|
||||
# }
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "gI";
|
||||
action = "<cmd>Lspsaga finder imp<CR>";
|
||||
options = {
|
||||
desc = "Goto Implementation";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "gT";
|
||||
action = "<cmd>Lspsaga peek_type_definition<CR>";
|
||||
options = {
|
||||
desc = "Type Definition";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "K";
|
||||
action = "<cmd>Lspsaga hover_doc<CR>";
|
||||
options = {
|
||||
desc = "Hover";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cw";
|
||||
action = "<cmd>Lspsaga outline<CR>";
|
||||
options = {
|
||||
desc = "Outline";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cr";
|
||||
action = "<cmd>Lspsaga rename<CR>";
|
||||
options = {
|
||||
desc = "Rename";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ca";
|
||||
action = "<cmd>Lspsaga code_action<CR>";
|
||||
options = {
|
||||
desc = "Code Action";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cd";
|
||||
action = "<cmd>Lspsaga show_line_diagnostics<CR>";
|
||||
options = {
|
||||
desc = "Line Diagnostics";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "[d";
|
||||
action = "<cmd>Lspsaga diagnostic_jump_next<CR>";
|
||||
options = {
|
||||
desc = "Next Diagnostic";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "]d";
|
||||
action = "<cmd>Lspsaga diagnostic_jump_prev<CR>";
|
||||
options = {
|
||||
desc = "Previous Diagnostic";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "gd";
|
||||
action = "<cmd>Lspsaga finder def<CR>";
|
||||
options = {
|
||||
desc = "Goto Definition";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "gr";
|
||||
action = "<cmd>Lspsaga finder ref<CR>";
|
||||
options = {
|
||||
desc = "Goto References";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "gD";
|
||||
# action = "<cmd>Lspsaga show_line_diagnostics<CR>";
|
||||
# options = {
|
||||
# desc = "Goto Declaration";
|
||||
# silent = true;
|
||||
# };
|
||||
# }
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "gI";
|
||||
action = "<cmd>Lspsaga finder imp<CR>";
|
||||
options = {
|
||||
desc = "Goto Implementation";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "gT";
|
||||
action = "<cmd>Lspsaga peek_type_definition<CR>";
|
||||
options = {
|
||||
desc = "Type Definition";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "K";
|
||||
action = "<cmd>Lspsaga hover_doc<CR>";
|
||||
options = {
|
||||
desc = "Hover";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cw";
|
||||
action = "<cmd>Lspsaga outline<CR>";
|
||||
options = {
|
||||
desc = "Outline";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cr";
|
||||
action = "<cmd>Lspsaga rename<CR>";
|
||||
options = {
|
||||
desc = "Rename";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ca";
|
||||
action = "<cmd>Lspsaga code_action<CR>";
|
||||
options = {
|
||||
desc = "Code Action";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cd";
|
||||
action = "<cmd>Lspsaga show_line_diagnostics<CR>";
|
||||
options = {
|
||||
desc = "Line Diagnostics";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "[d";
|
||||
action = "<cmd>Lspsaga diagnostic_jump_next<CR>";
|
||||
options = {
|
||||
desc = "Next Diagnostic";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "]d";
|
||||
action = "<cmd>Lspsaga diagnostic_jump_prev<CR>";
|
||||
options = {
|
||||
desc = "Previous Diagnostic";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,52 +1,52 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins.none-ls = {
|
||||
enable = true;
|
||||
enableLspFormat = true;
|
||||
updateInInsert = false;
|
||||
sources = {
|
||||
code_actions = {
|
||||
gitsigns.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
diagnostics = {
|
||||
statix.enable = true;
|
||||
yamllint.enable = true;
|
||||
};
|
||||
formatting = {
|
||||
alejandra.enable = true;
|
||||
black = {
|
||||
enable = true;
|
||||
withArgs = ''
|
||||
{
|
||||
extra_args = { "--fast" },
|
||||
}
|
||||
'';
|
||||
plugins.none-ls = {
|
||||
enable = true;
|
||||
enableLspFormat = true;
|
||||
updateInInsert = false;
|
||||
sources = {
|
||||
code_actions = {
|
||||
gitsigns.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
prettier = {
|
||||
enable = true;
|
||||
disableTsServerFormatter = true;
|
||||
withArgs = ''
|
||||
{
|
||||
extra_args = { "--no-semi", "--single-quote" },
|
||||
}
|
||||
'';
|
||||
diagnostics = {
|
||||
statix.enable = true;
|
||||
yamllint.enable = true;
|
||||
};
|
||||
formatting = {
|
||||
alejandra.enable = true;
|
||||
black = {
|
||||
enable = true;
|
||||
withArgs = ''
|
||||
{
|
||||
extra_args = { "--fast" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
prettier = {
|
||||
enable = true;
|
||||
disableTsServerFormatter = true;
|
||||
withArgs = ''
|
||||
{
|
||||
extra_args = { "--no-semi", "--single-quote" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
stylua.enable = true;
|
||||
yamlfmt.enable = true;
|
||||
};
|
||||
stylua.enable = true;
|
||||
yamlfmt.enable = true;
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>cf";
|
||||
action = "<cmd>lua vim.lsp.buf.format()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Format";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>cf";
|
||||
action = "<cmd>lua vim.lsp.buf.format()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Format";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,36 +5,34 @@
|
|||
disabledFiletypes = {
|
||||
statusline = ["dashboard" "alpha" "starter"];
|
||||
};
|
||||
# theme = {
|
||||
# normal = {
|
||||
# a = {
|
||||
# bg = "#b4befe";
|
||||
# fg = "#1c1d21";
|
||||
# };
|
||||
# b = {
|
||||
# bg = "nil";
|
||||
# };
|
||||
# c = {
|
||||
# bg = "nil";
|
||||
# };
|
||||
# z = {
|
||||
# bg = "nil";
|
||||
# };
|
||||
# y = {
|
||||
# bg = "nil";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# theme = {
|
||||
# normal = {
|
||||
# a = {
|
||||
# bg = "#b4befe";
|
||||
# fg = "#1c1d21";
|
||||
# };
|
||||
# b = {
|
||||
# bg = "nil";
|
||||
# };
|
||||
# c = {
|
||||
# bg = "nil";
|
||||
# };
|
||||
# z = {
|
||||
# bg = "nil";
|
||||
# };
|
||||
# y = {
|
||||
# bg = "nil";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
sections = {
|
||||
lualine_a = [
|
||||
{
|
||||
name = "mode";
|
||||
fmt = "string.lower";
|
||||
color = {
|
||||
fg =
|
||||
"none";
|
||||
bg =
|
||||
"none";
|
||||
fg = "none";
|
||||
bg = "none";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
@ -43,10 +41,8 @@
|
|||
name = "branch";
|
||||
icon = "";
|
||||
color = {
|
||||
fg =
|
||||
"none";
|
||||
bg =
|
||||
"none";
|
||||
fg = "none";
|
||||
bg = "none";
|
||||
};
|
||||
}
|
||||
"diff"
|
||||
|
@ -63,10 +59,8 @@
|
|||
};
|
||||
};
|
||||
color = {
|
||||
fg =
|
||||
"none";
|
||||
bg =
|
||||
"none";
|
||||
fg = "none";
|
||||
bg = "none";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
@ -89,10 +83,8 @@
|
|||
};
|
||||
};
|
||||
color = {
|
||||
fg =
|
||||
"none";
|
||||
bg =
|
||||
"none";
|
||||
fg = "none";
|
||||
bg = "none";
|
||||
};
|
||||
separator.left = "";
|
||||
}
|
||||
|
@ -101,10 +93,8 @@
|
|||
{
|
||||
name = "location";
|
||||
color = {
|
||||
fg =
|
||||
"none";
|
||||
bg =
|
||||
"none";
|
||||
fg = "none";
|
||||
bg = "none";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
|
@ -11,36 +11,36 @@
|
|||
};
|
||||
in {
|
||||
programs.nixvim = {
|
||||
filetype.extension.liq = "liquidsoap";
|
||||
filetype.extension.nu = "nu";
|
||||
filetype.extension.liq = "liquidsoap";
|
||||
filetype.extension.nu = "nu";
|
||||
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
indent = true;
|
||||
folding = true;
|
||||
languageRegister.nu = "nu";
|
||||
languageRegister.liq = "liquidsoap";
|
||||
nixvimInjections = true;
|
||||
grammarPackages =
|
||||
[
|
||||
nu-grammar
|
||||
]
|
||||
++ pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
indent = true;
|
||||
folding = true;
|
||||
languageRegister.nu = "nu";
|
||||
languageRegister.liq = "liquidsoap";
|
||||
nixvimInjections = true;
|
||||
grammarPackages =
|
||||
[
|
||||
nu-grammar
|
||||
]
|
||||
++ pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||
};
|
||||
|
||||
extraFiles = {
|
||||
"/queries/nu/highlights.scm" = builtins.readFile "${nu-grammar}/queries/nu/highlights.scm";
|
||||
"/queries/nu/injections.scm" = builtins.readFile "${nu-grammar}/queries/nu/injections.scm";
|
||||
};
|
||||
extraConfigLua = ''
|
||||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
|
||||
parser_config.liquidsoap = {
|
||||
filetype = "liquidsoap",
|
||||
}
|
||||
parser_config.nu = {
|
||||
filetype = "nu",
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
extraFiles = {
|
||||
"/queries/nu/highlights.scm" = builtins.readFile "${nu-grammar}/queries/nu/highlights.scm";
|
||||
"/queries/nu/injections.scm" = builtins.readFile "${nu-grammar}/queries/nu/injections.scm";
|
||||
};
|
||||
extraConfigLua = ''
|
||||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
|
||||
parser_config.liquidsoap = {
|
||||
filetype = "liquidsoap",
|
||||
}
|
||||
parser_config.nu = {
|
||||
filetype = "nu",
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,93 +1,93 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins.alpha = let
|
||||
nixFlake = [
|
||||
"⠄⠄⠄⢰⣧⣼⣯⠄⣸⣠⣶⣶⣦⣾⠄⠄⠄⠄⡀⠄⢀⣿⣿⠄⠄⠄⢸⡇⠄⠄"
|
||||
"⠄⠄⠄⣾⣿⠿⠿⠶⠿⢿⣿⣿⣿⣿⣦⣤⣄⢀⡅⢠⣾⣛⡉⠄⠄⠄⠸⢀⣿⠄"
|
||||
"⠄⠄⢀⡋⣡⣴⣶⣶⡀⠄⠄⠙⢿⣿⣿⣿⣿⣿⣴⣿⣿⣿⢃⣤⣄⣀⣥⣿⣿⠄"
|
||||
"⠄⠄⢸⣇⠻⣿⣿⣿⣧⣀⢀⣠⡌⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⣿⣿⣿⠄"
|
||||
"⠄⢀⢸⣿⣷⣤⣤⣤⣬⣙⣛⢿⣿⣿⣿⣿⣿⣿⡿⣿⣿⡍⠄⠄⢀⣤⣄⠉⠋⣰"
|
||||
"⠄⣼⣖⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⢇⣿⣿⡷⠶⠶⢿⣿⣿⠇⢀⣤"
|
||||
"⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⡇⣿⣿⣿⣿⣿⣿⣷⣶⣥⣴⣿⡗"
|
||||
"⢀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠄"
|
||||
"⢸⣿⣦⣌⣛⣻⣿⣿⣧⠙⠛⠛⡭⠅⠒⠦⠭⣭⡻⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠄"
|
||||
"⠘⣿⣿⣿⣿⣿⣿⣿⣿⡆⠄⠄⠄⠄⠄⠄⠄⠄⠹⠈⢋⣽⣿⣿⣿⣿⣵⣾⠃⠄"
|
||||
"⠄⠘⣿⣿⣿⣿⣿⣿⣿⣿⠄⣴⣿⣶⣄⠄⣴⣶⠄⢀⣾⣿⣿⣿⣿⣿⣿⠃⠄⠄"
|
||||
"⠄⠄⠈⠻⣿⣿⣿⣿⣿⣿⡄⢻⣿⣿⣿⠄⣿⣿⡀⣾⣿⣿⣿⣿⣛⠛⠁⠄⠄⠄"
|
||||
"⠄⠄⠄⠄⠈⠛⢿⣿⣿⣿⠁⠞⢿⣿⣿⡄⢿⣿⡇⣸⣿⣿⠿⠛⠁⠄⠄⠄⠄⠄"
|
||||
"⠄⠄⠄⠄⠄⠄⠄⠉⠻⣿⣿⣾⣦⡙⠻⣷⣾⣿⠃⠿⠋⠁⠄⠄⠄⠄⠄⢀⣠⣴"
|
||||
"⣿⣿⣿⣶⣶⣮⣥⣒⠲⢮⣝⡿⣿⣿⡆⣿⡿⠃⠄⠄⠄⠄⠄⠄⠄⣠⣴⣿⣿⣿"
|
||||
];
|
||||
in {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
type = "padding";
|
||||
val = 4;
|
||||
}
|
||||
{
|
||||
opts = {
|
||||
hl = "AlphaHeader";
|
||||
position = "center";
|
||||
};
|
||||
type = "text";
|
||||
val = nixFlake;
|
||||
}
|
||||
{
|
||||
type = "padding";
|
||||
val = 2;
|
||||
}
|
||||
{
|
||||
type = "group";
|
||||
val = let
|
||||
mkButton = shortcut: cmd: val: hl: {
|
||||
type = "button";
|
||||
inherit val;
|
||||
opts = {
|
||||
inherit hl shortcut;
|
||||
keymap = [
|
||||
"n"
|
||||
shortcut
|
||||
cmd
|
||||
{}
|
||||
];
|
||||
position = "center";
|
||||
cursor = 0;
|
||||
width = 40;
|
||||
align_shortcut = "right";
|
||||
hl_shortcut = "Keyword";
|
||||
};
|
||||
programs.nixvim = {
|
||||
plugins.alpha = let
|
||||
nixFlake = [
|
||||
"⠄⠄⠄⢰⣧⣼⣯⠄⣸⣠⣶⣶⣦⣾⠄⠄⠄⠄⡀⠄⢀⣿⣿⠄⠄⠄⢸⡇⠄⠄"
|
||||
"⠄⠄⠄⣾⣿⠿⠿⠶⠿⢿⣿⣿⣿⣿⣦⣤⣄⢀⡅⢠⣾⣛⡉⠄⠄⠄⠸⢀⣿⠄"
|
||||
"⠄⠄⢀⡋⣡⣴⣶⣶⡀⠄⠄⠙⢿⣿⣿⣿⣿⣿⣴⣿⣿⣿⢃⣤⣄⣀⣥⣿⣿⠄"
|
||||
"⠄⠄⢸⣇⠻⣿⣿⣿⣧⣀⢀⣠⡌⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⣿⣿⣿⠄"
|
||||
"⠄⢀⢸⣿⣷⣤⣤⣤⣬⣙⣛⢿⣿⣿⣿⣿⣿⣿⡿⣿⣿⡍⠄⠄⢀⣤⣄⠉⠋⣰"
|
||||
"⠄⣼⣖⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⢇⣿⣿⡷⠶⠶⢿⣿⣿⠇⢀⣤"
|
||||
"⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⡇⣿⣿⣿⣿⣿⣿⣷⣶⣥⣴⣿⡗"
|
||||
"⢀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠄"
|
||||
"⢸⣿⣦⣌⣛⣻⣿⣿⣧⠙⠛⠛⡭⠅⠒⠦⠭⣭⡻⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠄"
|
||||
"⠘⣿⣿⣿⣿⣿⣿⣿⣿⡆⠄⠄⠄⠄⠄⠄⠄⠄⠹⠈⢋⣽⣿⣿⣿⣿⣵⣾⠃⠄"
|
||||
"⠄⠘⣿⣿⣿⣿⣿⣿⣿⣿⠄⣴⣿⣶⣄⠄⣴⣶⠄⢀⣾⣿⣿⣿⣿⣿⣿⠃⠄⠄"
|
||||
"⠄⠄⠈⠻⣿⣿⣿⣿⣿⣿⡄⢻⣿⣿⣿⠄⣿⣿⡀⣾⣿⣿⣿⣿⣛⠛⠁⠄⠄⠄"
|
||||
"⠄⠄⠄⠄⠈⠛⢿⣿⣿⣿⠁⠞⢿⣿⣿⡄⢿⣿⡇⣸⣿⣿⠿⠛⠁⠄⠄⠄⠄⠄"
|
||||
"⠄⠄⠄⠄⠄⠄⠄⠉⠻⣿⣿⣾⣦⡙⠻⣷⣾⣿⠃⠿⠋⠁⠄⠄⠄⠄⠄⢀⣠⣴"
|
||||
"⣿⣿⣿⣶⣶⣮⣥⣒⠲⢮⣝⡿⣿⣿⡆⣿⡿⠃⠄⠄⠄⠄⠄⠄⠄⣠⣴⣿⣿⣿"
|
||||
];
|
||||
in {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
type = "padding";
|
||||
val = 4;
|
||||
}
|
||||
{
|
||||
opts = {
|
||||
hl = "AlphaHeader";
|
||||
position = "center";
|
||||
};
|
||||
in [
|
||||
(
|
||||
mkButton
|
||||
"f"
|
||||
"<CMD>lua require('telescope.builtin').find_files({hidden = true})<CR>"
|
||||
"🔍 Find File"
|
||||
"Operator"
|
||||
)
|
||||
(
|
||||
mkButton
|
||||
"q"
|
||||
"<CMD>qa<CR>"
|
||||
"💣 Quit Neovim"
|
||||
"String"
|
||||
)
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "padding";
|
||||
val = 2;
|
||||
}
|
||||
{
|
||||
opts = {
|
||||
hl = "GruvboxBlue";
|
||||
position = "center";
|
||||
};
|
||||
type = "text";
|
||||
val = "https://github.com/elythh/nixvim";
|
||||
}
|
||||
];
|
||||
type = "text";
|
||||
val = nixFlake;
|
||||
}
|
||||
{
|
||||
type = "padding";
|
||||
val = 2;
|
||||
}
|
||||
{
|
||||
type = "group";
|
||||
val = let
|
||||
mkButton = shortcut: cmd: val: hl: {
|
||||
type = "button";
|
||||
inherit val;
|
||||
opts = {
|
||||
inherit hl shortcut;
|
||||
keymap = [
|
||||
"n"
|
||||
shortcut
|
||||
cmd
|
||||
{}
|
||||
];
|
||||
position = "center";
|
||||
cursor = 0;
|
||||
width = 40;
|
||||
align_shortcut = "right";
|
||||
hl_shortcut = "Keyword";
|
||||
};
|
||||
};
|
||||
in [
|
||||
(
|
||||
mkButton
|
||||
"f"
|
||||
"<CMD>lua require('telescope.builtin').find_files({hidden = true})<CR>"
|
||||
"🔍 Find File"
|
||||
"Operator"
|
||||
)
|
||||
(
|
||||
mkButton
|
||||
"q"
|
||||
"<CMD>qa<CR>"
|
||||
"💣 Quit Neovim"
|
||||
"String"
|
||||
)
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "padding";
|
||||
val = 2;
|
||||
}
|
||||
{
|
||||
opts = {
|
||||
hl = "Gruvbox";
|
||||
position = "center";
|
||||
};
|
||||
type = "text";
|
||||
val = "https://github.com/bloxx12/nichts";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
{pkgs, ...}: {
|
||||
programs.nixvim = {
|
||||
extraPlugins = with pkgs.vimUtils; [
|
||||
(buildVimPlugin {
|
||||
pname = "btw.nvim";
|
||||
version = "2024-04-36";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "letieu";
|
||||
repo = "btw.nvim";
|
||||
rev = "47f6419e90d3383987fd06e8f3e06a4bc032ac83";
|
||||
hash = "sha256-91DZUfa4FBvXnkcNHdllr82Dr1Ie+MGVD3ibwkqo04c=";
|
||||
};
|
||||
})
|
||||
];
|
||||
extraPlugins = with pkgs.vimUtils; [
|
||||
(buildVimPlugin {
|
||||
pname = "btw.nvim";
|
||||
version = "2024-04-36";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "letieu";
|
||||
repo = "btw.nvim";
|
||||
rev = "47f6419e90d3383987fd06e8f3e06a4bc032ac83";
|
||||
hash = "sha256-91DZUfa4FBvXnkcNHdllr82Dr1Ie+MGVD3ibwkqo04c=";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
extraConfigLua = ''
|
||||
require('btw').setup({
|
||||
text = "I use Neovim (and NixOS, BTW)",
|
||||
})
|
||||
'';
|
||||
};
|
||||
extraConfigLua = ''
|
||||
require('btw').setup({
|
||||
text = "I use Neovim (and NixOS, BTW)",
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,172 +6,172 @@
|
|||
colors = import ../../colors/${config.theme}.nix {};
|
||||
in {
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
bufferline = {
|
||||
enable = true;
|
||||
separatorStyle = "thick"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin”
|
||||
highlights = {
|
||||
fill = {
|
||||
fg = colors.base00;
|
||||
bg = colors.base00;
|
||||
};
|
||||
background = {
|
||||
fg = colors.base03;
|
||||
bg = colors.base00;
|
||||
};
|
||||
bufferSelected = {
|
||||
fg = colors.base05;
|
||||
bg = colors.base00;
|
||||
italic = false;
|
||||
};
|
||||
bufferVisible = {
|
||||
fg = colors.base03;
|
||||
bg = colors.base00;
|
||||
};
|
||||
closeButton = {
|
||||
fg = colors.base03;
|
||||
bg = colors.base00;
|
||||
};
|
||||
closeButtonVisible = {
|
||||
fg = colors.base03;
|
||||
bg = colors.base00;
|
||||
};
|
||||
closeButtonSelected = {
|
||||
fg = colors.base08;
|
||||
bg = colors.base00;
|
||||
};
|
||||
plugins = {
|
||||
bufferline = {
|
||||
enable = true;
|
||||
separatorStyle = "thick"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin”
|
||||
highlights = {
|
||||
fill = {
|
||||
fg = colors.base00;
|
||||
bg = colors.base00;
|
||||
};
|
||||
background = {
|
||||
fg = colors.base03;
|
||||
bg = colors.base00;
|
||||
};
|
||||
bufferSelected = {
|
||||
fg = colors.base05;
|
||||
bg = colors.base00;
|
||||
italic = false;
|
||||
};
|
||||
bufferVisible = {
|
||||
fg = colors.base03;
|
||||
bg = colors.base00;
|
||||
};
|
||||
closeButton = {
|
||||
fg = colors.base03;
|
||||
bg = colors.base00;
|
||||
};
|
||||
closeButtonVisible = {
|
||||
fg = colors.base03;
|
||||
bg = colors.base00;
|
||||
};
|
||||
closeButtonSelected = {
|
||||
fg = colors.base08;
|
||||
bg = colors.base00;
|
||||
};
|
||||
|
||||
indicatorSelected = {
|
||||
fg = colors.base00;
|
||||
bg = colors.base00;
|
||||
};
|
||||
modified = {
|
||||
fg = colors.base03;
|
||||
bg = colors.base00;
|
||||
};
|
||||
modifiedVisible = {
|
||||
fg = colors.base00;
|
||||
bg = colors.base00;
|
||||
};
|
||||
modifiedSelected = {
|
||||
fg = colors.base0B;
|
||||
bg = colors.base00;
|
||||
};
|
||||
tabClose = {
|
||||
fg = colors.base00;
|
||||
bg = colors.base00;
|
||||
indicatorSelected = {
|
||||
fg = colors.base00;
|
||||
bg = colors.base00;
|
||||
};
|
||||
modified = {
|
||||
fg = colors.base03;
|
||||
bg = colors.base00;
|
||||
};
|
||||
modifiedVisible = {
|
||||
fg = colors.base00;
|
||||
bg = colors.base00;
|
||||
};
|
||||
modifiedSelected = {
|
||||
fg = colors.base0B;
|
||||
bg = colors.base00;
|
||||
};
|
||||
tabClose = {
|
||||
fg = colors.base00;
|
||||
bg = colors.base00;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Tab>";
|
||||
action = "<cmd>BufferLineCycleNext<cr>";
|
||||
options = {
|
||||
desc = "Cycle to next buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-Tab>";
|
||||
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||
options = {
|
||||
desc = "Cycle to previous buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-l>";
|
||||
action = "<cmd>BufferLineCycleNext<cr>";
|
||||
options = {
|
||||
desc = "Cycle to next buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-h>";
|
||||
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||
options = {
|
||||
desc = "Cycle to previous buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bd";
|
||||
action = "<cmd>bdelete<cr>";
|
||||
options = {
|
||||
desc = "Delete buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bb";
|
||||
action = "<cmd>e #<cr>";
|
||||
options = {
|
||||
desc = "Switch to Other Buffer";
|
||||
};
|
||||
}
|
||||
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<leader>`";
|
||||
# action = "<cmd>e #<cr>";
|
||||
# options = {
|
||||
# desc = "Switch to Other Buffer";
|
||||
# };
|
||||
# }
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>br";
|
||||
action = "<cmd>BufferLineCloseRight<cr>";
|
||||
options = {
|
||||
desc = "Delete buffers to the right";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bl";
|
||||
action = "<cmd>BufferLineCloseLeft<cr>";
|
||||
options = {
|
||||
desc = "Delete buffers to the left";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bo";
|
||||
action = "<cmd>BufferLineCloseOthers<cr>";
|
||||
options = {
|
||||
desc = "Delete other buffers";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bp";
|
||||
action = "<cmd>BufferLineTogglePin<cr>";
|
||||
options = {
|
||||
desc = "Toggle pin";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bP";
|
||||
action = "<Cmd>BufferLineGroupClose ungrouped<CR>";
|
||||
options = {
|
||||
desc = "Delete non-pinned buffers";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Tab>";
|
||||
action = "<cmd>BufferLineCycleNext<cr>";
|
||||
options = {
|
||||
desc = "Cycle to next buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-Tab>";
|
||||
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||
options = {
|
||||
desc = "Cycle to previous buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-l>";
|
||||
action = "<cmd>BufferLineCycleNext<cr>";
|
||||
options = {
|
||||
desc = "Cycle to next buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-h>";
|
||||
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||
options = {
|
||||
desc = "Cycle to previous buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bd";
|
||||
action = "<cmd>bdelete<cr>";
|
||||
options = {
|
||||
desc = "Delete buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bb";
|
||||
action = "<cmd>e #<cr>";
|
||||
options = {
|
||||
desc = "Switch to Other Buffer";
|
||||
};
|
||||
}
|
||||
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<leader>`";
|
||||
# action = "<cmd>e #<cr>";
|
||||
# options = {
|
||||
# desc = "Switch to Other Buffer";
|
||||
# };
|
||||
# }
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>br";
|
||||
action = "<cmd>BufferLineCloseRight<cr>";
|
||||
options = {
|
||||
desc = "Delete buffers to the right";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bl";
|
||||
action = "<cmd>BufferLineCloseLeft<cr>";
|
||||
options = {
|
||||
desc = "Delete buffers to the left";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bo";
|
||||
action = "<cmd>BufferLineCloseOthers<cr>";
|
||||
options = {
|
||||
desc = "Delete other buffers";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bp";
|
||||
action = "<cmd>BufferLineTogglePin<cr>";
|
||||
options = {
|
||||
desc = "Toggle pin";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bP";
|
||||
action = "<Cmd>BufferLineGroupClose ungrouped<CR>";
|
||||
options = {
|
||||
desc = "Delete non-pinned buffers";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,47 +1,47 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins.notify = {
|
||||
enable = true;
|
||||
backgroundColour = "#000000";
|
||||
fps = 60;
|
||||
render = "default";
|
||||
timeout = 1000;
|
||||
topDown = true;
|
||||
plugins.notify = {
|
||||
enable = true;
|
||||
backgroundColour = "#000000";
|
||||
fps = 60;
|
||||
render = "default";
|
||||
timeout = 1000;
|
||||
topDown = true;
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>un";
|
||||
action = ''
|
||||
<cmd>lua require("notify").dismiss({ silent = true, pending = true })<cr>
|
||||
'';
|
||||
options = {
|
||||
desc = "Dismiss All Notifications";
|
||||
};
|
||||
}
|
||||
];
|
||||
extraConfigLua = ''
|
||||
local notify = require("notify")
|
||||
|
||||
local filtered_message = { "No information available" }
|
||||
|
||||
-- Override notify function to filter out messages
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
vim.notify = function(message, level, opts)
|
||||
local merged_opts = vim.tbl_extend("force", {
|
||||
on_open = function(win)
|
||||
local buf = vim.api.nvim_win_get_buf(win)
|
||||
vim.api.nvim_buf_set_option(buf, "filetype", "markdown")
|
||||
end,
|
||||
}, opts or {})
|
||||
|
||||
for _, msg in ipairs(filtered_message) do
|
||||
if message == msg then
|
||||
return
|
||||
end
|
||||
end
|
||||
return notify(message, level, merged_opts)
|
||||
end
|
||||
'';
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>un";
|
||||
action = ''
|
||||
<cmd>lua require("notify").dismiss({ silent = true, pending = true })<cr>
|
||||
'';
|
||||
options = {
|
||||
desc = "Dismiss All Notifications";
|
||||
};
|
||||
}
|
||||
];
|
||||
extraConfigLua = ''
|
||||
local notify = require("notify")
|
||||
|
||||
local filtered_message = { "No information available" }
|
||||
|
||||
-- Override notify function to filter out messages
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
vim.notify = function(message, level, opts)
|
||||
local merged_opts = vim.tbl_extend("force", {
|
||||
on_open = function(win)
|
||||
local buf = vim.api.nvim_win_get_buf(win)
|
||||
vim.api.nvim_buf_set_option(buf, "filetype", "markdown")
|
||||
end,
|
||||
}, opts or {})
|
||||
|
||||
for _, msg in ipairs(filtered_message) do
|
||||
if message == msg then
|
||||
return
|
||||
end
|
||||
end
|
||||
return notify(message, level, merged_opts)
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,212 +1,212 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
extensions = {
|
||||
file-browser = {
|
||||
enable = true;
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
extensions = {
|
||||
file-browser = {
|
||||
enable = true;
|
||||
};
|
||||
fzf-native = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
fzf-native = {
|
||||
enable = true;
|
||||
settings = {
|
||||
defaults = {
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
prompt_position = "top";
|
||||
};
|
||||
};
|
||||
sorting_strategy = "ascending";
|
||||
};
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
defaults = {
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
prompt_position = "top";
|
||||
keymaps = {
|
||||
"<leader><space>" = {
|
||||
action = "find_files, {}";
|
||||
options = {
|
||||
desc = "Find project files";
|
||||
};
|
||||
};
|
||||
sorting_strategy = "ascending";
|
||||
};
|
||||
};
|
||||
keymaps = {
|
||||
"<leader><space>" = {
|
||||
action = "find_files, {}";
|
||||
options = {
|
||||
desc = "Find project files";
|
||||
"<leader>/" = {
|
||||
action = "live_grep";
|
||||
options = {
|
||||
desc = "Grep (root dir)";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>/" = {
|
||||
action = "live_grep";
|
||||
options = {
|
||||
desc = "Grep (root dir)";
|
||||
"<leader>:" = {
|
||||
action = "command_history, {}";
|
||||
options = {
|
||||
desc = "Command History";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>:" = {
|
||||
action = "command_history, {}";
|
||||
options = {
|
||||
desc = "Command History";
|
||||
"<leader>b" = {
|
||||
action = "buffers, {}";
|
||||
options = {
|
||||
desc = "+buffer";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>b" = {
|
||||
action = "buffers, {}";
|
||||
options = {
|
||||
desc = "+buffer";
|
||||
"<leader>ff" = {
|
||||
action = "find_files, {}";
|
||||
options = {
|
||||
desc = "Find project files";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>ff" = {
|
||||
action = "find_files, {}";
|
||||
options = {
|
||||
desc = "Find project files";
|
||||
"<leader>fr" = {
|
||||
action = "live_grep, {}";
|
||||
options = {
|
||||
desc = "Find text";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>fr" = {
|
||||
action = "live_grep, {}";
|
||||
options = {
|
||||
desc = "Find text";
|
||||
"<leader>fR" = {
|
||||
action = "resume, {}";
|
||||
options = {
|
||||
desc = "Resume";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>fR" = {
|
||||
action = "resume, {}";
|
||||
options = {
|
||||
desc = "Resume";
|
||||
"<leader>fg" = {
|
||||
action = "oldfiles, {}";
|
||||
options = {
|
||||
desc = "Recent";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>fg" = {
|
||||
action = "oldfiles, {}";
|
||||
options = {
|
||||
desc = "Recent";
|
||||
"<leader>fb" = {
|
||||
action = "buffers, {}";
|
||||
options = {
|
||||
desc = "Buffers";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>fb" = {
|
||||
action = "buffers, {}";
|
||||
options = {
|
||||
desc = "Buffers";
|
||||
"<C-p>" = {
|
||||
action = "git_files, {}";
|
||||
options = {
|
||||
desc = "Search git files";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<C-p>" = {
|
||||
action = "git_files, {}";
|
||||
options = {
|
||||
desc = "Search git files";
|
||||
"<leader>gc" = {
|
||||
action = "git_commits, {}";
|
||||
options = {
|
||||
desc = "Commits";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>gc" = {
|
||||
action = "git_commits, {}";
|
||||
options = {
|
||||
desc = "Commits";
|
||||
"<leader>gs" = {
|
||||
action = "git_status, {}";
|
||||
options = {
|
||||
desc = "Status";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>gs" = {
|
||||
action = "git_status, {}";
|
||||
options = {
|
||||
desc = "Status";
|
||||
"<leader>sa" = {
|
||||
action = "autocommands, {}";
|
||||
options = {
|
||||
desc = "Auto Commands";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>sa" = {
|
||||
action = "autocommands, {}";
|
||||
options = {
|
||||
desc = "Auto Commands";
|
||||
"<leader>sb" = {
|
||||
action = "current_buffer_fuzzy_find, {}";
|
||||
options = {
|
||||
desc = "Buffer";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>sb" = {
|
||||
action = "current_buffer_fuzzy_find, {}";
|
||||
options = {
|
||||
desc = "Buffer";
|
||||
"<leader>sc" = {
|
||||
action = "command_history, {}";
|
||||
options = {
|
||||
desc = "Command History";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>sc" = {
|
||||
action = "command_history, {}";
|
||||
options = {
|
||||
desc = "Command History";
|
||||
"<leader>sC" = {
|
||||
action = "commands, {}";
|
||||
options = {
|
||||
desc = "Commands";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>sC" = {
|
||||
action = "commands, {}";
|
||||
options = {
|
||||
desc = "Commands";
|
||||
"<leader>sD" = {
|
||||
action = "diagnostics, {}";
|
||||
options = {
|
||||
desc = "Workspace diagnostics";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>sD" = {
|
||||
action = "diagnostics, {}";
|
||||
options = {
|
||||
desc = "Workspace diagnostics";
|
||||
"<leader>sh" = {
|
||||
action = "help_tags, {}";
|
||||
options = {
|
||||
desc = "Help pages";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>sh" = {
|
||||
action = "help_tags, {}";
|
||||
options = {
|
||||
desc = "Help pages";
|
||||
"<leader>sH" = {
|
||||
action = "highlights, {}";
|
||||
options = {
|
||||
desc = "Search Highlight Groups";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>sH" = {
|
||||
action = "highlights, {}";
|
||||
options = {
|
||||
desc = "Search Highlight Groups";
|
||||
"<leader>sk" = {
|
||||
action = "keymaps, {}";
|
||||
options = {
|
||||
desc = "Keymaps";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>sk" = {
|
||||
action = "keymaps, {}";
|
||||
options = {
|
||||
desc = "Keymaps";
|
||||
"<leader>sM" = {
|
||||
action = "man_pages, {}";
|
||||
options = {
|
||||
desc = "Man pages";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>sM" = {
|
||||
action = "man_pages, {}";
|
||||
options = {
|
||||
desc = "Man pages";
|
||||
"<leader>sm" = {
|
||||
action = "marks, {}";
|
||||
options = {
|
||||
desc = "Jump to Mark";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>sm" = {
|
||||
action = "marks, {}";
|
||||
options = {
|
||||
desc = "Jump to Mark";
|
||||
"<leader>so" = {
|
||||
action = "vim_options, {}";
|
||||
options = {
|
||||
desc = "Options";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>so" = {
|
||||
action = "vim_options, {}";
|
||||
options = {
|
||||
desc = "Options";
|
||||
"<leader>sR" = {
|
||||
action = "resume, {}";
|
||||
options = {
|
||||
desc = "Resume";
|
||||
};
|
||||
};
|
||||
};
|
||||
"<leader>sR" = {
|
||||
action = "resume, {}";
|
||||
options = {
|
||||
desc = "Resume";
|
||||
};
|
||||
};
|
||||
"<leader>uC" = {
|
||||
action = "colorscheme, {}";
|
||||
options = {
|
||||
desc = "Colorscheme preview";
|
||||
"<leader>uC" = {
|
||||
action = "colorscheme, {}";
|
||||
options = {
|
||||
desc = "Colorscheme preview";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>sd";
|
||||
action = "<cmd>Telescope diagnostics bufnr=0<cr>";
|
||||
options = {
|
||||
desc = "Document diagnostics";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fe";
|
||||
action = "<cmd>Telescope file_browser<cr>";
|
||||
options = {
|
||||
desc = "File browser";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fE";
|
||||
action = "<cmd>Telescope file_browser path=%:p:h select_buffer=true<cr>";
|
||||
options = {
|
||||
desc = "File browser";
|
||||
};
|
||||
}
|
||||
];
|
||||
extraConfigLua = ''
|
||||
require("telescope").setup{
|
||||
pickers = {
|
||||
colorscheme = {
|
||||
enable_preview = true
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>sd";
|
||||
action = "<cmd>Telescope diagnostics bufnr=0<cr>";
|
||||
options = {
|
||||
desc = "Document diagnostics";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fe";
|
||||
action = "<cmd>Telescope file_browser<cr>";
|
||||
options = {
|
||||
desc = "File browser";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fE";
|
||||
action = "<cmd>Telescope file_browser path=%:p:h select_buffer=true<cr>";
|
||||
options = {
|
||||
desc = "File browser";
|
||||
};
|
||||
}
|
||||
];
|
||||
extraConfigLua = ''
|
||||
require("telescope").setup{
|
||||
pickers = {
|
||||
colorscheme = {
|
||||
enable_preview = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,48 +11,48 @@
|
|||
};
|
||||
in {
|
||||
programs.nixvim = {
|
||||
extraPlugins = with pkgs.vimUtils; [
|
||||
(buildVimPlugin {
|
||||
pname = "copilotchat";
|
||||
version = "2.4.0";
|
||||
src = pkgs.fetchFromGitHub copilotChatRepo;
|
||||
meta = {
|
||||
description = "Chat with GitHub Copilot in Neovim";
|
||||
homepage = "https://github.com/CopilotC-Nvim/CopilotChat.nvim/";
|
||||
license = lib.licenses.gpl3;
|
||||
};
|
||||
})
|
||||
];
|
||||
extraConfigLua = ''
|
||||
require("CopilotChat").setup { }
|
||||
'';
|
||||
extraPlugins = with pkgs.vimUtils; [
|
||||
(buildVimPlugin {
|
||||
pname = "copilotchat";
|
||||
version = "2.4.0";
|
||||
src = pkgs.fetchFromGitHub copilotChatRepo;
|
||||
meta = {
|
||||
description = "Chat with GitHub Copilot in Neovim";
|
||||
homepage = "https://github.com/CopilotC-Nvim/CopilotChat.nvim/";
|
||||
license = lib.licenses.gpl3;
|
||||
};
|
||||
})
|
||||
];
|
||||
extraConfigLua = ''
|
||||
require("CopilotChat").setup { }
|
||||
'';
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>a";
|
||||
action = "+copilot";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>ae";
|
||||
action = "<cmd>CopilotChatExplain<cr>";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>af";
|
||||
action = "<cmd>CopilotChatFix<cr>";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>ad";
|
||||
action = "<cmd>CopilotChatDocs<cr>";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>ac";
|
||||
action = "<cmd>CopilotChatCommit<cr>";
|
||||
}
|
||||
];
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>a";
|
||||
action = "+copilot";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>ae";
|
||||
action = "<cmd>CopilotChatExplain<cr>";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>af";
|
||||
action = "<cmd>CopilotChatFix<cr>";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>ad";
|
||||
action = "<cmd>CopilotChatDocs<cr>";
|
||||
}
|
||||
{
|
||||
mode = "x";
|
||||
key = "<leader>ac";
|
||||
action = "<cmd>CopilotChatCommit<cr>";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,58 +1,58 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins.flash = {
|
||||
enable = true;
|
||||
labels = "asdfghjklqwertyuiopzxcvbnm";
|
||||
search = {
|
||||
mode = "fuzzy";
|
||||
};
|
||||
jump = {
|
||||
autojump = true;
|
||||
};
|
||||
label = {
|
||||
uppercase = false;
|
||||
rainbow = {
|
||||
enabled = false;
|
||||
shade = 5;
|
||||
plugins.flash = {
|
||||
enable = true;
|
||||
labels = "asdfghjklqwertyuiopzxcvbnm";
|
||||
search = {
|
||||
mode = "fuzzy";
|
||||
};
|
||||
jump = {
|
||||
autojump = true;
|
||||
};
|
||||
label = {
|
||||
uppercase = false;
|
||||
rainbow = {
|
||||
enabled = false;
|
||||
shade = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = ["n" "x" "o"];
|
||||
key = "s";
|
||||
action = "<cmd>lua require('flash').jump()<cr>";
|
||||
options = {
|
||||
desc = "Flash";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = ["n" "x" "o"];
|
||||
key = "S";
|
||||
action = "<cmd>lua require('flash').treesitter()<cr>";
|
||||
options = {
|
||||
desc = "Flash Treesitter";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "o";
|
||||
key = "r";
|
||||
action = "<cmd>lua require('flash').remote()<cr>";
|
||||
options = {
|
||||
desc = "Remote Flash";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = ["x" "o"];
|
||||
key = "R";
|
||||
action = "<cmd>lua require('flash').treesitter_search()<cr>";
|
||||
options = {
|
||||
desc = "Treesitter Search";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = ["n" "x" "o"];
|
||||
key = "s";
|
||||
action = "<cmd>lua require('flash').jump()<cr>";
|
||||
options = {
|
||||
desc = "Flash";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = ["n" "x" "o"];
|
||||
key = "S";
|
||||
action = "<cmd>lua require('flash').treesitter()<cr>";
|
||||
options = {
|
||||
desc = "Flash Treesitter";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "o";
|
||||
key = "r";
|
||||
action = "<cmd>lua require('flash').remote()<cr>";
|
||||
options = {
|
||||
desc = "Remote Flash";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = ["x" "o"];
|
||||
key = "R";
|
||||
action = "<cmd>lua require('flash').treesitter_search()<cr>";
|
||||
options = {
|
||||
desc = "Treesitter Search";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
{pkgs, ...}: {
|
||||
programs.nixvim = {
|
||||
extraPlugins = with pkgs.vimUtils; [
|
||||
(buildVimPlugin {
|
||||
pname = "grapple.nvim";
|
||||
version = "1.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "cbochs";
|
||||
repo = "grapple.nvim";
|
||||
rev = "59d458e378c4884f22b7a68e61c07ed3e41aabf0";
|
||||
hash = "sha256-4k8BE9i8kG4pL7Fj0xw9cG8sjA0u4jzJ40WSV/lBFhY=";
|
||||
};
|
||||
})
|
||||
];
|
||||
extraPlugins = with pkgs.vimUtils; [
|
||||
(buildVimPlugin {
|
||||
pname = "grapple.nvim";
|
||||
version = "1.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "cbochs";
|
||||
repo = "grapple.nvim";
|
||||
rev = "59d458e378c4884f22b7a68e61c07ed3e41aabf0";
|
||||
hash = "sha256-4k8BE9i8kG4pL7Fj0xw9cG8sjA0u4jzJ40WSV/lBFhY=";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
extraConfigLua = ''
|
||||
require('grapple').setup({
|
||||
scope = "git_branch",
|
||||
})
|
||||
'';
|
||||
extraConfigLua = ''
|
||||
require('grapple').setup({
|
||||
scope = "git_branch",
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,52 +1,52 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins.oil = {
|
||||
enable = true;
|
||||
settings = {
|
||||
useDefaultKeymaps = true;
|
||||
deleteToTrash = true;
|
||||
float = {
|
||||
padding = 2;
|
||||
maxWidth = 0; # ''math.ceil(vim.o.lines * 0.8 - 4)'';
|
||||
maxHeight = 0; # ''math.ceil(vim.o.columns * 0.8)'';
|
||||
border = "rounded"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
|
||||
winOptions = {
|
||||
winblend = 0;
|
||||
plugins.oil = {
|
||||
enable = true;
|
||||
settings = {
|
||||
useDefaultKeymaps = true;
|
||||
deleteToTrash = true;
|
||||
float = {
|
||||
padding = 2;
|
||||
maxWidth = 0; # ''math.ceil(vim.o.lines * 0.8 - 4)'';
|
||||
maxHeight = 0; # ''math.ceil(vim.o.columns * 0.8)'';
|
||||
border = "rounded"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
|
||||
winOptions = {
|
||||
winblend = 0;
|
||||
};
|
||||
};
|
||||
preview = {
|
||||
border = "rounded";
|
||||
};
|
||||
keymaps = {
|
||||
"g?" = "actions.show_help";
|
||||
"<CR>" = "actions.select";
|
||||
"<C-\\>" = "actions.select_vsplit";
|
||||
"<C-enter>" = "actions.select_split"; # this is used to navigate left
|
||||
"<C-t>" = "actions.select_tab";
|
||||
"<C-v>" = "actions.preview";
|
||||
"<C-c>" = "actions.close";
|
||||
"<C-r>" = "actions.refresh";
|
||||
"-" = "actions.parent";
|
||||
"_" = "actions.open_cwd";
|
||||
"`" = "actions.cd";
|
||||
"~" = "actions.tcd";
|
||||
"gs" = "actions.change_sort";
|
||||
"gx" = "actions.open_external";
|
||||
"g." = "actions.toggle_hidden";
|
||||
"q" = "actions.close";
|
||||
};
|
||||
};
|
||||
preview = {
|
||||
border = "rounded";
|
||||
};
|
||||
keymaps = {
|
||||
"g?" = "actions.show_help";
|
||||
"<CR>" = "actions.select";
|
||||
"<C-\\>" = "actions.select_vsplit";
|
||||
"<C-enter>" = "actions.select_split"; # this is used to navigate left
|
||||
"<C-t>" = "actions.select_tab";
|
||||
"<C-v>" = "actions.preview";
|
||||
"<C-c>" = "actions.close";
|
||||
"<C-r>" = "actions.refresh";
|
||||
"-" = "actions.parent";
|
||||
"_" = "actions.open_cwd";
|
||||
"`" = "actions.cd";
|
||||
"~" = "actions.tcd";
|
||||
"gs" = "actions.change_sort";
|
||||
"gx" = "actions.open_external";
|
||||
"g." = "actions.toggle_hidden";
|
||||
"q" = "actions.close";
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "-";
|
||||
action = ":Oil<CR>";
|
||||
options = {
|
||||
desc = "Open parent directory";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "-";
|
||||
action = ":Oil<CR>";
|
||||
options = {
|
||||
desc = "Open parent directory";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
plugins.undotree = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autoOpenDiff = true;
|
||||
focusOnToggle = true;
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ut";
|
||||
action = "<cmd>UndotreeToggle<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Undotree";
|
||||
plugins.undotree = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autoOpenDiff = true;
|
||||
focusOnToggle = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ut";
|
||||
action = "<cmd>UndotreeToggle<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Undotree";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# Enable auto indenting and set it to spaces
|
||||
smartindent = true;
|
||||
shiftwidth = 2;
|
||||
# Enable smart indenting (see https://stackoverflow.com/questions/1204149/smart-wrap-in-vim)
|
||||
# Enable smart indenting (see https://stackoverflow.com/questions/1204149/smart-wrap-in-vim)
|
||||
breakindent = true;
|
||||
|
||||
# Enable incremental searching
|
||||
|
@ -82,7 +82,6 @@
|
|||
|
||||
# We don't need to see things like INSERT anymore
|
||||
showmode = false;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue