Compare commits

...

3 commits

7 changed files with 112 additions and 47 deletions

View file

@ -134,11 +134,11 @@
"zig": "zig"
},
"locked": {
"lastModified": 1736210320,
"narHash": "sha256-QnDkQ/s1OWmPj1f+7MFNxQiAPJdHbI1Aft7yM5I+8gQ=",
"lastModified": 1736566108,
"narHash": "sha256-r+FXWU/hfgO3lAHYs9Q03iCShnC42mZd1pnmIIp8Z9k=",
"owner": "ghostty-org",
"repo": "ghostty",
"rev": "a3837a1e4ee06a183f32d4a622c2cdcd51f73fb8",
"rev": "918ccdba5cc65ccd1fb48a54c71306d869299441",
"type": "github"
},
"original": {
@ -221,11 +221,11 @@
]
},
"locked": {
"lastModified": 1736204492,
"narHash": "sha256-CoBPRgkUex9Iz6qGSzi/BFVUQjndB0PmME2B6eEyeCs=",
"lastModified": 1736508663,
"narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "20665c6efa83d71020c8730f26706258ba5c6b2a",
"rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc",
"type": "github"
},
"original": {
@ -266,11 +266,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1736233375,
"narHash": "sha256-I6fqKdaoKOVU33SyPv+MuxWRiOs+PXQTO94aCLA3rAc=",
"lastModified": 1736553940,
"narHash": "sha256-xicqHwvq2S/Y36DwcY+xGy6+4jdFT78bclBhwjs4KJY=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "721f5f602b876a3ee21be04f68ab3cedf162e7f6",
"rev": "b2237869f288c278b6fd429445d460cb44a0e788",
"type": "github"
},
"original": {
@ -282,11 +282,11 @@
"neovim-src": {
"flake": false,
"locked": {
"lastModified": 1736193797,
"narHash": "sha256-5S4RnwKfa5nn/r+8OsMtfgD6TEA5P6cWKti76A0zIMc=",
"lastModified": 1736553525,
"narHash": "sha256-Kfx1r0yVTTa83EdP7Ta5ValnXy4ak3F10hHCymDAU7o=",
"owner": "neovim",
"repo": "neovim",
"rev": "b6ab294838421afb6932c52dd6e6d35d571e621d",
"rev": "fbe546e25d21f3184814d696c329d23d146bd615",
"type": "github"
},
"original": {
@ -302,11 +302,11 @@
]
},
"locked": {
"lastModified": 1736047960,
"narHash": "sha256-hutd85FA1jUJhhqBRRJ+u7UHO9oFGD/RVm2x5w8WjVQ=",
"lastModified": 1736440205,
"narHash": "sha256-QJgTI//KEGuEJC6FDxuI9Dq8PewIpnxD2NVx2/OHbfc=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "816a6ae88774ba7e74314830546c29e134e0dffb",
"rev": "a2200b499efa01ca8646173e94cdfcc93188f2b8",
"type": "github"
},
"original": {
@ -349,11 +349,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1736061677,
"narHash": "sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60=",
"lastModified": 1736200483,
"narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "cbd8ec4de4469333c82ff40d057350c30e9f7d36",
"rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751",
"type": "github"
},
"original": {
@ -381,11 +381,11 @@
},
"nixpkgs-unstable_2": {
"locked": {
"lastModified": 1736134818,
"narHash": "sha256-30sOEZ8CFK2nTTMdkhaNrfVlIi3rWTNV0Z5z+NmpFNI=",
"lastModified": 1736420959,
"narHash": "sha256-dMGNa5UwdtowEqQac+Dr0d2tFO/60ckVgdhZU9q2E2o=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3df3c47c19dc90fec35359e89ffb52b34d2b0e94",
"rev": "32af3611f6f05655ca166a0b1f47b57c762b5192",
"type": "github"
},
"original": {
@ -397,11 +397,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1736042175,
"narHash": "sha256-jdd5UWtLVrNEW8K6u5sy5upNAFmF3S4Y+OIeToqJ1X8=",
"lastModified": 1736320768,
"narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bf689c40d035239a489de5997a4da5352434632e",
"rev": "4bc9c909d9ac828a039f288cf872d16d38185db8",
"type": "github"
},
"original": {
@ -413,11 +413,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1736012469,
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
"lastModified": 1736344531,
"narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
"rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912",
"type": "github"
},
"original": {

View file

@ -70,6 +70,7 @@
packages = with pkgs; [
just
nh
nil
nixd
nixfmt-rfc-style
];

View file

@ -1,9 +1,10 @@
require 'blink-cmp'.setup({
keymap = {
preset = 'enter',
-- preset = 'super-tab',
["<PageDown>"] = { "scroll_documentation_down" },
["<PageUp>"] = { "scroll_documentation_up" },
['<Tab>'] = { 'select_next', 'fallback' },
['<S-Tab>'] = { 'select_prev', 'fallback' },
['<PageDown>'] = { 'scroll_documentation_down', 'fallback' },
['<PageUp>'] = { 'scroll_documentation_up', 'fallback' },
},
completion = {
accept = {
@ -16,15 +17,36 @@ require 'blink-cmp'.setup({
window = { border = 'rounded', },
},
ghost_text = { enabled = true },
ghost_text = { enabled = false },
list = {
selection = { preselect = false, auto_insert = false },
selection = {
preselect = false,
auto_insert = false
},
},
menu = {
auto_show = false,
},
auto_show = true,
border = 'rounded',
direction_priority = { 'n' },
draw = {
components = {
kind_icon = {
ellipsis = false,
text = function(ctx)
local kind_icon, _, _ = require('mini.icons').get('lsp', ctx.kind)
return kind_icon
end,
-- Optionally, you may also use the highlights from mini.icons
highlight = function(ctx)
local _, hl, _ = require('mini.icons').get('lsp', ctx.kind)
return hl
end,
}
}
}
}
},
fuzzy = {
@ -39,7 +61,7 @@ require 'blink-cmp'.setup({
},
sources = {
default = { 'lsp', 'codeium', 'buffer' },
default = { 'lsp', 'codeium' },
cmdline = {},
providers = {
codeium = {

View file

@ -124,6 +124,27 @@ in
'';
}
{
plugin = pkgs.vimUtils.buildVimPlugin {
name = "neocodeium";
src = pkgs.fetchFromGitHub {
owner = "monkoose";
repo = "neocodeium";
rev = "4da81528468b33585c411f31eb390dce573ccb14"; # v1.8.0
hash = "sha256-1n9nNqBNwNDSzbAkm8eB4HZLNy5HmMg25jPwQAnW5OU=";
};
doCheck = false;
};
type = "lua";
config = ''
local neocodeium =require('neocodeium')
neocodeium.setup()
vim.keymap.set("i", "<C-j>", neocodeium.accept, { remap = true })
vim.keymap.set("i", "<A-f>", neocodeium.accept, { remap = true })
vim.keymap.set("i", "<C-h>", neocodeium.cycle_or_complete, { remap = true })
'';
}
{
plugin = pkgs.vimUtils.buildVimPlugin {
name = "diagflow";

View file

@ -34,7 +34,6 @@ local colors = {
selection = hsl(270, 75, 92),
highlight_subtle = hsl(0, 0, 94),
highlight_intense = hsl(42, 100, 30),
},
dark = {
@ -46,7 +45,7 @@ local colors = {
dimmed = hsl(212, 19, 25),
-- dimmed_subtle = hsl(212, 19, 70),
dimmed_subtle = hsl(212, 5, 65),
dimmed_subtle = hsl(212, 19, 50),
highlight_subtle = hsl(212, 27, 11),
highlight_intense = hsl(58, 100, 60),
@ -112,6 +111,8 @@ local setupGroups = function(c)
Special = { link = "NormalNC" },
Type = { link = "NormalNC" },
MsgArea = { fg = c.dimmed_subtle },
String = { fg = c.string },
Visual = { bg = c.selection },
@ -176,8 +177,8 @@ local setupGroups = function(c)
InclineNormalNC = { bg = c.background },
WinSeparator = { bg = c.dialog_bg, fg = c.dialog_fg },
NormalFloat = { bg = c.doc_bg, fg = c.doc_fg },
FloatBorder = { fg = c.doc_fg },
NormalFloat = { bg = c.background, fg = c.foreground },
FloatBorder = { fg = c.foreground },
FloatTitle = { fg = c.doc_fg, bold = true },
Title = { fg = c.foreground, bold = true },
@ -193,6 +194,7 @@ local setupGroups = function(c)
MiniClueDescGroup = { bg = c.background, fg = c.foreground, italic = true },
MiniClueDescSingle = { bg = c.background, fg = c.foreground },
MiniClueSeparator = { link = "MiniClueBorder" },
MiniClueSeparator = { link = "MiniClueBorder" },
MiniCursorWord = { underdotted = true, bold = true, sp = c.diagnostic_hint },

View file

@ -19,12 +19,31 @@ function GetIndicators()
local counts = vim.diagnostic.count(bufnr)
local errors = counts[vim.diagnostic.severity.ERROR] or 0
local warnings = counts[vim.diagnostic.severity.WARN] or 0
local warn_string = warnings > 0 and "%#DiagnosticWarn# " .. warnings .. " " or " "
local error_string = errors > 0 and "%#DiagnosticError# " .. errors .. " " or " "
local warn_string = warnings > 0 and "%#DiagnosticWarn# " .. warnings .. " " or ""
local error_string = errors > 0 and "%#DiagnosticError# " .. errors .. " " or ""
return warn_string .. error_string
end
vim.opt.rulerformat = "%40(%=%{%v:lua.GetIndicators()%}%#Label#│ %t %)"
function CondensedPath()
local path = vim.fn.expand("%:p")
-- path = vim.fn.fnamemodify(path, ':p')
local home = os.getenv("HOME")
if home then
path = vim.fn.substitute(path, '^' .. home, '~', '')
end
local segments = vim.fn.split(path, '/')
if #segments <= 3 then
return path
end
local early_path = table.concat(vim.list_slice(segments, 1, #segments - 2), '/')
local late_path = table.concat(vim.list_slice(segments, #segments - 1), '/')
return vim.fn.pathshorten(early_path) .. '/' .. late_path
end
vim.opt.rulerformat = "%50(%=%{%v:lua.GetIndicators()%}%#Label#%#MsgArea#| %{%v:lua.CondensedPath()%}%)"
-- Search
vim.opt.ignorecase = true
@ -65,9 +84,8 @@ vim.o.showcmd = false
vim.o.showmode = false
vim.o.smoothscroll = true
vim.o.splitkeep = "screen"
vim.o.timeoutlen = 10
vim.o.timeout = true
vim.o.updatetime = 50
vim.o.timeout = false
vim.o.updatetime = 250
-- Use rg
vim.o.grepprg = [[rg --glob "!.jj" --glob "!.git" --no-heading --vimgrep --follow $*]]

View file

@ -49,15 +49,16 @@ local picker_win_config = function()
height = height,
width = width,
row = 2,
col = math.floor((vim.o.columns - width) / 2),
col = 5,
}
end
require('mini.pick').setup({
mappings = {
move_down = '<tab>',
move_up = '<S-tab>',
toggle_info = '<C-k>',
toggle_preview = '<C-p>',
toggle_preview = 'p',
},
options = { use_cache = true },
window = {