init: init
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./lsp.nix
|
||||
./none-ls.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
inlayHints = true;
|
||||
servers = {
|
||||
asm_lsp.enable = true;
|
||||
lua_ls = {
|
||||
enable = true;
|
||||
settings.telemetry.enable = false;
|
||||
};
|
||||
pyright.enable = true;
|
||||
mlir_lsp_server.enable = true;
|
||||
nixd.enable = true;
|
||||
nil_ls.enable = true;
|
||||
clangd = {
|
||||
enable = true;
|
||||
cmd = [
|
||||
"clangd"
|
||||
];
|
||||
};
|
||||
eslint.enable = true;
|
||||
hls = {
|
||||
enable = true;
|
||||
installGhc = true;
|
||||
settings.haskell = {
|
||||
formattingProvider = "fourmolu";
|
||||
};
|
||||
};
|
||||
html.enable = true;
|
||||
jsonls.enable = true;
|
||||
ocamllsp.enable = true;
|
||||
nushell.enable = true;
|
||||
ts_ls.enable = true;
|
||||
zls.enable = true;
|
||||
};
|
||||
};
|
||||
cmp-emoji = {
|
||||
enable = true;
|
||||
};
|
||||
cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autoEnableSources = true;
|
||||
experimental = {
|
||||
ghost_text = true;
|
||||
};
|
||||
performance = {
|
||||
debounce = 60;
|
||||
fetchingTimeout = 200;
|
||||
};
|
||||
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.__raw = "cmp.config.window.bordered()";
|
||||
documentation.__raw = "cmp.config.window.bordered()";
|
||||
};
|
||||
|
||||
mapping = {
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<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
|
||||
luasnip = {
|
||||
enable = true;
|
||||
settings = {
|
||||
enable_autosnippets = true;
|
||||
store_selection_keys = "<Tab>";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
lsp-format.enable = true;
|
||||
none-ls = {
|
||||
enable = true;
|
||||
enableLspFormat = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./cmp
|
||||
./plugins
|
||||
|
||||
./keymaps.nix
|
||||
./options.nix
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
colorschemes.catppuccin.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
globals.mapleader = " ";
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>n";
|
||||
action = "<cmd>NvimTreeFindFileToggle<cr>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
"v"
|
||||
"t"
|
||||
];
|
||||
key = "<c-\\>";
|
||||
action = "<cmd>ToggleTerm<cr>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
"v"
|
||||
];
|
||||
key = "<c-l>";
|
||||
action = "<cmd>BufferLineCycleNext<cr>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
"v"
|
||||
];
|
||||
key = "<c-h>";
|
||||
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
"v"
|
||||
];
|
||||
key = "<c-j>";
|
||||
action = "<cmd>BufferLineGoToBuffer 1<cr>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
"v"
|
||||
];
|
||||
key = "<c-k>";
|
||||
action = "<cmd>BufferLineGoToBuffer -1<cr>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader><leader>";
|
||||
action = "<cmd>Yazi<cr>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>a";
|
||||
action = "<cmd>AerialToggle<cr>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "{";
|
||||
action = "<cmd>AerialPrev<cr>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "}";
|
||||
action = "<cmd>AerialNext<cr>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>c";
|
||||
action = ":hori term ";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
autoCmd = [
|
||||
{
|
||||
event = [ "VimLeave" ];
|
||||
command = ":set guicursor=a:ver90-blinkon0";
|
||||
}
|
||||
];
|
||||
diagnostic.settings = {
|
||||
virtual_lines = {
|
||||
current_line = true;
|
||||
};
|
||||
float = {
|
||||
border = "rounded";
|
||||
source = "always";
|
||||
};
|
||||
};
|
||||
opts = {
|
||||
shell = "nu";
|
||||
|
||||
fillchars = "eob: ";
|
||||
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
|
||||
tabstop = 4;
|
||||
softtabstop = 4;
|
||||
showtabline = 4;
|
||||
shiftwidth = 4;
|
||||
expandtab = true;
|
||||
smartindent = true;
|
||||
breakindent = true;
|
||||
|
||||
hlsearch = true;
|
||||
incsearch = true;
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
splitbelow = true;
|
||||
splitright = true;
|
||||
|
||||
mouse = "a";
|
||||
|
||||
updatetime = 50;
|
||||
|
||||
swapfile = false;
|
||||
backup = false;
|
||||
undofile = true;
|
||||
|
||||
scrolloff = 10;
|
||||
|
||||
cursorline = true;
|
||||
|
||||
wildmenu = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim.plugins.codesnap = {
|
||||
enable = true;
|
||||
settings = {
|
||||
has_line_number = true;
|
||||
bg_theme = "grape";
|
||||
watermark = "";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
|
||||
./codesnap.nix
|
||||
./rustaceanvim.nix
|
||||
./telescope.nix
|
||||
./toggleterm.nix
|
||||
./treesitter.nix
|
||||
];
|
||||
|
||||
programs.nixvim.plugins = {
|
||||
aerial.enable = true;
|
||||
bufferline.enable = true;
|
||||
colorizer.enable = true;
|
||||
comment.enable = true;
|
||||
crates.enable = true;
|
||||
fidget.enable = true;
|
||||
lazygit.enable = true;
|
||||
lsp-lines.enable = true;
|
||||
lualine.enable = true;
|
||||
nvim-tree.enable = true;
|
||||
nvim-autopairs.enable = true;
|
||||
quickmath.enable = true;
|
||||
render-markdown.enable = true;
|
||||
treesj.enable = true;
|
||||
visual-multi.enable = true;
|
||||
web-devicons.enable = true;
|
||||
yazi.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim.plugins.rustaceanvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
tools.enable_clippy = true;
|
||||
server = {
|
||||
default_settings = {
|
||||
inlayHints = {
|
||||
lifetimeElisionHints = {
|
||||
enable = "always";
|
||||
};
|
||||
};
|
||||
rust-analyzer = {
|
||||
cargo = {
|
||||
allFeatures = true;
|
||||
};
|
||||
check = {
|
||||
command = "clippy";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim.plugins.telescope = {
|
||||
enable = true;
|
||||
extensions = {
|
||||
# file-browser.enable = true;
|
||||
fzf-native.enable = true;
|
||||
# media-files.enable = true;
|
||||
};
|
||||
settings = {
|
||||
pickers.colorscheme.enable_preview = true;
|
||||
|
||||
defaults = {
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
prompt_position = "bottom";
|
||||
};
|
||||
};
|
||||
sorting_strategy = "descending";
|
||||
};
|
||||
};
|
||||
keymaps = {
|
||||
# "<leader><space>" = {
|
||||
# action = "find_files";
|
||||
# options.desc = "Find Project Files";
|
||||
# };
|
||||
"<leader>f" = {
|
||||
action = "live_grep";
|
||||
options.desc = "Find Text";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim.plugins.toggleterm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
direction = "horizontal";
|
||||
float_opts = {
|
||||
border = "curved";
|
||||
};
|
||||
shell = "nu";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim.plugins.treesitter = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_install = true;
|
||||
highlight.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user