added yanky

This commit is contained in:
cnst
2024-07-15 12:30:44 +02:00
parent 181e59a105
commit d6bbebf7f3
9 changed files with 107 additions and 96 deletions

View File

@@ -1,11 +1,5 @@
{
programs.nixvim.autoCmd = [
# Vertically center document when entering insert mode
{
event = "InsertEnter";
command = "norm zz";
}
# Open help in a vertical split
{
event = "FileType";
@@ -21,7 +15,7 @@
"latex"
"markdown"
];
command = "setlocal spell spelllang=en,fr";
command = "setlocal spell spelllang=en,se";
}
];
}

View File

@@ -17,6 +17,7 @@
inherit action key;
})
{
# "<C-c>" = "<cmd> %y+ <CR>";
"<Space>" = "<NOP>";
# Esc to clear search results
@@ -73,9 +74,18 @@
"K" = ":m '<-2<CR>gv=gv";
"J" = ":m '>+1<CR>gv=gv";
};
insert =
lib.mapAttrsToList
(key: action: {
mode = "i";
inherit action key;
})
{
"<C-v>" = "<esc>p";
};
in
config.nixvim.helpers.keymaps.mkKeymaps
{options.silent = true;}
(normal ++ visual);
(normal ++ visual ++ insert);
};
}

View File

@@ -37,10 +37,10 @@
smartcase = true; # Override the 'ignorecase' option if the search pattern contains upper
# case characters
scrolloff = 8; # Number of screen lines to show around the cursor
cursorline = false; # Highlight the screen line of the cursor
cursorline = true; # Highlight the screen line of the cursor
cursorcolumn = false; # Highlight the screen column of the cursor
signcolumn = "yes"; # Whether to show the signcolumn
colorcolumn = "100"; # Columns to highlight
colorcolumn = ""; # Columns to highlight
laststatus = 3; # When to use a status line for the last window
fileencoding = "utf-8"; # File-content encoding for the current buffer
termguicolors = true; # Enables 24-bit RGB color in the |TUI|

View File

@@ -1,5 +1,5 @@
{
plugins.conform-nvim = {
programs.nixvim.plugins.conform-nvim = {
enable = true;
formatOnSave = {
lspFallback = true;

View File

@@ -1,5 +1,4 @@
{pkgs, ...}:
{
{pkgs, ...}: {
imports = [
./barbar.nix
./comment.nix
@@ -17,10 +16,10 @@
./vimtex.nix
./nonels.nix
./conform.nix
./yanky.nix
];
programs.nixvim = {
extraPlugins = [pkgs.vimPlugins.gruvbox-material];
colorscheme = "gruvbox-material";

View File

@@ -22,59 +22,63 @@
};
};
# Language server
servers = {
# Average webdev LSPs
tsserver.enable = false; # TS/JS
cssls.enable = true; # CSS
tailwindcss.enable = true; # TailwindCSS
html.enable = true; # HTML
astro.enable = true; # AstroJS
phpactor.enable = true; # PHP
svelte.enable = false; # Svelte
vuels.enable = false; # Vue
# Language server
servers = {
# Average webdev LSPs
cssls.enable = true; # CSS
tailwindcss.enable = true; # TailwindCSS
html.enable = true; # HTML
astro.enable = true; # AstroJS
phpactor.enable = true; # PHP
svelte.enable = false; # Svelte
vuels.enable = false; # Vue
# Python
pyright.enable = true;
# Python
pyright.enable = true;
# Markdown
marksman.enable = true;
# Markdown
marksman.enable = true;
# Nix
nil-ls.enable = true;
# Nix
nil-ls.enable = true;
# Docker
dockerls.enable = true;
# Docker
dockerls.enable = true;
# Bash
bashls.enable = true;
# Bash
bashls.enable = true;
# C/C++
clangd.enable = true;
# C/C++
clangd.enable = true;
# C#
csharp-ls.enable = true;
# C#
csharp-ls.enable = true;
# Lua
lua-ls = {
enable = true;
settings.telemetry.enable = false;
};
# Rust
rust-analyzer = {
enable = true;
installRustc = true;
installCargo = true;
settings = {
checkOnSave = true;
check = {
command = "clippy";
# Lua
lua-ls = {
enable = true;
settings.telemetry.enable = false;
settings.diagnostics = {
globals = ["vim"];
};
};
tsserver = {
enable = false; # TS/JS
};
# Rust
rust-analyzer = {
enable = true;
installRustc = true;
installCargo = true;
settings = {
checkOnSave = true;
check = {
command = "clippy";
};
};
};
};
};
};
};
};
};
}

View File

@@ -1,6 +1,7 @@
{
programs.nixvim.plugins.lualine = {
enable = true;
theme = "gruvbox-material";
globalstatus = true;

View File

@@ -1,46 +1,44 @@
{
programs.nixvim.plugins.none-ls = {
enable = true;
settings = {
cmd = ["bash -c nvim"];
debug = true;
programs.nixvim.plugins.none-ls = {
enable = true;
settings = {
cmd = ["bash -c nvim"];
debug = true;
};
sources = {
code_actions = {
statix.enable = true;
gitsigns.enable = true;
};
sources = {
code_actions = {
statix.enable = true;
gitsigns.enable = true;
diagnostics = {
statix.enable = true;
deadnix.enable = true;
pylint.enable = true;
checkstyle.enable = true;
};
formatting = {
alejandra.enable = true;
stylua.enable = true;
shfmt.enable = true;
nixpkgs_fmt.enable = true;
google_java_format.enable = false;
prettier = {
enable = true;
disableTsServerFormatter = true;
};
diagnostics = {
statix.enable = true;
deadnix.enable = true;
pylint.enable = true;
checkstyle.enable = true;
};
formatting = {
alejandra.enable = true;
stylua.enable = true;
shfmt.enable = true;
nixpkgs_fmt.enable = true;
google_java_format.enable = false;
prettier = {
enable = true;
disableTsServerFormatter = true;
};
black = {
enable = true;
withArgs = ''
{
extra_args = { "--fast" },
}
'';
};
};
completion = {
luasnip.enable = true;
spell.enable = true;
black = {
enable = true;
withArgs = ''
{
extra_args = { "--fast" },
}
'';
};
};
completion = {
luasnip.enable = true;
spell.enable = true;
};
};
}
};
}

View File

@@ -0,0 +1,5 @@
{
programs.nixvim.plugins.yanky = {
enable = true;
};
}