Compare commits

...

7 Commits

11 changed files with 118 additions and 35 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
result
cache-*
.direnv

44
flake.lock generated
View File

@@ -9,11 +9,11 @@
]
},
"locked": {
"lastModified": 1756548623,
"narHash": "sha256-p52cyY7LYaroc3P0ag4JOtfEVHrChRuKwOdiSEL0TN0=",
"lastModified": 1762359884,
"narHash": "sha256-0+KyxOh7WUm6rRLfb936X48qBhYL5aRYn2OBEj4G1/s=",
"owner": "Saghen",
"repo": "blink.cmp",
"rev": "7b0548e5103e295f465be00b1bb7770c548776c1",
"rev": "40380e711b616a28affb0f4086a2f7de2f2a556b",
"type": "github"
},
"original": {
@@ -31,11 +31,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1747032090,
"narHash": "sha256-htgrHIR/P7V8WeRW/XDWJHXBzbTSWCDYZHsxPAzDuUY=",
"lastModified": 1761028747,
"narHash": "sha256-UqCbRuqnsVURCB0hLZL9SwFNDNftIE1Zxj7Ykf1aRj4=",
"owner": "nix-community",
"repo": "fenix",
"rev": "1436bb8b85b35ca3ba64ad97df31a3b23c7610a3",
"rev": "1dd37dd710195936f675eb0d36cf284806f99a94",
"type": "github"
},
"original": {
@@ -100,11 +100,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1756386758,
"narHash": "sha256-1wxxznpW2CKvI9VdniaUnTT2Os6rdRJcRUf65ZK9OtE=",
"lastModified": 1762596750,
"narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "dfb2f12e899db4876308eba6d93455ab7da304cd",
"rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e",
"type": "github"
},
"original": {
@@ -126,22 +126,40 @@
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
}
},
"nordic-nvim-src": {
"flake": false,
"locked": {
"lastModified": 1676228565,
"narHash": "sha256-u/QNfWt45XXaDeiycT0VfLLrVS360u76up4axcX/ZOU=",
"owner": "andersevenrud",
"repo": "nordic.nvim",
"rev": "3338c514e5b5feade29a9c2ed295c9f034f7f05b",
"type": "github"
},
"original": {
"owner": "andersevenrud",
"ref": "pull/93/head",
"repo": "nordic.nvim",
"type": "github"
}
},
"root": {
"inputs": {
"blink-cmp": "blink-cmp",
"go-grip": "go-grip",
"mdfmt": "mdfmt",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"nordic-nvim-src": "nordic-nvim-src"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1746889290,
"narHash": "sha256-h3LQYZgyv2l3U7r+mcsrEOGRldaK0zJFwAAva4hV/6g=",
"lastModified": 1760976639,
"narHash": "sha256-v+teOfOLbR9UFLuaMfbsd/L5ckJBcQJyeFj23V3lz8g=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "2bafe9d96c6734aacfd49e115f6cf61e7adc68bc",
"rev": "4a305f565ab964caf22dc72980a44b2970a9c2f1",
"type": "github"
},
"original": {

View File

@@ -7,6 +7,10 @@
url = "github:Saghen/blink.cmp";
inputs.nixpkgs.follows = "nixpkgs";
};
nordic-nvim-src = {
url = "github:andersevenrud/nordic.nvim/pull/93/head";
flake = false;
};
go-grip = {
url = "github:guz013/go-grip";
inputs.nixpkgs.follows = "nixpkgs";
@@ -34,7 +38,7 @@
in
f {
inherit pkgs;
inherit (pkgs) lib;
inherit (pkgs) lib stdenv;
}
);
in {
@@ -44,20 +48,25 @@
{
pkgs,
lib,
stdenv,
...
}: {
neovim = import ./package.nix {
inherit pkgs lib;
blink-cmp = inputs.blink-cmp.packages.${pkgs.system}.default;
go-grip = inputs.go-grip.packages.${pkgs.system}.default;
mdfmt = self.packages.${pkgs.system}.mdfmt;
blink-cmp = inputs.blink-cmp.packages.${stdenv.hostPlatform.system}.default;
go-grip = inputs.go-grip.packages.${stdenv.hostPlatform.system}.default;
nordic-nvim = pkgs.vimUtils.buildVimPlugin {
inherit (pkgs.vimPlugins.nordic-nvim) version pname meta;
src = inputs.nordic-nvim-src;
};
mdfmt = self.packages.${stdenv.hostPlatform.system}.mdfmt;
};
mdfmt = pkgs.buildGoModule {
name = "mdfmt";
src = inputs.mdfmt;
vendorHash = "sha256-JtYvDgjUoEc1Mp7Eq8lbu9jWI+RR9yBo4ujGY+J70J4=";
};
default = self.packages."${pkgs.system}".neovim;
default = self.packages."${stdenv.hostPlatform.system}".neovim;
}
);
devShells = forAllSystems (

View File

@@ -1,6 +1,40 @@
return {
-- Frappurccino/Catppuccin theme
-- Theme
{
"nordic.nvim",
priority = 1000,
after = function()
require("nordic").colorscheme({
transparent_backgrounds = true,
minimal_mode = true,
custom_colors = function(c, s, cs)
local functions = {
-- TS
"TSFunction",
"TSFuncMacro",
"TSMethod",
-- TS Query
"@function",
"@function.macro",
"@method",
"Function", -- VL
"pythonfunction", -- python
"vimFunction",
"vimUserFunc", -- vim
}
local variables = {
"@variable.nix", -- TS Query
}
return {
{ functions, c.bright_cyan },
{ variables, c.cyan },
}
end,
})
end,
},
--[[ {
"catppuccin-nvim",
priority = 1000,
after = function()
@@ -8,9 +42,9 @@ return {
flavour = "mocha",
transparent_background = true,
})
vim.cmd.colorscheme("catppuccin")
-- vim.cmd.colorscheme("catppuccin")
end,
},
}, ]]
-- Status bar
{
@@ -20,7 +54,7 @@ return {
require("lualine").setup({
options = {
icons_enabled = false,
theme = "catppuccin",
theme = "nord",
component_separators = "|",
section_separators = "",
},

View File

@@ -8,12 +8,12 @@ return {
"nvim-dap-go",
},
keys = {
{ "<leader>b", ":lua require('dap').toggle_breakpoint()<cr>", "[Debugger] Toggle breakpoint" },
{ "<leader>x", ":lua require('dap').continue()<cr>", "[Debugger] Continue debugger" },
{ "<leader>X", ":lua require('dap').terminate()<cr>", "[Debugger] Terminate debugger" },
{ "<leader>C", ":lua require('dap').clear_breakpoints()<cr>", "[Debugger] Clear all breakpoints" },
{ "<leader>b", ":lua require('dap').toggle_breakpoint()<cr>", "[Debugger] Toggle breakpoint" },
{ "<leader>x", ":lua require('dap').continue()<cr>", "[Debugger] Continue debugger" },
{ "<leader>X", ":lua require('dap').terminate()<cr>", "[Debugger] Terminate debugger" },
{ "<leader>C", ":lua require('dap').clear_breakpoints()<cr>", "[Debugger] Clear all breakpoints" },
-- UI
{ "<leader>xu", ":lua require('dapui').toggle()<cr>", "[Debugger] Toggle debugger UI" },
{ "<leader>xu", ":lua require('dapui').toggle()<cr>", "[Debugger] Toggle debugger UI" },
{
"<leader>K",
":lua require('dapui').eval(nil, { enter = true })<cr>",

View File

@@ -205,6 +205,14 @@ return {
end,
},
-- Todo comments explorer
{
"todo-comments.nvim",
after = function()
require("todo-comments").setup()
end,
},
-- File explorer
{
-- (Probably can be replaced by local functions in the config)

View File

@@ -9,5 +9,8 @@ return {
{ import = "dot013.plugins.treesitter" },
-- Global Dependencies
{ "plenary.nvim", dep_of = { "telescope.nvim", "harpoon" } },
{
"plenary.nvim",
dep_of = { "harpoon", "telescope.nvim", "todo-comments.nvim" },
},
}

View File

@@ -3,6 +3,6 @@ return {
"aw-watcher.nvim",
after = function()
require("aw_watcher").setup({})
end
}
end,
},
}

View File

@@ -37,9 +37,15 @@ local lsps = {
},
},
["gopls"] = {},
["golangci_lint_ls"] = {},
["golangci_lint_ls"] = function()
if vim.fn.executable("golangci-list") == 1 then
return {}
else
return nil
end
end,
["html"] = {},
-- ["htmx"] = {}, # BORKED: blink.cmp stops working whtn htmx-lsp is attached https://github.com/Saghen/blink.cmp/issues/825
["htmx"] = {},
["jsonls"] = {},
["nil_ls"] = {
cmd = { "nil" },
@@ -57,7 +63,6 @@ return {
{
"nvim-lspconfig",
after = function()
local lsp = require("lspconfig")
for k, v in pairs(lsps) do
if type(v) == "function" then
v = v()
@@ -69,7 +74,8 @@ return {
v.capabilities = require("blink.cmp").get_lsp_capabilities(v.capabilities)
lsp[k].setup(v)
vim.lsp.enable(k)
vim.lsp.config(k, v)
end
vim.diagnostic.config({

View File

@@ -4,6 +4,7 @@
neovim ? pkgs.neovim,
blink-cmp ? pkgs.vimPlugins.blink-cmp,
ripgrep ? pkgs.ripgrep,
nordic-nvim ? pkgs.vimPlugins.nordic-nvim,
mdfmt ? null,
go-grip ? null,
yazi ? pkgs.yazi,
@@ -11,7 +12,7 @@
}: let
start =
(with pkgs.vimPlugins; [
catppuccin-nvim
# catppuccin-nvim
indent-blankline-nvim
lze
nvim-lspconfig
@@ -29,6 +30,7 @@
])
++ [
blink-cmp
nordic-nvim
];
opt = with pkgs.vimPlugins; [
auto-save-nvim
@@ -54,6 +56,7 @@
telescope-nvim
telescope-zf-native-nvim
telescope-undo-nvim
todo-comments-nvim
trouble-nvim
tmux-nvim
vim-sleuth