Use nixvim
This commit is contained in:
parent
f0217e4640
commit
ecb2a05d60
72 changed files with 691 additions and 1664 deletions
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
|
@ -11,134 +12,60 @@ let
|
|||
cfg = config.coding.neovim;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
|
||||
options.coding.neovim.enable = mkEnableOption "Enable neovim";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.neovim =
|
||||
let
|
||||
php = pkgs.php82;
|
||||
in
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
||||
# TODO: re-add DAP.
|
||||
# TODO: re-add snippets.
|
||||
# TODO: re-configure spell.
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
imports = [
|
||||
./keymaps.nix
|
||||
./options.nix
|
||||
./plugins/cmp.nix
|
||||
./plugins/conform.nix
|
||||
./plugins/fidget.nix
|
||||
./plugins/fugitive.nix
|
||||
./plugins/gitsigns.nix
|
||||
./plugins/harpoon.nix
|
||||
./plugins/lint.nix
|
||||
./plugins/lsp.nix
|
||||
./plugins/lualine.nix
|
||||
./plugins/luasnip.nix
|
||||
./plugins/mini.nix
|
||||
./plugins/oil.nix
|
||||
./plugins/phpactor.nix
|
||||
./plugins/refactoring.nix
|
||||
./plugins/telescope.nix
|
||||
./plugins/treesitter.nix
|
||||
./plugins/undotree.nix
|
||||
./plugins/vim-dadbod.nix
|
||||
./plugins/vim-highlightedyank.nix
|
||||
./plugins/vim-test.nix
|
||||
./plugins/web-devicons.nix
|
||||
];
|
||||
|
||||
colorschemes.catppuccin = {
|
||||
enable = true;
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
comment-nvim
|
||||
gitsigns-nvim
|
||||
harpoon2
|
||||
mini-nvim
|
||||
nvim-web-devicons
|
||||
oil-nvim
|
||||
phpactor
|
||||
refactoring-nvim
|
||||
undotree
|
||||
vim-nix
|
||||
|
||||
# Testing
|
||||
vim-test
|
||||
vimux
|
||||
|
||||
# Git
|
||||
vim-fugitive
|
||||
|
||||
# Debugging
|
||||
nvim-dap
|
||||
nvim-dap-ui
|
||||
nvim-dap-virtual-text
|
||||
|
||||
# Treesitter
|
||||
(pkgs.vimPlugins.nvim-treesitter.withPlugins (
|
||||
plugins: with plugins; [
|
||||
bash
|
||||
comment
|
||||
css
|
||||
csv
|
||||
dockerfile
|
||||
gitattributes
|
||||
gitignore
|
||||
go
|
||||
html
|
||||
javascript
|
||||
json
|
||||
kdl
|
||||
lua
|
||||
luadoc
|
||||
make
|
||||
markdown
|
||||
markdown_inline
|
||||
nix
|
||||
php
|
||||
phpdoc
|
||||
query
|
||||
rst
|
||||
scss
|
||||
sql
|
||||
terraform
|
||||
twig
|
||||
typescript
|
||||
vim
|
||||
vimdoc
|
||||
vue
|
||||
xml
|
||||
yaml
|
||||
]
|
||||
))
|
||||
nvim-treesitter-textobjects
|
||||
|
||||
# LSP, linting and formatting
|
||||
conform-nvim
|
||||
lsp-status-nvim
|
||||
nvim-lint
|
||||
nvim-lspconfig
|
||||
|
||||
# Completion
|
||||
cmp-buffer
|
||||
cmp-calc
|
||||
cmp-cmdline
|
||||
cmp-nvim-lsp
|
||||
cmp-path
|
||||
cmp-treesitter
|
||||
cmp_luasnip
|
||||
lspkind-nvim
|
||||
nvim-cmp
|
||||
|
||||
# Snippets
|
||||
luasnip
|
||||
|
||||
# Telescope
|
||||
plenary-nvim
|
||||
popup-nvim
|
||||
telescope-frecency-nvim
|
||||
telescope-fzf-native-nvim
|
||||
telescope-live-grep-args-nvim
|
||||
telescope-nvim
|
||||
telescope-ui-select-nvim
|
||||
|
||||
# Databases
|
||||
vim-dadbod
|
||||
vim-dadbod-ui
|
||||
vim-dadbod-completion
|
||||
|
||||
# Themes
|
||||
catppuccin-nvim
|
||||
];
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
ripgrep
|
||||
];
|
||||
settings.flavour = "mocha";
|
||||
};
|
||||
|
||||
xdg.configFile.nvim = {
|
||||
source = ./config;
|
||||
recursive = true;
|
||||
extraPackages = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
stylua
|
||||
];
|
||||
|
||||
globals.mapleader = " ";
|
||||
};
|
||||
|
||||
home.file.".markdownlint.yaml".text = ''
|
||||
default: true
|
||||
|
||||
line-length: false
|
||||
|
||||
no-duplicate-heading:
|
||||
siblings_only: true
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue