nvim: Cleanup configuration
This commit is contained in:
parent
d29da3cfd8
commit
a71c541ea2
2 changed files with 214 additions and 209 deletions
|
@ -35,7 +35,7 @@
|
||||||
;; Configure Linters per FT
|
;; Configure Linters per FT
|
||||||
(set lint.linters_by_ft {:dockerfile [:hadolint]
|
(set lint.linters_by_ft {:dockerfile [:hadolint]
|
||||||
:elixir [:credo]
|
:elixir [:credo]
|
||||||
;:fennel [:fennel]
|
:fennel [:fennel]
|
||||||
:fish [:fish]
|
:fish [:fish]
|
||||||
:java [:checkstyle]
|
:java [:checkstyle]
|
||||||
:nix [:deadnix :nix :statix]
|
:nix [:deadnix :nix :statix]
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
customPlugins = import ./plugins.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
nvim-spell-directory = "${config.xdg.configHome}/nvim/spell";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -16,7 +11,7 @@ in
|
||||||
withRuby = false;
|
withRuby = false;
|
||||||
withPython3 = false;
|
withPython3 = false;
|
||||||
|
|
||||||
extraLuaPackages = _: [ pkgs.luarocks-jsregexp ];
|
extraLuaPackages = luaPkgs: with luaPkgs; [ jsregexp readline ];
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
|
@ -42,12 +37,14 @@ in
|
||||||
checkstyle
|
checkstyle
|
||||||
deadnix
|
deadnix
|
||||||
hadolint
|
hadolint
|
||||||
lua51Packages.fennel
|
luajitPackages.fennel
|
||||||
fnlfmt
|
fnlfmt
|
||||||
shellcheck
|
shellcheck
|
||||||
shfmt
|
shfmt
|
||||||
statix
|
statix
|
||||||
yamllint
|
yamllint
|
||||||
|
] ++ lib.optionals pkgs.stdenv.isDarwin [
|
||||||
|
xcbuild
|
||||||
];
|
];
|
||||||
|
|
||||||
extraLuaConfig =
|
extraLuaConfig =
|
||||||
|
@ -97,242 +94,246 @@ in
|
||||||
require('configuration.init')
|
require('configuration.init')
|
||||||
'';
|
'';
|
||||||
|
|
||||||
plugins = (with customPlugins; [
|
plugins =
|
||||||
# Fixes
|
let
|
||||||
impatient-nvim
|
customPlugins = import ./plugins.nix { inherit pkgs; };
|
||||||
|
in
|
||||||
|
(with customPlugins; [
|
||||||
|
# Fixes
|
||||||
|
impatient-nvim
|
||||||
|
|
||||||
# Utils
|
# Utils
|
||||||
popup-nvim
|
popup-nvim
|
||||||
plenary-nvim
|
plenary-nvim
|
||||||
nvim-web-devicons
|
nvim-web-devicons
|
||||||
|
|
||||||
# Keybindings
|
# Keybindings
|
||||||
{
|
{
|
||||||
plugin = nvim-osc52;
|
plugin = nvim-osc52;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/osc52.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/osc52.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = yanky-nvim;
|
plugin = yanky-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/yanky.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/yanky.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = cutlass-nvim;
|
plugin = cutlass-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/cutlass.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/cutlass.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = substitute-nvim;
|
plugin = substitute-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/substitute.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/substitute.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = leap-nvim;
|
plugin = leap-nvim;
|
||||||
config = ''
|
config = ''
|
||||||
(let [leap (require :leap)]
|
(let [leap (require :leap)]
|
||||||
(leap.set_default_keymaps))
|
(leap.set_default_keymaps))
|
||||||
'';
|
'';
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Themes
|
# Themes
|
||||||
dracula-nvim
|
dracula-nvim
|
||||||
|
|
||||||
# Syntax
|
# Syntax
|
||||||
{
|
{
|
||||||
plugin = nvim-treesitter;
|
plugin = nvim-treesitter;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/treesitter.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/treesitter.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
nvim-ts-rainbow2
|
nvim-ts-rainbow2
|
||||||
playground
|
playground
|
||||||
|
|
||||||
# Telescope
|
# Telescope
|
||||||
{
|
{
|
||||||
plugin = telescope-nvim;
|
plugin = telescope-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/telescope.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/telescope.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
telescope-fzf-native-nvim
|
telescope-fzf-native-nvim
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = project-nvim;
|
plugin = project-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/project.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/project.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = todo-comments-nvim;
|
plugin = todo-comments-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/todo-comments.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/todo-comments.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
telescope-ui-select-nvim
|
telescope-ui-select-nvim
|
||||||
telescope-toggleterm-nvim
|
telescope-toggleterm-nvim
|
||||||
telescope-undo-nvim
|
telescope-undo-nvim
|
||||||
|
|
||||||
# LSP
|
# LSP
|
||||||
{
|
{
|
||||||
plugin = nvim-lspconfig;
|
plugin = nvim-lspconfig;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/lsp.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/lsp.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
nvim-jdtls
|
nvim-jdtls
|
||||||
|
|
||||||
lspkind-nvim
|
lspkind-nvim
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = nvim-navic;
|
plugin = nvim-navic;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/navic.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/navic.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = vim-illuminate;
|
plugin = vim-illuminate;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/illuminate.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/illuminate.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Linter
|
# Linter
|
||||||
{
|
{
|
||||||
plugin = nvim-lint;
|
plugin = nvim-lint;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/nvim-lint.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/nvim-lint.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Comments
|
# Comments
|
||||||
{
|
{
|
||||||
plugin = comment-nvim;
|
plugin = comment-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/comment.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/comment.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Snippets
|
# Snippets
|
||||||
{
|
{
|
||||||
plugin = LuaSnip;
|
plugin = LuaSnip;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/luasnip.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/luasnip.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
friendly-snippets
|
friendly-snippets
|
||||||
|
|
||||||
# cmp
|
# cmp
|
||||||
{
|
{
|
||||||
plugin = nvim-cmp;
|
plugin = nvim-cmp;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/cmp.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/cmp.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
cmp-nvim-lsp
|
cmp-nvim-lsp
|
||||||
# cmp-nvim-lsp-signature-help
|
# cmp-nvim-lsp-signature-help
|
||||||
cmp_luasnip
|
cmp_luasnip
|
||||||
cmp-path
|
cmp-path
|
||||||
cmp-buffer
|
cmp-buffer
|
||||||
cmp-treesitter
|
cmp-treesitter
|
||||||
cmp-cmdline
|
cmp-cmdline
|
||||||
cmp-nvim-lsp-document-symbol
|
cmp-nvim-lsp-document-symbol
|
||||||
|
|
||||||
# Formatting
|
# Formatting
|
||||||
{
|
{
|
||||||
plugin = neoformat;
|
plugin = neoformat;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/neoformat.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/neoformat.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pairs
|
# Pairs
|
||||||
{
|
{
|
||||||
plugin = nvim-autopairs;
|
plugin = nvim-autopairs;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/autopairs.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/autopairs.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = nvim-ts-autotag;
|
plugin = nvim-ts-autotag;
|
||||||
config = ''
|
config = ''
|
||||||
(let [ts-autotag (require :nvim-ts-autotag)]
|
(let [ts-autotag (require :nvim-ts-autotag)]
|
||||||
(ts-autotag.setup))
|
(ts-autotag.setup))
|
||||||
'';
|
'';
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = vim-matchup;
|
plugin = vim-matchup;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/matchup.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/matchup.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Textobjects
|
# Textobjects
|
||||||
nvim-treesitter-textobjects
|
nvim-treesitter-textobjects
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = nvim-surround;
|
plugin = nvim-surround;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/surround.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/surround.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
{
|
{
|
||||||
plugin = heirline-nvim;
|
plugin = heirline-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/heirline.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/heirline.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = indent-blankline-nvim;
|
plugin = indent-blankline-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/indent_line.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/indent_line.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = virt-column-nvim;
|
plugin = virt-column-nvim;
|
||||||
config = ''
|
config = ''
|
||||||
(let [virt-column (require :virt-column)]
|
(let [virt-column (require :virt-column)]
|
||||||
(virt-column.setup))
|
(virt-column.setup))
|
||||||
'';
|
'';
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = toggleterm-nvim;
|
plugin = toggleterm-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/toggleterm.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/toggleterm.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = urlview-nvim;
|
plugin = urlview-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/urlview.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/urlview.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = gitsigns-nvim;
|
plugin = gitsigns-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/gitsigns.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/gitsigns.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
|
|
||||||
nvim-notify
|
nvim-notify
|
||||||
nui-nvim
|
nui-nvim
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = noice-nvim;
|
plugin = noice-nvim;
|
||||||
config = builtins.readFile ../../config/nvim/plugins/noice.fnl;
|
config = builtins.readFile ../../config/nvim/plugins/noice.fnl;
|
||||||
type = "fennel";
|
type = "fennel";
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."nvim" = {
|
xdg.configFile."nvim" = {
|
||||||
source = pkgs.runCommand "nvim-fennel-files"
|
source = pkgs.runCommand "nvim-fennel-files"
|
||||||
{
|
{
|
||||||
nativeBuildInputs = with pkgs; [ lua51Packages.fennel stylua ];
|
nativeBuildInputs = with pkgs; [ luajitPackages.fennel stylua ];
|
||||||
} ''
|
} ''
|
||||||
mkdir -p $out/lua/configuration
|
mkdir -p $out/lua/configuration
|
||||||
mkdir -p $out/lua/nifoc/utils
|
mkdir -p $out/lua/nifoc/utils
|
||||||
|
@ -409,16 +410,20 @@ in
|
||||||
echo 'Done'
|
echo 'Done'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
file = {
|
file =
|
||||||
"${nvim-spell-directory}/de.utf-8.spl".source = builtins.fetchurl {
|
let
|
||||||
url = "http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.spl";
|
nvim-spell-directory = "${config.xdg.configHome}/nvim/spell";
|
||||||
sha256 = "73c7107ea339856cdbe921deb92a45939c4de6eb9c07261da1b9dd19f683a3d1";
|
in
|
||||||
};
|
{
|
||||||
|
"${nvim-spell-directory}/de.utf-8.spl".source = builtins.fetchurl {
|
||||||
|
url = "http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.spl";
|
||||||
|
sha256 = "73c7107ea339856cdbe921deb92a45939c4de6eb9c07261da1b9dd19f683a3d1";
|
||||||
|
};
|
||||||
|
|
||||||
"${nvim-spell-directory}/de.utf-8.sug".source = builtins.fetchurl {
|
"${nvim-spell-directory}/de.utf-8.sug".source = builtins.fetchurl {
|
||||||
url = "http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.sug";
|
url = "http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.sug";
|
||||||
sha256 = "13d0ecf92863d89ef60cd4a8a5eb2a5a13a0e8f9ba8d1c6abe47aba85714a948";
|
sha256 = "13d0ecf92863d89ef60cd4a8a5eb2a5a13a0e8f9ba8d1c6abe47aba85714a948";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue