Neovim: Delete lazyvim module
This commit is contained in:
@ -11,7 +11,6 @@
|
|||||||
./helix
|
./helix
|
||||||
./hyprland
|
./hyprland
|
||||||
./kitty
|
./kitty
|
||||||
./lazyvim
|
|
||||||
./misc
|
./misc
|
||||||
./neovim
|
./neovim
|
||||||
./nextcloud
|
./nextcloud
|
||||||
|
@ -1,238 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
nixosConfig,
|
|
||||||
lib,
|
|
||||||
mylib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.lazyvim;
|
|
||||||
in {
|
|
||||||
options.modules.lazyvim = import ./options.nix {inherit lib mylib;};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
VISUAL = "nvim";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs;
|
|
||||||
builtins.concatLists [
|
|
||||||
(optionals cfg.neovide [neovide])
|
|
||||||
|
|
||||||
[
|
|
||||||
(pkgs.ripgrep.override {withPCRE2 = true;})
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
lua51Packages.lua-curl # For rest
|
|
||||||
lua51Packages.xml2lua # For rest
|
|
||||||
lua51Packages.mimetypes # For rest
|
|
||||||
lua51Packages.jsregexp # For tree-sitter
|
|
||||||
|
|
||||||
# Language servers
|
|
||||||
clang-tools_18
|
|
||||||
clojure-lsp
|
|
||||||
cmake-language-server
|
|
||||||
haskell-language-server
|
|
||||||
lua-language-server
|
|
||||||
nil
|
|
||||||
pyright
|
|
||||||
rust-analyzer
|
|
||||||
texlab
|
|
||||||
|
|
||||||
# Linters
|
|
||||||
checkstyle # java
|
|
||||||
clippy # rust
|
|
||||||
clj-kondo # clojure
|
|
||||||
eslint_d # javascript
|
|
||||||
python311Packages.flake8
|
|
||||||
lua51Packages.luacheck
|
|
||||||
vale # text
|
|
||||||
statix # nix
|
|
||||||
|
|
||||||
# Formatters
|
|
||||||
alejandra # nix
|
|
||||||
python311Packages.black
|
|
||||||
google-java-format
|
|
||||||
html-tidy
|
|
||||||
jq # json
|
|
||||||
prettierd # html/css/js
|
|
||||||
rustfmt
|
|
||||||
stylua
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
home.file.".config/nvim/parser".source = let
|
|
||||||
parsers = pkgs.symlinkJoin {
|
|
||||||
name = "treesitter-parsers";
|
|
||||||
paths = pkgs.vimPlugins.nvim-treesitter.withAllGrammars.dependencies;
|
|
||||||
};
|
|
||||||
in "${parsers}/parser";
|
|
||||||
|
|
||||||
home.file.".config/neovide/config.toml".text = ''
|
|
||||||
fork = true # Start neovide detached
|
|
||||||
frame = "none" # full, buttonless, none
|
|
||||||
idle = true # Don't render frames without changes
|
|
||||||
# maximized = true
|
|
||||||
title-hidden = true
|
|
||||||
# vsync = true
|
|
||||||
'';
|
|
||||||
|
|
||||||
home.file.".config/vale/.vale.ini".text = ''
|
|
||||||
# Core settings appear at the top
|
|
||||||
# (the "global" section).
|
|
||||||
|
|
||||||
[formats]
|
|
||||||
# Format associations appear under
|
|
||||||
# the optional "formats" section.
|
|
||||||
|
|
||||||
[*]
|
|
||||||
# Format-specific settings appear
|
|
||||||
# under a user-provided "glob"
|
|
||||||
# pattern.
|
|
||||||
'';
|
|
||||||
|
|
||||||
programs.nixvim = {
|
|
||||||
enable = true;
|
|
||||||
defaultEditor = true;
|
|
||||||
enableMan = true;
|
|
||||||
luaLoader.enable = true;
|
|
||||||
# colorschemes.catppuccin.enable = true;
|
|
||||||
viAlias = cfg.alias;
|
|
||||||
vimAlias = cfg.alias;
|
|
||||||
|
|
||||||
globals = {
|
|
||||||
mapleader = " ";
|
|
||||||
mallocalleader = " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
opts = import ./vim_opts.nix {inherit lib mylib;};
|
|
||||||
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
|
|
||||||
|
|
||||||
# extraLuaPackages = with pkgs.lua51Packages; [];
|
|
||||||
|
|
||||||
# extraPython3Packages = p: [
|
|
||||||
# # For CHADtree
|
|
||||||
# p.pyyaml
|
|
||||||
# p.pynvim-pp
|
|
||||||
# p.std2
|
|
||||||
# ];
|
|
||||||
|
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
|
||||||
lazy-nvim
|
|
||||||
];
|
|
||||||
|
|
||||||
autoCmd = [
|
|
||||||
{
|
|
||||||
event = ["BufWritePost"];
|
|
||||||
# pattern = "*";
|
|
||||||
callback = {__raw = "function() require('lint').try_lint() end";};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
event = ["BufWritePre"];
|
|
||||||
callback = {__raw = "function() require('conform').format() end";};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# TODO: Toggle wrapping
|
|
||||||
# TODO: Toggle format on save
|
|
||||||
# TODO: Toggle format on paste
|
|
||||||
keymaps = import ./keybinds.nix {inherit lib mylib;};
|
|
||||||
|
|
||||||
extraConfigLua = let
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
|
||||||
LazyVim # Sets many vim options
|
|
||||||
|
|
||||||
bufferline-nvim
|
|
||||||
cmp-buffer
|
|
||||||
cmp-nvim-lsp
|
|
||||||
cmp-path
|
|
||||||
cmp_luasnip
|
|
||||||
conform-nvim
|
|
||||||
dashboard-nvim
|
|
||||||
dressing-nvim
|
|
||||||
flash-nvim
|
|
||||||
friendly-snippets
|
|
||||||
gitsigns-nvim
|
|
||||||
indent-blankline-nvim
|
|
||||||
lualine-nvim
|
|
||||||
neo-tree-nvim
|
|
||||||
neoconf-nvim
|
|
||||||
neodev-nvim
|
|
||||||
noice-nvim
|
|
||||||
nui-nvim
|
|
||||||
nvim-cmp
|
|
||||||
nvim-lint
|
|
||||||
nvim-lspconfig
|
|
||||||
nvim-notify
|
|
||||||
nvim-spectre
|
|
||||||
nvim-treesitter
|
|
||||||
nvim-treesitter-context
|
|
||||||
nvim-treesitter-textobjects
|
|
||||||
nvim-ts-autotag
|
|
||||||
nvim-ts-context-commentstring
|
|
||||||
nvim-web-devicons
|
|
||||||
persistence-nvim
|
|
||||||
plenary-nvim
|
|
||||||
telescope-fzf-native-nvim
|
|
||||||
telescope-nvim
|
|
||||||
todo-comments-nvim
|
|
||||||
tokyonight-nvim
|
|
||||||
trouble-nvim
|
|
||||||
vim-illuminate
|
|
||||||
vim-startuptime
|
|
||||||
which-key-nvim
|
|
||||||
{
|
|
||||||
name = "LuaSnip";
|
|
||||||
path = luasnip;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "catppuccin";
|
|
||||||
path = catppuccin-nvim;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "mini.ai";
|
|
||||||
path = mini-nvim;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "mini.bufremove";
|
|
||||||
path = mini-nvim;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "mini.comment";
|
|
||||||
path = mini-nvim;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "mini.indentscope";
|
|
||||||
path = mini-nvim;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "mini.pairs";
|
|
||||||
path = mini-nvim;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "mini.surround";
|
|
||||||
path = mini-nvim;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
mkEntryFromDrv = drv:
|
|
||||||
if lib.isDerivation drv
|
|
||||||
then {
|
|
||||||
name = "${lib.getName drv}";
|
|
||||||
path = drv;
|
|
||||||
}
|
|
||||||
else drv;
|
|
||||||
|
|
||||||
lazyPath = pkgs.linkFarm "lazy-plugins" (builtins.map mkEntryFromDrv plugins);
|
|
||||||
in (
|
|
||||||
builtins.replaceStrings
|
|
||||||
["@lazyPath@"]
|
|
||||||
["${lazyPath}"]
|
|
||||||
(builtins.readFile ./extraConfigLua.lua)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
-- Skip loading LazyVim options
|
|
||||||
package.loaded["lazyvim.config.options"] = true
|
|
||||||
|
|
||||||
-- Hide inline diagnostics and show border
|
|
||||||
vim.diagnostic.config({
|
|
||||||
virtual_text = false,
|
|
||||||
float = { border = "rounded" },
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Allow navigating popupmenu completion with Up/Down
|
|
||||||
vim.api.nvim_set_keymap("c", "<Down>", 'v:lua.get_wildmenu_key("<right>", "<down>")', { expr = true })
|
|
||||||
vim.api.nvim_set_keymap("c", "<Up>", 'v:lua.get_wildmenu_key("<left>", "<up>")', { expr = true })
|
|
||||||
function _G.get_wildmenu_key(key_wildmenu, key_regular)
|
|
||||||
return vim.fn.wildmenumode() ~= 0 and key_wildmenu or key_regular
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Package manager setup
|
|
||||||
require("lazy").setup({
|
|
||||||
defaults = {
|
|
||||||
lazy = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
dev = {
|
|
||||||
-- reuse files from pkgs.vimPlugins.*
|
|
||||||
path = "@lazyPath@", -- NOTE: Will be replaced by the nix path
|
|
||||||
|
|
||||||
patterns = { "." },
|
|
||||||
|
|
||||||
-- fallback to download
|
|
||||||
fallback = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
spec = {
|
|
||||||
{
|
|
||||||
"LazyVim/LazyVim",
|
|
||||||
import = "lazyvim.plugins",
|
|
||||||
opts = {
|
|
||||||
defaults = {
|
|
||||||
autocmds = false, -- Skip loading LazyVim cmds
|
|
||||||
keymaps = false, -- Skip loading LazyVim keymaps
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- force enable telescope-fzf-native.nvim on nix
|
|
||||||
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
|
|
||||||
|
|
||||||
-- disable mason.nvim, use config.extraPackages on nix
|
|
||||||
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
|
||||||
{ "williamboman/mason.nvim", enabled = false },
|
|
||||||
|
|
||||||
-- uncomment to import/override with your plugins
|
|
||||||
-- { import = "plugins" },
|
|
||||||
|
|
||||||
-- put this line at the end of spec to clear ensure_installed on nix
|
|
||||||
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
|
|
||||||
},
|
|
||||||
})
|
|
@ -1,24 +0,0 @@
|
|||||||
local opt = vim.opt
|
|
||||||
local g = vim.g
|
|
||||||
local o = vim.o
|
|
||||||
|
|
||||||
-- Neovide
|
|
||||||
if g.neovide then
|
|
||||||
-- require("notify").notify("Running in NeoVide")
|
|
||||||
|
|
||||||
g.neovide_cursor_animate_command_line = true
|
|
||||||
g.neovide_cursor_animate_in_insert_mode = true
|
|
||||||
-- g.neovide_fullscreen = false
|
|
||||||
g.neovide_hide_mouse_when_typing = true
|
|
||||||
g.neovide_padding_top = 0
|
|
||||||
g.neovide_padding_bottom = 0
|
|
||||||
g.neovide_padding_right = 0
|
|
||||||
g.neovide_padding_left = 0
|
|
||||||
g.neovide_refresh_rate = 144
|
|
||||||
-- g.neovide_theme = "light"
|
|
||||||
|
|
||||||
-- Neovide Fonts
|
|
||||||
o.guifont = "JetBrainsMono Nerd Font:h13:Medium"
|
|
||||||
else
|
|
||||||
-- require("notify").notify("Not running in NeoVide")
|
|
||||||
end
|
|
@ -1,493 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
mylib,
|
|
||||||
...
|
|
||||||
}: [
|
|
||||||
# No Leader
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-s>";
|
|
||||||
action = "<cmd>w<CR>";
|
|
||||||
options.desc = "Save current buffer";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-S-s>";
|
|
||||||
action = "<cmd>wa<CR>";
|
|
||||||
options.desc = "Save all buffers";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "v";
|
|
||||||
key = "<";
|
|
||||||
action = "<gv";
|
|
||||||
options.desc = "Outdent";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "v";
|
|
||||||
key = ">";
|
|
||||||
action = ">gv";
|
|
||||||
options.desc = "Indent";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<";
|
|
||||||
action = "v<<Esc>";
|
|
||||||
options.desc = "Outdent";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = ">";
|
|
||||||
action = "v><Esc>";
|
|
||||||
options.desc = "Indent";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-d>";
|
|
||||||
action = "<C-d>zz";
|
|
||||||
options.desc = "Jump down";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-u>";
|
|
||||||
action = "<C-u>zz";
|
|
||||||
options.desc = "Jump up";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "n";
|
|
||||||
action = "nzzzv";
|
|
||||||
options.desc = "Next match";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "N";
|
|
||||||
action = "Nzzzv";
|
|
||||||
options.desc = "Previous match";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "i";
|
|
||||||
key = "<Tab>";
|
|
||||||
action = "<cmd>lua require('intellitab').indent()<CR>";
|
|
||||||
options.desc = "Indent";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "i";
|
|
||||||
key = "<C-BS>";
|
|
||||||
action = "<C-w>";
|
|
||||||
options.desc = "Delete previous word";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "i";
|
|
||||||
key = "<M-BS>";
|
|
||||||
action = "<C-w>";
|
|
||||||
options.desc = "Delete previous word";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "i";
|
|
||||||
key = "<C-S-v>";
|
|
||||||
action = "<Esc>\"+pi";
|
|
||||||
options.desc = "Paste from clipboard";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "i";
|
|
||||||
key = "<C-v>";
|
|
||||||
action = "<Esc>\"+pi";
|
|
||||||
options.desc = "Paste from clipboard";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "v";
|
|
||||||
key = "<C-S-c>";
|
|
||||||
action = "\"+y";
|
|
||||||
options.desc = "Copy to clipboard";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<C-h>";
|
|
||||||
action = "<cmd>nohlsearch<CR>";
|
|
||||||
options.desc = "Clear search highlights";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "K";
|
|
||||||
action = "<cmd>lua vim.lsp.buf.hover()<CR>";
|
|
||||||
options.desc = "Show LSP hover";
|
|
||||||
}
|
|
||||||
|
|
||||||
# General <leader>
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>qq";
|
|
||||||
action = "<cmd>quitall<CR>";
|
|
||||||
options.desc = "Quit";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>q!";
|
|
||||||
action = "<cmd>quitall!<CR>";
|
|
||||||
options.desc = "Forceful quit";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>L";
|
|
||||||
action = "<cmd>Lazy<CR>";
|
|
||||||
options.desc = "Show Lazy";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader><Space>";
|
|
||||||
action = "<cmd>Telescope buffers<CR>";
|
|
||||||
options.desc = "Show open buffers";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>S";
|
|
||||||
action = "<cmd>wa<CR>";
|
|
||||||
options.desc = "Save all buffers";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>f";
|
|
||||||
action = "<cmd>Telescope find_files<CR>";
|
|
||||||
options.desc = "Find file";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>o";
|
|
||||||
action = "<cmd>Telescope vim_options<CR>";
|
|
||||||
options.desc = "Show Vim options";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>u";
|
|
||||||
action = "<cmd>Telescope undo<CR>";
|
|
||||||
options.desc = "Show undo history";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>/";
|
|
||||||
action = "<cmd>Telescope current_buffer_fuzzy_find<CR>";
|
|
||||||
options.desc = "Find in current buffer";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>n";
|
|
||||||
action = "<cmd>Telescope notify<CR>";
|
|
||||||
options.desc = "Show notify history";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>s";
|
|
||||||
action = "<cmd>Telescope live_grep<CR>";
|
|
||||||
options.desc = "Find in working directory";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>r";
|
|
||||||
action = "<cmd>Telescope resume<CR>";
|
|
||||||
options.desc = "Show last telescope picker";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>?";
|
|
||||||
action = "<cmd>Telescope keymaps<CR>";
|
|
||||||
options.desc = "Show keymaps";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>:";
|
|
||||||
action = "<cmd>Telescope commands<CR>";
|
|
||||||
options.desc = "Execute command";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>M";
|
|
||||||
action = "<cmd>Telescope marks<CR>";
|
|
||||||
options.desc = "Show marks";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>J";
|
|
||||||
action = "<cmd>Telescope jumplist<CR>";
|
|
||||||
options.desc = "Show jumplist";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>m";
|
|
||||||
action = "<cmd>Telescope man_pages<CR>";
|
|
||||||
options.desc = "Show manpages";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>h";
|
|
||||||
action = "<cmd>Telescope help_tags<CR>";
|
|
||||||
options.desc = "Show help tags";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Quit <leader>q
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>q";
|
|
||||||
action = "+quit";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Buffers <leader>b
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>b";
|
|
||||||
action = "+buffers";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>bb";
|
|
||||||
action = "<cmd>Telescope buffers<CR>";
|
|
||||||
options.desc = "Show open buffers";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>bn";
|
|
||||||
action = "<cmd>bnext<CR>";
|
|
||||||
options.desc = "Goto next buffer";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>bp";
|
|
||||||
action = "<cmd>bprevious<CR>";
|
|
||||||
options.desc = "Goto previous buffer";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>bd";
|
|
||||||
action = "<cmd>Bdelete<CR>";
|
|
||||||
options.desc = "Close current buffer";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Windows <leader>w
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>w";
|
|
||||||
action = "+windows";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>ws";
|
|
||||||
action = "<C-w>s";
|
|
||||||
options.desc = "Split window horizontally";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>wv";
|
|
||||||
action = "<C-w>v";
|
|
||||||
options.desc = "Split window vertically";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>wd";
|
|
||||||
action = "<C-w>c";
|
|
||||||
options.desc = "Close current window";
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# mode = "n";
|
|
||||||
# key = "<leader>wh";
|
|
||||||
# action = "<C-W>s";
|
|
||||||
# options.desc = "Split window horizontally";
|
|
||||||
# }
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>wh";
|
|
||||||
action = "<C-w>h";
|
|
||||||
options.desc = "Goto left window";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>wl";
|
|
||||||
action = "<C-w>l";
|
|
||||||
options.desc = "Goto right window";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>wj";
|
|
||||||
action = "<C-w>j";
|
|
||||||
options.desc = "Goto bottom window";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>wk";
|
|
||||||
action = "<C-w>k";
|
|
||||||
options.desc = "Goto top window";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>ww";
|
|
||||||
action = "<C-w>p";
|
|
||||||
options.desc = "Goto other window";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Toggles <leader>t
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>t";
|
|
||||||
action = "+toggle";
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# mode = "n";
|
|
||||||
# key = "<leader>tt";
|
|
||||||
# action = "<cmd>Neotree action=show toggle=true<CR>";
|
|
||||||
# options.desc = "Toggle NeoTree";
|
|
||||||
# }
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>tt";
|
|
||||||
action = "<cmd>CHADopen --nofocus<CR>";
|
|
||||||
options.desc = "Toggle CHADtree";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>tn";
|
|
||||||
action = "<cmd>Navbuddy<CR>";
|
|
||||||
options.desc = "Toggle NavBuddy";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>td";
|
|
||||||
action = "<cmd>TroubleToggle focus=false<CR>";
|
|
||||||
options.desc = "Toggle Trouble";
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# mode = "n";
|
|
||||||
# key = "<leader>tg";
|
|
||||||
# action = "<cmd>LazyGit<CR>";
|
|
||||||
# }
|
|
||||||
# {
|
|
||||||
# mode = "n";
|
|
||||||
# key = "<leader>tp";
|
|
||||||
# action = "<cmd>TroubleToggle<CR>";
|
|
||||||
# }
|
|
||||||
|
|
||||||
# Git <leader>g
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>g";
|
|
||||||
action = "+git";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>gg";
|
|
||||||
action = "<cmd>LazyGit<CR>";
|
|
||||||
options.desc = "Show LazyGit";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>gm";
|
|
||||||
action = "<cmd>GitMessenger<CR>";
|
|
||||||
options.desc = "Show GitMessenger";
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# mode = "n";
|
|
||||||
# key = "<leader>gs";
|
|
||||||
# action = "<cmd>Git status<CR>";
|
|
||||||
# }
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>gs";
|
|
||||||
action = "<cmd>Telescope git_status<CR>";
|
|
||||||
options.desc = "Show Git status";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>gc";
|
|
||||||
action = "<cmd>Telescope git_commits<CR>";
|
|
||||||
options.desc = "Show Git log";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>gb";
|
|
||||||
action = "<cmd>Telescope git_branches<CR>";
|
|
||||||
options.desc = "Show Git branches";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>gf";
|
|
||||||
action = "<cmd>Telescope git_bcommits<CR>";
|
|
||||||
options.desc = "Show Git log for current file";
|
|
||||||
}
|
|
||||||
|
|
||||||
# LSP <leader>l
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>l";
|
|
||||||
action = "+lsp";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>lr";
|
|
||||||
action = "<cmd>Telescope lsp_references<CR>";
|
|
||||||
options.desc = "Goto references";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>ld";
|
|
||||||
action = "<cmd>Telescope lsp_definitions<CR>";
|
|
||||||
options.desc = "Goto definition";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>li";
|
|
||||||
action = "<cmd>Telescope lsp_implementations<CR>";
|
|
||||||
options.desc = "Goto implementation";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>lt";
|
|
||||||
action = "<cmd>Telescope lsp_type_definitions<CR>";
|
|
||||||
options.desc = "Goto type definition";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>lI";
|
|
||||||
action = "<cmd>Telescope lsp_incoming_calls<CR>";
|
|
||||||
options.desc = "Show incoming calls";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>lO";
|
|
||||||
action = "<cmd>Telescope lsp_outgoing_calls<CR>";
|
|
||||||
options.desc = "Show outgoing calls";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Code <leader>c
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>c";
|
|
||||||
action = "+code";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>cf";
|
|
||||||
action = "<cmd>lua require('conform').format()<CR>";
|
|
||||||
options.desc = "Format current buffer";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>cd";
|
|
||||||
action = "<cmd>Telescope diagnostics<CR>";
|
|
||||||
options.desc = "Show diagnostics";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>cr";
|
|
||||||
action = "<cmd>lua vim.lsp.buf.rename()<CR>";
|
|
||||||
options.desc = "Rename LSP symbol";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>ca";
|
|
||||||
action = "<cmd>lua vim.lsp.buf.code_action()<CR>";
|
|
||||||
options.desc = "Show LSP code actions";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>cD";
|
|
||||||
action = "<cmd>lua vim.diagnostic.open_float()<CR>";
|
|
||||||
options.desc = "Show LSP line diagnostics";
|
|
||||||
}
|
|
||||||
]
|
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
mylib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
|
||||||
with mylib.modules; {
|
|
||||||
enable = mkEnableOpt "LazyVim";
|
|
||||||
alias = mkBoolOpt false "Link nvim to vim/vi";
|
|
||||||
neovide = mkEnableOpt "NeoVide";
|
|
||||||
}
|
|
@ -1,64 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
mylib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
showmode = false; # Status line already shows this
|
|
||||||
backspace = ["indent" "eol" "start"];
|
|
||||||
termguicolors = true; # Required by multiple plugins
|
|
||||||
hidden = true; # Don't unload buffers immediately
|
|
||||||
mouse = "a";
|
|
||||||
completeopt = ["menuone" "noselect" "noinsert"];
|
|
||||||
timeoutlen = 50;
|
|
||||||
pumheight = 0;
|
|
||||||
formatexpr = "v:lua.require('conform').formatexpr()";
|
|
||||||
laststatus = 3;
|
|
||||||
# winblend = 30;
|
|
||||||
|
|
||||||
# Cursor
|
|
||||||
ruler = true; # Show cursor position in status line
|
|
||||||
number = true;
|
|
||||||
relativenumber = true;
|
|
||||||
signcolumn = "yes";
|
|
||||||
cursorline = true;
|
|
||||||
scrolloff = 10;
|
|
||||||
|
|
||||||
# Folding
|
|
||||||
foldcolumn = "0";
|
|
||||||
foldlevel = 99;
|
|
||||||
foldlevelstart = 99;
|
|
||||||
foldenable = true;
|
|
||||||
# foldmethod = "expr";
|
|
||||||
# foldexpr = "nvim_treesitter#foldexpr()";
|
|
||||||
|
|
||||||
# Files
|
|
||||||
encoding = "utf-8";
|
|
||||||
fileencoding = "utf-8";
|
|
||||||
# swapfile = true;
|
|
||||||
# backup = false;
|
|
||||||
undofile = true;
|
|
||||||
undodir = "/home/christoph/.vim/undo";
|
|
||||||
# autochdir = true;
|
|
||||||
|
|
||||||
# Search
|
|
||||||
incsearch = true; # Already highlight results while typing
|
|
||||||
hlsearch = true;
|
|
||||||
ignorecase = true;
|
|
||||||
smartcase = true;
|
|
||||||
grepprg = "rg --vimgrep";
|
|
||||||
grepformat = "%f:%l:%c:%m";
|
|
||||||
|
|
||||||
# Indentation
|
|
||||||
autoindent = false; # Use previous line indentation level - Might mess up comment indentation
|
|
||||||
smartindent = false; # Like autoindent but recognizes some C syntax - Might mess up comment indentation
|
|
||||||
cindent = true;
|
|
||||||
cinkeys = "0{,0},0),0],:,!^F,o,O,e"; # Fix comment (#) indentation and intellitab (somehow)
|
|
||||||
smarttab = true;
|
|
||||||
expandtab = true;
|
|
||||||
shiftwidth = 4;
|
|
||||||
tabstop = 4;
|
|
||||||
softtabstop = 4;
|
|
||||||
|
|
||||||
splitbelow = true;
|
|
||||||
splitright = true;
|
|
||||||
}
|
|
Reference in New Issue
Block a user