Move neovim configuration

This commit is contained in:
Oliver Davies 2025-04-05 09:00:00 +01:00
parent d9e982c240
commit ee19e63f4d
55 changed files with 188 additions and 198 deletions

View file

@ -7,8 +7,6 @@
{
homeManagerModules = {
neovim.enable = true;
notes = {
enable = true;
directory = "$HOME/Documents/wiki/tfw-notes";

View file

@ -8,7 +8,6 @@
handbrake.enable = true;
kdenlive.enable = true;
mpv.enable = true;
neovim.enable = true;
newsboat.enable = true;
notes = {

View file

@ -8,7 +8,6 @@
handbrake.enable = true;
kdenlive.enable = true;
mpv.enable = true;
neovim.enable = true;
notes = {
enable = true;

View file

@ -2,6 +2,7 @@
{
imports = [
../../modules/editor/nvim.nix
../../modules/mixins/direnv.nix
../../modules/mixins/docker.nix
../../modules/mixins/fzf.nix

View file

@ -7,6 +7,8 @@
./secrets.nix
./services
../../modules/editor/nvim.nix
../../modules/profiles/dwm
../../modules/mixins/bluetooth.nix

185
modules/editor/nvim.nix Normal file
View file

@ -0,0 +1,185 @@
{
home-manager.users.opdavies =
{ pkgs, ... }:
{
programs.neovim =
let
php = pkgs.php82;
phpPackages = pkgs.php82Packages;
in
{
enable = true;
plugins = with pkgs.vimPlugins; [
comment-nvim
conf-vim
edit-alternate-vim
gitsigns-nvim
harpoon2
mini-nvim
nvim-web-devicons
phpactor
refactoring-nvim
standard-vim
undotree
vim-caser
vim-nix
vim-pasta
vim-repeat
vim-sleuth
vim-textobj-indent
vim-textobj-user
vim-textobj-xmlattr
vim-unimpaired
# 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
friendly-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; [
# Languages
nodePackages.typescript
nodejs-slim
php
# Language servers
bash-language-server
dockerfile-language-server-nodejs
emmet-language-server
gopls
lua-language-server
lua54Packages.luacheck
marksman
nixd
phpactor
tailwindcss-language-server
terraform-ls
typescript-language-server
vscode-langservers-extracted
vue-language-server
yaml-language-server
# Formatters
black
eslint_d
nixfmt-rfc-style
nodePackages.prettier
stylua
yamlfmt
# Tools
hadolint
html-tidy
mariadb
nodePackages.jsonlint
nodePackages.markdownlint-cli
phpPackages.php-codesniffer
phpPackages.phpstan
proselint
ripgrep
shellcheck
yamllint
];
};
xdg.configFile.nvim = {
source = ./config;
recursive = true;
};
home.file.".markdownlint.yaml".text = ''
default: true
line-length: false
no-duplicate-heading:
siblings_only: true
'';
};
}

View file

@ -4,7 +4,6 @@
imports = [
./bin
./git.nix
./neovim
./newsboat
./notes.nix
./starship.nix

View file

@ -1,193 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
php = pkgs.php82;
phpPackages = pkgs.php82Packages;
in
{
options.homeManagerModules.neovim.enable = mkEnableOption "Enable neovim";
config = mkIf config.homeManagerModules.neovim.enable {
programs.neovim = {
enable = true;
plugins = with pkgs.vimPlugins; [
comment-nvim
conf-vim
edit-alternate-vim
gitsigns-nvim
harpoon2
mini-nvim
nvim-web-devicons
phpactor
refactoring-nvim
standard-vim
undotree
vim-caser
vim-nix
vim-pasta
vim-repeat
vim-sleuth
vim-textobj-indent
vim-textobj-user
vim-textobj-xmlattr
vim-unimpaired
# 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
friendly-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; [
# Languages
nodePackages.typescript
nodejs-slim
php
# Language servers
bash-language-server
dockerfile-language-server-nodejs
emmet-language-server
gopls
lua-language-server
lua54Packages.luacheck
marksman
nixd
phpactor
tailwindcss-language-server
terraform-ls
typescript-language-server
vscode-langservers-extracted
vue-language-server
yaml-language-server
# Formatters
black
eslint_d
nixfmt-rfc-style
nodePackages.prettier
stylua
yamlfmt
# Tools
hadolint
html-tidy
mariadb
nodePackages.jsonlint
nodePackages.markdownlint-cli
phpPackages.php-codesniffer
phpPackages.phpstan
proselint
ripgrep
shellcheck
yamllint
];
};
xdg.configFile.nvim = {
source = ./config;
recursive = true;
};
home.file.".markdownlint.yaml".text = ''
default: true
line-length: false
no-duplicate-heading:
siblings_only: true
'';
};
}