122 lines
3 KiB
Nix
122 lines
3 KiB
Nix
{ pkgs, config, ... }:
|
|
let
|
|
nvim-spell-fr-utf8-dictionary = builtins.fetchurl {
|
|
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.spl";
|
|
sha256 = "abfb9702b98d887c175ace58f1ab39733dc08d03b674d914f56344ef86e63b61";
|
|
};
|
|
|
|
nvim-spell-fr-utf8-suggestions = builtins.fetchurl {
|
|
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.sug";
|
|
sha256 = "0294bc32b42c90bbb286a89e23ca3773b7ef50eff1ab523b1513d6a25c6b3f58";
|
|
};
|
|
in
|
|
{
|
|
home.file."${config.xdg.configHome}/nvim/spell/fr.utf-8.spl".source = nvim-spell-fr-utf8-dictionary;
|
|
home.file."${config.xdg.configHome}/nvim/spell/fr.utf-8.sug".source = nvim-spell-fr-utf8-suggestions;
|
|
programs.neovim = {
|
|
enable = true;
|
|
defaultEditor = true;
|
|
vimAlias = true;
|
|
withNodeJs = true;
|
|
withPython3 = true;
|
|
extraPackages = with pkgs; [
|
|
# LSP Servers
|
|
clang-tools
|
|
lua-language-server
|
|
marksman
|
|
nil
|
|
nodePackages.bash-language-server
|
|
python3Packages.python-lsp-server
|
|
rnix-lsp
|
|
shellcheck
|
|
|
|
# Formatters
|
|
nixfmt
|
|
shfmt
|
|
];
|
|
extraLuaConfig = (builtins.readFile ./files/options.lua);
|
|
plugins = with pkgs.vimPlugins; [
|
|
{
|
|
plugin = nvim-autopairs;
|
|
type = "lua";
|
|
config = ''
|
|
local autopair = require("nvim-autopairs").setup {}
|
|
'';
|
|
}
|
|
{
|
|
plugin = nvim-base16;
|
|
type = "lua";
|
|
config = ''
|
|
vim.cmd.colorscheme 'base16-default-dark'
|
|
'';
|
|
}
|
|
{
|
|
plugin = nvim-cmp;
|
|
type = "lua";
|
|
config = (builtins.readFile ./files/cmp.lua);
|
|
}
|
|
cmp-buffer
|
|
cmp-nvim-lsp
|
|
cmp-path
|
|
cmp-cmdline
|
|
cmp_luasnip
|
|
{
|
|
plugin = gitsigns-nvim;
|
|
type = "lua";
|
|
config = (builtins.readFile ./files/luasnip.lua);
|
|
}
|
|
{
|
|
plugin = indent-blankline-nvim;
|
|
type = "lua";
|
|
config =''
|
|
require("ibl").setup{
|
|
indent = { char = "│"},
|
|
}
|
|
'';
|
|
}
|
|
{
|
|
plugin = nvim-lspconfig;
|
|
type = "lua";
|
|
config = (builtins.readFile ./files/lspconfig.lua);
|
|
}
|
|
{
|
|
plugin = lualine-nvim;
|
|
type = "lua";
|
|
config = (builtins.readFile ./files/lualine.lua);
|
|
}
|
|
luasnip
|
|
{
|
|
plugin = neo-tree-nvim;
|
|
type = "lua";
|
|
config = (builtins.readFile ./files/neotree.lua);
|
|
}
|
|
nui-nvim
|
|
plenary-nvim
|
|
{
|
|
plugin = (nvim-treesitter.withPlugins (p: [
|
|
p.bash
|
|
p.c
|
|
p.cpp
|
|
p.cmake
|
|
p.dockerfile
|
|
p.latex
|
|
p.lua
|
|
p.llvm
|
|
p.markdown
|
|
p.markdown_inline
|
|
p.python
|
|
p.vim
|
|
p.yaml
|
|
])
|
|
);
|
|
type = "lua";
|
|
config = ( builtins.readFile ./files/treesitter.lua);
|
|
}
|
|
{
|
|
plugin = which-key-nvim;
|
|
type = "lua";
|
|
config = ( builtins.readFile ./files/whichkey.lua );
|
|
}
|
|
];
|
|
};
|
|
}
|