nvim is cool now
This commit is contained in:
@@ -4,8 +4,7 @@
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
# Its in its own folder for future modulizaion efforts
|
||||
flake-file.inputs = {
|
||||
nixvim = {
|
||||
@@ -15,13 +14,20 @@
|
||||
};
|
||||
modules = {
|
||||
nixvim = {
|
||||
nixos =
|
||||
{ home-manager, ... }:
|
||||
{
|
||||
nixos = {home-manager, ...}: {
|
||||
};
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
homeManager = {pkgs, ...}: let
|
||||
tiny-code-action = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "tiny-code-action.nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "rachartier";
|
||||
repo = "tiny-code-action.nvim";
|
||||
rev = "main";
|
||||
hash = "sha256-UF9zeO5Uujdt2MEwy2d2Lhk6JRnEN4vrEvYslv0/zaA";
|
||||
};
|
||||
nvimSkipModules = ["tiny-code-action.previewers.snacks"];
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
];
|
||||
@@ -56,6 +62,7 @@
|
||||
lsp-status.enable = true;
|
||||
transparent.enable = true;
|
||||
which-key.enable = true;
|
||||
snacks.enable = true;
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
@@ -138,7 +145,7 @@
|
||||
"fileformat"
|
||||
"filetype"
|
||||
];
|
||||
lualine_y = [ "lsp_status" ];
|
||||
lualine_y = ["progress"];
|
||||
lualine_z = ["location"];
|
||||
};
|
||||
inactive_sections = {
|
||||
@@ -171,15 +178,30 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
trouble.enable = true;
|
||||
lsp-lines.enable = true;
|
||||
diaglist = {
|
||||
enable = true;
|
||||
settings = {
|
||||
debug = false;
|
||||
};
|
||||
};
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
settings = {
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
{
|
||||
name = "nvim_lsp";
|
||||
priority = 100;
|
||||
}
|
||||
{
|
||||
name = "buffer";
|
||||
priority = 50;
|
||||
}
|
||||
{
|
||||
name = "path";
|
||||
priority = 40;
|
||||
}
|
||||
];
|
||||
mapping = {
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
@@ -190,10 +212,21 @@
|
||||
"<S-Tab>" = "cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() else fallback() end end, {'i', 's'})";
|
||||
"<Tab>" = "cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() else fallback() end end, {'i', 's'})";
|
||||
};
|
||||
window = {
|
||||
completion = {
|
||||
border = "rounded";
|
||||
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuSel,Search:None";
|
||||
};
|
||||
documentation = {
|
||||
border = "rounded";
|
||||
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lspkind.enable = true;
|
||||
tiny-inline-diagnostic.enable = true;
|
||||
# tiny-code-action.enable = true;
|
||||
# persisted.enable = true;
|
||||
auto-session = {
|
||||
enable = false;
|
||||
@@ -239,6 +272,9 @@
|
||||
vimPlugins.melange-nvim
|
||||
vimPlugins.telescope-file-browser-nvim
|
||||
vimPlugins.lsp-progress-nvim
|
||||
vimPlugins.cmp-cmdline
|
||||
vimPlugins.cmp-nvim-lsp-signature-help
|
||||
tiny-code-action
|
||||
];
|
||||
opts = {
|
||||
number = true;
|
||||
@@ -250,6 +286,42 @@
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
};
|
||||
extraConfigLua = ''
|
||||
local cmp = require('cmp')
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources(
|
||||
{ { name = 'path' } },
|
||||
{ { name = 'cmdline' } }
|
||||
),
|
||||
window = {
|
||||
completion = {
|
||||
border = 'rounded',
|
||||
},
|
||||
},
|
||||
})
|
||||
cmp.setup.cmdline('/', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
},
|
||||
window = {
|
||||
completion = {
|
||||
border = 'rounded',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require('tiny-code-action').setup({
|
||||
backend = 'vim',
|
||||
picker = 'snacks',
|
||||
resolve_timeout = 100,
|
||||
notify = {
|
||||
enabled = true,
|
||||
on_empty = true,
|
||||
},
|
||||
})
|
||||
'';
|
||||
keymaps = [
|
||||
{
|
||||
action = "<cmd>Telescope persisted<cr>";
|
||||
@@ -294,12 +366,20 @@
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>Trouble diagnostics toggle<cr>";
|
||||
action = "<cmd>DiaglistToggle<cr>";
|
||||
key = "<leader>fd";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>lua require('tiny-code-action').code_action()<cr>";
|
||||
key = "<leader>ca";
|
||||
mode = ["n" "x"];
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
{modules, ...}: {
|
||||
modules.tmux = {
|
||||
homeManager =
|
||||
{ home, pkgs, ... }:
|
||||
{
|
||||
homeManager = {
|
||||
home,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
|
||||
Reference in New Issue
Block a user