Initial commit
This commit is contained in:
commit
b79d352847
37 changed files with 2191 additions and 0 deletions
141
home/neovim.nix
Normal file
141
home/neovim.nix
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options = {
|
||||
custom.neovim.enable = lib.mkEnableOption "My neovim config";
|
||||
};
|
||||
config = lib.mkIf config.custom.neovim.enable {
|
||||
home = {
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
};
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
dropbar.enable = true;
|
||||
lspconfig.enable = true;
|
||||
guess-indent.enable = true;
|
||||
oil.enable = true;
|
||||
mini-statusline.enable = true;
|
||||
mini-pairs.enable = true;
|
||||
mini-pick.enable = true;
|
||||
mini-diff.enable = true;
|
||||
mini-indentscope.enable = true;
|
||||
mini-surround.enable = true;
|
||||
ts-autotag.enable = true;
|
||||
blink-cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
signature = {
|
||||
enabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
treesitter = {
|
||||
enable = true;
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
harpoon.enable = true;
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = "<cmd>Oil<CR>";
|
||||
key = "<leader>o";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('mini.pick').builtin.files()<CR>";
|
||||
key = "<leader>f";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('mini.pick').builtin.grep_live()<CR>";
|
||||
key = "<leader>g";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('mini.pick').builtin.help()<CR>";
|
||||
key = "<leader>h";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('mini.pick').builtin.resume()<CR>";
|
||||
key = "<leader>r";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.format()<CR>";
|
||||
key = "<leader>i";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.lsp.buf.code_action()<CR>";
|
||||
key = "<leader>a";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.diagnostic.goto_prev({ float = true })<CR>";
|
||||
key = "[d";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.diagnostic.goto_next({ float = true })<CR>";
|
||||
key = "]d";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua vim.diagnostic.setqflist()<CR>";
|
||||
key = "<leader>d";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('harpoon'):list():add()<CR>";
|
||||
key = "<leader>k";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('harpoon'):list():select(1)<CR>";
|
||||
key = "<M-q>";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('harpoon'):list():select(2)<CR>";
|
||||
key = "<M-w>";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('harpoon'):list():select(3)<CR>";
|
||||
key = "<M-e>";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('harpoon'):list():select(4)<CR>";
|
||||
key = "<M-r>";
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('harpoon').ui:toggle_quick_menu(require('harpoon'):list())<CR>";
|
||||
key = "<leader>j";
|
||||
}
|
||||
{
|
||||
action = "<cmd>CopyRelativePath<CR>";
|
||||
key = "<leader>p";
|
||||
}
|
||||
];
|
||||
globals.mapleader = " ";
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
swapfile = false;
|
||||
exrc = true;
|
||||
};
|
||||
colorschemes.catppuccin.enable = true;
|
||||
clipboard.register = "unnamedplus";
|
||||
userCommands = {
|
||||
CopyRelativePath = {
|
||||
command = "call setreg('+', expand('%'))";
|
||||
};
|
||||
};
|
||||
lsp.servers = {
|
||||
basedpyright.enable = true;
|
||||
gopls.enable = true;
|
||||
nil_ls.enable = true;
|
||||
rust_analyzer.enable = true;
|
||||
html.enable = true;
|
||||
jsonls.enable = true;
|
||||
yamlls.enable = true;
|
||||
cssls.enable = true;
|
||||
tailwindcss.enable = true;
|
||||
vtsls.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue