feat(nvim): enable vimwiki

main
mandlm 2024-07-27 22:22:59 +02:00 committed by Michael Mandl
parent 1e7b654477
commit 22a18418ac
Signed by: mandlm
GPG Key ID: 088ED38F036C7AF2
6 changed files with 34 additions and 5 deletions

View File

@ -35,6 +35,7 @@
gpgSigningKey = "4AA25D647AA54CC7";
gpgSSHKeys = [ "1F937AC8F77ED74CE24EAAE79B5601F73C6D115F" ];
theme = "dark";
vimwikiPath = "~/vimwiki";
};
};
"mmandl@NB11313" = home-manager.lib.homeManagerConfiguration {
@ -55,6 +56,7 @@
gpgSigningKey = "088ED38F036C7AF2";
gpgSSHKeys = [ "AEB2BF3FF9CF9529E9A3C6F1A202D21686FF9278" ];
theme = "dark";
vimwikiPath = "~/vimwiki";
};
};
};

View File

@ -1,4 +1,4 @@
{ pkgs, theme, ... }:
{ pkgs, theme, vimwikiPath, ... }:
{
# symlink for a stable path
home.file.".vscode-extensions/vscode-lldb".source = pkgs.vscode-extensions.vadimcn.vscode-lldb;
@ -81,7 +81,7 @@
lsp-status-nvim
rustaceanvim
neodev-nvim
null-ls-nvim
none-ls-nvim
lsp_lines-nvim
lsp-inlayhints-nvim
@ -92,6 +92,9 @@
# neorg
neorg
neorg-telescope
# vim-wiki
vimwiki
];
withNodeJs = true;
@ -102,8 +105,8 @@
terraform-ls
tflint
bash-language-server
prettierd
nodePackages.yaml-language-server
nodePackages.prettier
nodePackages.eslint_d
nodePackages.typescript-language-server
nodePackages.typescript
@ -128,6 +131,9 @@
#clipboard
xclip
#vimwiki
vimwiki-markdown
];
extraLuaPackages = luaPackages: [
@ -165,6 +171,11 @@
${builtins.readFile ./illuminate.lua }
${builtins.readFile ./wilder.lua }
do
local vimwiki_path = "${vimwikiPath}"
${builtins.readFile ./vimwiki.lua }
end
vim.g.gitblame_date_format = "%r"
require("nvim-autopairs").setup({})

View File

@ -161,8 +161,9 @@ vim.g.rustaceanvim = {
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.prettier,
null_ls.builtins.diagnostics.tsc,
null_ls.builtins.formatting.prettierd.with({
extra_filetypes = { "vimwiki" },
}),
},
on_attach = on_attach,
})

View File

@ -91,3 +91,5 @@ require('nvim-treesitter.configs').setup({
},
},
})
vim.treesitter.language.register("markdown", "vimwiki")

12
neovim/vimwiki.lua Normal file
View File

@ -0,0 +1,12 @@
vim.g.vimwiki_list = {
{
path = vimwiki_path,
syntax = "markdown",
ext = ".md",
path_html = "~/vimwiki_html",
custom_wiki2html = "vimwiki_markdown",
}
}
-- disable global markdown hijacking
vim.g.vimwiki_global_ext = 0

View File

@ -7,5 +7,6 @@
gs = "git status";
gd = "git diff";
k = "kubectl";
ww = "nvim -c VimwikiIndex";
};
}