feat: nvim: add Fennel config support via nfnl, treesitter, plugins
This commit is contained in:
parent
2e6aa91f36
commit
9d852d120e
2 changed files with 143 additions and 1 deletions
|
|
@ -6,7 +6,24 @@
|
|||
];
|
||||
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;
|
||||
|
|
@ -21,6 +38,7 @@
|
|||
};
|
||||
|
||||
plugins = {
|
||||
conjure.enable = true;
|
||||
avante = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
@ -47,6 +65,10 @@
|
|||
lspkind.enable = true;
|
||||
lsp-lines.enable = true;
|
||||
|
||||
treesitter = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
none-ls = {
|
||||
enable = true;
|
||||
sources = {
|
||||
|
|
@ -65,6 +87,30 @@
|
|||
conform-nvim.enable = true;
|
||||
|
||||
};
|
||||
extraConfigLua = builtins.readFile ./extraconfig.lua;
|
||||
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"))
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue