Configure zk notes path
This commit is contained in:
parent
aed72ef9b1
commit
d08ce627c9
1 changed files with 271 additions and 268 deletions
|
|
@ -14,285 +14,288 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager.users.${config.user.name} = {
|
home-manager.users.${config.user.name} =
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.neovim-unwrapped;
|
package = pkgs.neovim-unwrapped;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
vimdiffAlias = true;
|
vimdiffAlias = true;
|
||||||
withNodeJs = true;
|
withNodeJs = true;
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
# base distro
|
# base distro
|
||||||
LazyVim
|
LazyVim
|
||||||
conform-nvim
|
conform-nvim
|
||||||
nvim-lint
|
nvim-lint
|
||||||
markdown-preview-nvim
|
markdown-preview-nvim
|
||||||
render-markdown-nvim
|
render-markdown-nvim
|
||||||
|
|
||||||
# theme
|
# theme
|
||||||
gruvbox-nvim
|
gruvbox-nvim
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
bufferline-nvim
|
bufferline-nvim
|
||||||
gitsigns-nvim
|
gitsigns-nvim
|
||||||
neogit
|
neogit
|
||||||
diffview-nvim
|
diffview-nvim
|
||||||
edgy-nvim
|
edgy-nvim
|
||||||
dashboard-nvim
|
dashboard-nvim
|
||||||
toggleterm-nvim
|
toggleterm-nvim
|
||||||
trouble-nvim
|
trouble-nvim
|
||||||
lualine-nvim
|
lualine-nvim
|
||||||
which-key-nvim
|
which-key-nvim
|
||||||
nvim-web-devicons
|
nvim-web-devicons
|
||||||
mini-nvim
|
mini-nvim
|
||||||
mini-ai
|
mini-ai
|
||||||
mini-comment
|
mini-comment
|
||||||
mini-icons
|
mini-icons
|
||||||
mini-pairs
|
mini-pairs
|
||||||
noice-nvim
|
noice-nvim
|
||||||
nui-nvim
|
nui-nvim
|
||||||
nvim-notify
|
nvim-notify
|
||||||
nvim-lsp-notify
|
nvim-lsp-notify
|
||||||
neo-tree-nvim
|
neo-tree-nvim
|
||||||
nvim-navic
|
nvim-navic
|
||||||
dressing-nvim
|
dressing-nvim
|
||||||
aerial-nvim
|
aerial-nvim
|
||||||
snacks-nvim
|
snacks-nvim
|
||||||
|
|
||||||
# project management
|
# project management
|
||||||
project-nvim
|
project-nvim
|
||||||
neoconf-nvim
|
neoconf-nvim
|
||||||
persistence-nvim
|
persistence-nvim
|
||||||
|
|
||||||
# smart typing
|
# smart typing
|
||||||
guess-indent-nvim
|
guess-indent-nvim
|
||||||
vim-illuminate
|
vim-illuminate
|
||||||
|
|
||||||
|
# LSP
|
||||||
|
nvim-lspconfig
|
||||||
|
nvim-lightbulb # lightbulb for quick actions
|
||||||
|
# nvim-code-action-menu # code action menu
|
||||||
|
neodev-nvim
|
||||||
|
SchemaStore-nvim # load known formats for json and yaml
|
||||||
|
nvim-metals
|
||||||
|
nvim-jdtls
|
||||||
|
|
||||||
|
# cmp plugins
|
||||||
|
nvim-cmp
|
||||||
|
blink-cmp # completion plugin
|
||||||
|
cmp_luasnip # snipper completions
|
||||||
|
|
||||||
|
# snippets
|
||||||
|
luasnip # snippet engine
|
||||||
|
friendly-snippets # a bunch of snippets to use
|
||||||
|
|
||||||
|
# search functionality
|
||||||
|
plenary-nvim
|
||||||
|
telescope-nvim
|
||||||
|
telescope-fzf-native-nvim
|
||||||
|
fzf-lua
|
||||||
|
grug-far-nvim
|
||||||
|
flash-nvim
|
||||||
|
|
||||||
|
# treesitter
|
||||||
|
nvim-treesitter-context
|
||||||
|
nvim-ts-autotag
|
||||||
|
nvim-treesitter-textobjects
|
||||||
|
nvim-treesitter.withAllGrammars
|
||||||
|
|
||||||
|
# comments
|
||||||
|
ts-comments-nvim
|
||||||
|
nvim-ts-context-commentstring
|
||||||
|
todo-comments-nvim
|
||||||
|
|
||||||
|
# leap
|
||||||
|
vim-repeat
|
||||||
|
leap-nvim
|
||||||
|
flit-nvim
|
||||||
|
|
||||||
|
# DAP
|
||||||
|
nvim-dap
|
||||||
|
nvim-dap-ui
|
||||||
|
nvim-dap-virtual-text
|
||||||
|
one-small-step-for-vimkind
|
||||||
|
|
||||||
|
# neotest
|
||||||
|
neotest
|
||||||
|
neotest-rust
|
||||||
|
neotest-elixir
|
||||||
|
|
||||||
|
# SQL
|
||||||
|
vim-dadbod
|
||||||
|
vim-dadbod-ui
|
||||||
|
vim-dadbod-completion
|
||||||
|
|
||||||
|
lazy-nvim
|
||||||
|
lazydev-nvim
|
||||||
|
vim-startuptime
|
||||||
|
yazi-nvim
|
||||||
|
zk-nvim
|
||||||
|
];
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
gcc # needed for nvim-treesitter
|
||||||
|
|
||||||
|
# HTML, CSS, JSON
|
||||||
|
vscode-langservers-extracted
|
||||||
|
|
||||||
|
# Nix
|
||||||
|
nixd
|
||||||
|
statix
|
||||||
|
nixfmt-rfc-style
|
||||||
|
|
||||||
|
# SQL
|
||||||
|
sqlfluff
|
||||||
|
|
||||||
|
# LazyVim defaults
|
||||||
|
stylua
|
||||||
|
shfmt
|
||||||
|
|
||||||
|
# Markdown extra
|
||||||
|
markdownlint-cli2
|
||||||
|
marksman
|
||||||
|
|
||||||
|
# Docker extra
|
||||||
|
dockerfile-language-server
|
||||||
|
hadolint
|
||||||
|
docker-compose-language-service
|
||||||
|
|
||||||
|
# JSON and YAML extras
|
||||||
|
nodePackages.yaml-language-server
|
||||||
|
|
||||||
|
# Java
|
||||||
|
jdt-language-server
|
||||||
|
|
||||||
|
# Elixir
|
||||||
|
beam28Packages.elixir-ls
|
||||||
|
|
||||||
|
# Custom
|
||||||
|
editorconfig-checker
|
||||||
|
shellcheck
|
||||||
|
];
|
||||||
|
|
||||||
|
extraLuaConfig = # lua
|
||||||
|
''
|
||||||
|
require("gruvbox").setup({
|
||||||
|
overrides = {
|
||||||
|
Include = { ["link"] = "GruvboxRed" },
|
||||||
|
["@constructor"] = { ["link"] = "GruvboxYellow" },
|
||||||
|
["@function.builtin"] = { ["link"] = "GruvboxFg1" },
|
||||||
|
["@function.call"] = { ["link"] = "GruvboxFg1" },
|
||||||
|
["@function.macro"] = { ["link"] = "GruvboxFg1" },
|
||||||
|
["@function.method.call.scala"] = { ["link"] = "GruvboxFg1" },
|
||||||
|
["@method.call"] = { ["link"] = "GruvboxFg1" },
|
||||||
|
["@variable.member.scala"] = { ["link"] = "GruvboxFg1" },
|
||||||
|
["@lsp.type.type.scala"] = { ["link"] = "" },
|
||||||
|
["@lsp.type.method.scala"] = { ["link"] = "" },
|
||||||
|
["@lsp.type.modifier.scala"] = { ["link"] = "GruvboxOrange" },
|
||||||
|
["@lsp.type.typeParameter.scala"] = { ["link"] = "GruvboxAqua" },
|
||||||
|
["@lsp.type.type.nix"] = { ["link"] = "" },
|
||||||
|
["@lsp.type.method.nix"] = { ["link"] = "" },
|
||||||
|
["@lsp.type.macro.nix"] = { ["link"] = "" },
|
||||||
|
["@lsp.type.interface.nix"] = { ["link"] = "" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
-- import any extras modules here
|
||||||
|
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||||
|
{ import = "lazyvim.plugins.extras.dap.nlua" },
|
||||||
|
{ import = "lazyvim.plugins.extras.ui.edgy" },
|
||||||
|
{ import = "lazyvim.plugins.extras.coding.mini-comment" },
|
||||||
|
{ import = "lazyvim.plugins.extras.editor.aerial" },
|
||||||
|
{ import = "lazyvim.plugins.extras.editor.leap" },
|
||||||
|
{ import = "lazyvim.plugins.extras.editor.navic" },
|
||||||
|
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.angular" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.docker" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.java" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.markdown" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.sql" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.scala" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.elixir" },
|
||||||
|
{ import = "lazyvim.plugins.extras.test.core" },
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
-- import/override with your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||||
|
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||||
|
lazy = false,
|
||||||
|
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||||
|
-- have outdated releases, which may break your Neovim install.
|
||||||
|
version = false, -- always use the latest git commit
|
||||||
|
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
|
},
|
||||||
|
performance = {
|
||||||
|
-- Used for NixOS
|
||||||
|
reset_packpath = false,
|
||||||
|
rtp = {
|
||||||
|
reset = false,
|
||||||
|
-- disable some rtp plugins
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
-- "matchit",
|
||||||
|
-- "matchparen",
|
||||||
|
-- "netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dev = {
|
||||||
|
path = "${pkgs.vimUtils.packDir config.programs.neovim.finalPackage.passthru.packpathDirs}/pack/myNeovimPackages/start",
|
||||||
|
patterns = {""},
|
||||||
|
},
|
||||||
|
install = {
|
||||||
|
missing = false,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."nvim/lua" = {
|
||||||
|
recursive = true;
|
||||||
|
source = ./lua;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
ZK_NOTEBOOK_DIR = "${config.home.homeDirectory}/Nextcloud/notes";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
ripgrep
|
||||||
|
fd
|
||||||
|
nodejs
|
||||||
|
opentofu
|
||||||
|
coursier
|
||||||
|
|
||||||
# LSP
|
# LSP
|
||||||
nvim-lspconfig
|
yaml-language-server
|
||||||
nvim-lightbulb # lightbulb for quick actions
|
typos-lsp
|
||||||
# nvim-code-action-menu # code action menu
|
nodePackages.typescript-language-server
|
||||||
neodev-nvim
|
nodePackages.prettier
|
||||||
SchemaStore-nvim # load known formats for json and yaml
|
terraform-ls
|
||||||
nvim-metals
|
sqls
|
||||||
nvim-jdtls
|
|
||||||
|
|
||||||
# cmp plugins
|
|
||||||
nvim-cmp
|
|
||||||
blink-cmp # completion plugin
|
|
||||||
cmp_luasnip # snipper completions
|
|
||||||
|
|
||||||
# snippets
|
|
||||||
luasnip # snippet engine
|
|
||||||
friendly-snippets # a bunch of snippets to use
|
|
||||||
|
|
||||||
# search functionality
|
|
||||||
plenary-nvim
|
|
||||||
telescope-nvim
|
|
||||||
telescope-fzf-native-nvim
|
|
||||||
fzf-lua
|
|
||||||
grug-far-nvim
|
|
||||||
flash-nvim
|
|
||||||
|
|
||||||
# treesitter
|
|
||||||
nvim-treesitter-context
|
|
||||||
nvim-ts-autotag
|
|
||||||
nvim-treesitter-textobjects
|
|
||||||
nvim-treesitter.withAllGrammars
|
|
||||||
|
|
||||||
# comments
|
|
||||||
ts-comments-nvim
|
|
||||||
nvim-ts-context-commentstring
|
|
||||||
todo-comments-nvim
|
|
||||||
|
|
||||||
# leap
|
|
||||||
vim-repeat
|
|
||||||
leap-nvim
|
|
||||||
flit-nvim
|
|
||||||
|
|
||||||
# DAP
|
|
||||||
nvim-dap
|
|
||||||
nvim-dap-ui
|
|
||||||
nvim-dap-virtual-text
|
|
||||||
one-small-step-for-vimkind
|
|
||||||
|
|
||||||
# neotest
|
|
||||||
neotest
|
|
||||||
neotest-rust
|
|
||||||
neotest-elixir
|
|
||||||
|
|
||||||
# SQL
|
|
||||||
vim-dadbod
|
|
||||||
vim-dadbod-ui
|
|
||||||
vim-dadbod-completion
|
|
||||||
|
|
||||||
lazy-nvim
|
|
||||||
lazydev-nvim
|
|
||||||
vim-startuptime
|
|
||||||
yazi-nvim
|
|
||||||
zk-nvim
|
|
||||||
];
|
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
gcc # needed for nvim-treesitter
|
|
||||||
|
|
||||||
# HTML, CSS, JSON
|
|
||||||
vscode-langservers-extracted
|
|
||||||
|
|
||||||
# Nix
|
|
||||||
nixd
|
nixd
|
||||||
statix
|
|
||||||
nixfmt-rfc-style
|
|
||||||
|
|
||||||
# SQL
|
|
||||||
sqlfluff
|
|
||||||
|
|
||||||
# LazyVim defaults
|
|
||||||
stylua
|
|
||||||
shfmt
|
|
||||||
|
|
||||||
# Markdown extra
|
|
||||||
markdownlint-cli2
|
|
||||||
marksman
|
marksman
|
||||||
|
lua-language-server
|
||||||
# Docker extra
|
|
||||||
dockerfile-language-server
|
|
||||||
hadolint
|
|
||||||
docker-compose-language-service
|
docker-compose-language-service
|
||||||
|
bash-language-server
|
||||||
# JSON and YAML extras
|
angular-language-server
|
||||||
nodePackages.yaml-language-server
|
vtsls
|
||||||
|
zk
|
||||||
# Java
|
|
||||||
jdt-language-server
|
|
||||||
|
|
||||||
# Elixir
|
|
||||||
beam28Packages.elixir-ls
|
|
||||||
|
|
||||||
# Custom
|
|
||||||
editorconfig-checker
|
|
||||||
shellcheck
|
|
||||||
];
|
];
|
||||||
|
|
||||||
extraLuaConfig = # lua
|
|
||||||
''
|
|
||||||
require("gruvbox").setup({
|
|
||||||
overrides = {
|
|
||||||
Include = { ["link"] = "GruvboxRed" },
|
|
||||||
["@constructor"] = { ["link"] = "GruvboxYellow" },
|
|
||||||
["@function.builtin"] = { ["link"] = "GruvboxFg1" },
|
|
||||||
["@function.call"] = { ["link"] = "GruvboxFg1" },
|
|
||||||
["@function.macro"] = { ["link"] = "GruvboxFg1" },
|
|
||||||
["@function.method.call.scala"] = { ["link"] = "GruvboxFg1" },
|
|
||||||
["@method.call"] = { ["link"] = "GruvboxFg1" },
|
|
||||||
["@variable.member.scala"] = { ["link"] = "GruvboxFg1" },
|
|
||||||
["@lsp.type.type.scala"] = { ["link"] = "" },
|
|
||||||
["@lsp.type.method.scala"] = { ["link"] = "" },
|
|
||||||
["@lsp.type.modifier.scala"] = { ["link"] = "GruvboxOrange" },
|
|
||||||
["@lsp.type.typeParameter.scala"] = { ["link"] = "GruvboxAqua" },
|
|
||||||
["@lsp.type.type.nix"] = { ["link"] = "" },
|
|
||||||
["@lsp.type.method.nix"] = { ["link"] = "" },
|
|
||||||
["@lsp.type.macro.nix"] = { ["link"] = "" },
|
|
||||||
["@lsp.type.interface.nix"] = { ["link"] = "" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require("lazy").setup({
|
|
||||||
spec = {
|
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
|
||||||
-- import any extras modules here
|
|
||||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
|
||||||
{ import = "lazyvim.plugins.extras.dap.nlua" },
|
|
||||||
{ import = "lazyvim.plugins.extras.ui.edgy" },
|
|
||||||
{ import = "lazyvim.plugins.extras.coding.mini-comment" },
|
|
||||||
{ import = "lazyvim.plugins.extras.editor.aerial" },
|
|
||||||
{ import = "lazyvim.plugins.extras.editor.leap" },
|
|
||||||
{ import = "lazyvim.plugins.extras.editor.navic" },
|
|
||||||
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.angular" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.docker" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.java" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.markdown" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.sql" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.scala" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.elixir" },
|
|
||||||
{ import = "lazyvim.plugins.extras.test.core" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
|
||||||
-- import/override with your plugins
|
|
||||||
{ import = "plugins" },
|
|
||||||
},
|
|
||||||
defaults = {
|
|
||||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
|
||||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
|
||||||
lazy = false,
|
|
||||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
|
||||||
-- have outdated releases, which may break your Neovim install.
|
|
||||||
version = false, -- always use the latest git commit
|
|
||||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
|
||||||
},
|
|
||||||
performance = {
|
|
||||||
-- Used for NixOS
|
|
||||||
reset_packpath = false,
|
|
||||||
rtp = {
|
|
||||||
reset = false,
|
|
||||||
-- disable some rtp plugins
|
|
||||||
disabled_plugins = {
|
|
||||||
"gzip",
|
|
||||||
-- "matchit",
|
|
||||||
-- "matchparen",
|
|
||||||
-- "netrwPlugin",
|
|
||||||
"tarPlugin",
|
|
||||||
"tohtml",
|
|
||||||
"tutor",
|
|
||||||
"zipPlugin",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dev = {
|
|
||||||
path = "${
|
|
||||||
pkgs.vimUtils.packDir
|
|
||||||
config.home-manager.users.${config.user.name}.programs.neovim.finalPackage.passthru.packpathDirs
|
|
||||||
}/pack/myNeovimPackages/start",
|
|
||||||
patterns = {""},
|
|
||||||
},
|
|
||||||
install = {
|
|
||||||
missing = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."nvim/lua" = {
|
|
||||||
recursive = true;
|
|
||||||
source = ./lua;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
ripgrep
|
|
||||||
fd
|
|
||||||
nodejs
|
|
||||||
opentofu
|
|
||||||
coursier
|
|
||||||
|
|
||||||
# LSP
|
|
||||||
yaml-language-server
|
|
||||||
typos-lsp
|
|
||||||
nodePackages.typescript-language-server
|
|
||||||
nodePackages.prettier
|
|
||||||
terraform-ls
|
|
||||||
sqls
|
|
||||||
nixd
|
|
||||||
marksman
|
|
||||||
lua-language-server
|
|
||||||
docker-compose-language-service
|
|
||||||
bash-language-server
|
|
||||||
angular-language-server
|
|
||||||
vtsls
|
|
||||||
zk
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue