116 lines
2.7 KiB
Nix
116 lines
2.7 KiB
Nix
{ pkgs, inputs, ... }:
|
|
|
|
{
|
|
imports = [
|
|
inputs.nixvim.homeModules.nixvim
|
|
];
|
|
home.packages = with pkgs; [
|
|
ripgrep
|
|
gcc
|
|
];
|
|
home.file.".config/nvim/extraconfig.fnl" = {
|
|
source = ./extraconfig.fnl;
|
|
};
|
|
home.file.".config/nvim/.nfnl.fnl" = {
|
|
source = ./.nfnl.fnl;
|
|
};
|
|
# Compile Fennel to Lua at build time
|
|
home.file.".config/nvim/extraconfig.lua" = {
|
|
text = builtins.readFile (
|
|
pkgs.runCommand "extraconfig-compiled.lua" {
|
|
buildInputs = [ pkgs.luajitPackages.fennel ];
|
|
} ''
|
|
${pkgs.luajitPackages.fennel}/bin/fennel --compile ${./extraconfig.fnl} > $out
|
|
''
|
|
);
|
|
};
|
|
programs.nixvim = {
|
|
enable = true;
|
|
colorschemes.nord.enable = true;
|
|
opts = {
|
|
clipboard = "unnamedplus";
|
|
number = true;
|
|
relativenumber = true;
|
|
shiftwidth = 2;
|
|
tabstop = 2;
|
|
expandtab = true;
|
|
smartindent = true;
|
|
};
|
|
|
|
plugins = {
|
|
conjure.enable = true;
|
|
avante = {
|
|
enable = true;
|
|
};
|
|
dressing.enable = true;
|
|
lsp.enable = true;
|
|
lsp.servers = {
|
|
lua_ls.enable = true;
|
|
rust_analyzer = {
|
|
enable = true;
|
|
installRustc = true;
|
|
installCargo = true;
|
|
};
|
|
pyright.enable = true;
|
|
clangd.enable = true;
|
|
zls.enable = true;
|
|
nixd.enable = true;
|
|
};
|
|
|
|
cmp.enable = true;
|
|
cmp-nvim-lsp.enable = true;
|
|
cmp-buffer.enable = true;
|
|
cmp-path.enable = true;
|
|
|
|
lspkind.enable = true;
|
|
lsp-lines.enable = true;
|
|
|
|
treesitter = {
|
|
enable = true;
|
|
};
|
|
|
|
none-ls = {
|
|
enable = true;
|
|
sources = {
|
|
formatting = {
|
|
stylua.enable = true;
|
|
shfmt.enable = true;
|
|
};
|
|
diagnostics = {
|
|
# luacheck.enable = true;
|
|
};
|
|
code_actions = {
|
|
statix.enable = true;
|
|
};
|
|
};
|
|
};
|
|
conform-nvim.enable = true;
|
|
|
|
};
|
|
extraPlugins = with pkgs.vimPlugins; [
|
|
nvim-web-devicons
|
|
(pkgs.vimUtils.buildVimPlugin {
|
|
name = "nfnl";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "Olical";
|
|
repo = "nfnl";
|
|
rev = "v1.3.0";
|
|
hash = "sha256-ug2vAVI3C99TZxFpXw/+AJLRAc+3FLq92bFVhkZUL7A=";
|
|
};
|
|
})
|
|
(pkgs.vimUtils.buildVimPlugin {
|
|
name = "vim-fennel-syntax";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "m15a";
|
|
repo = "vim-fennel-syntax";
|
|
rev = "e7299d5"; #v1.3.0
|
|
hash = "sha256-CL3ooywWpGicmzine9qteHTGajAZ2qnIcK9CByaONvc=";
|
|
};
|
|
})
|
|
];
|
|
extraConfigLua = ''
|
|
-- Load compiled Fennel config
|
|
dofile(vim.fn.expand("~/.config/nvim/extraconfig.lua"))
|
|
'';
|
|
};
|
|
}
|