feature(nvim): add typst support with lsp and preview for note taking
This commit is contained in:
@@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
globals.mapleader = " ";
|
|
||||||
enable = true;
|
enable = true;
|
||||||
viAlias = false;
|
viAlias = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
opts = {
|
opts = {
|
||||||
number = true;
|
number = true;
|
||||||
@@ -14,14 +13,59 @@
|
|||||||
expandtab = true;
|
expandtab = true;
|
||||||
incsearch = true;
|
incsearch = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# nvim mapleader
|
||||||
|
globals.mapleader = " ";
|
||||||
|
# colorscheme
|
||||||
colorschemes.nord.enable = true;
|
colorschemes.nord.enable = true;
|
||||||
|
|
||||||
|
# nvim plugins
|
||||||
|
plugins.indent-blankline.enable = true;
|
||||||
plugins.lualine.enable = true;
|
plugins.lualine.enable = true;
|
||||||
|
plugins.lsp = {
|
||||||
|
enable = true;
|
||||||
|
# lsp for typst
|
||||||
|
servers.tinymist = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
formatterMode = "typstyle";
|
||||||
|
exportPdf = "onSave";
|
||||||
|
semanticTokens = "disable"; # treesitter handles highlighting better
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# minimal lsp keymaps
|
||||||
|
keymaps.lspBuf = {
|
||||||
|
"K" = "hover";
|
||||||
|
"gd" = "definition";
|
||||||
|
"gr" = "references";
|
||||||
|
"<leader>f" = "format";
|
||||||
|
"<leader>rn" = "rename";
|
||||||
|
"<leader>ca" = "code_action";
|
||||||
|
};
|
||||||
|
};
|
||||||
plugins.nix.enable = true;
|
plugins.nix.enable = true;
|
||||||
plugins.nvim-tree.enable = true;
|
plugins.nvim-tree.enable = true;
|
||||||
plugins.treesitter.enable = true;
|
|
||||||
plugins.telescope.enable = true;
|
plugins.telescope.enable = true;
|
||||||
|
plugins.treesitter = {
|
||||||
|
enable = true;
|
||||||
|
settings.ensure_installed = [ "typst" ];
|
||||||
|
};
|
||||||
|
plugins.typst-preview = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
open_cmd = "firefox %s";
|
||||||
|
dependencies_bin = {
|
||||||
|
tinymist = "tinymist";
|
||||||
|
websocat = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
plugins.typst-vim = {
|
||||||
|
enable = true;
|
||||||
|
settings.pdf_viewer = "zathura";
|
||||||
|
};
|
||||||
plugins.web-devicons.enable = true;
|
plugins.web-devicons.enable = true;
|
||||||
plugins.indent-blankline.enable = true;
|
|
||||||
extraPlugins = [ pkgs.vimPlugins.plenary-nvim ];
|
extraPlugins = [ pkgs.vimPlugins.plenary-nvim ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
fastfetch
|
fastfetch
|
||||||
keepassxc
|
keepassxc
|
||||||
teamspeak6-client
|
teamspeak6-client
|
||||||
|
zathura
|
||||||
];
|
];
|
||||||
|
|
||||||
# services and other software
|
# services and other software
|
||||||
|
|||||||
Reference in New Issue
Block a user