feature(nvim): add typst support with lsp and preview for note taking
This commit is contained in:
@@ -4,9 +4,11 @@
|
|||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
viAlias = false;
|
# set aliases
|
||||||
|
viAlias = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
|
|
||||||
|
# default vim options
|
||||||
opts = {
|
opts = {
|
||||||
number = true;
|
number = true;
|
||||||
relativenumber = true;
|
relativenumber = true;
|
||||||
@@ -16,19 +18,67 @@
|
|||||||
incsearch = true;
|
incsearch = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
colorschemes.nord.enable = true;
|
# nvim mapleader for all command below
|
||||||
globals.mapleader = " ";
|
globals.mapleader = " ";
|
||||||
|
# set colorscheme to nord
|
||||||
|
colorschemes.nord.enable = true;
|
||||||
|
|
||||||
|
# nvim plugins
|
||||||
|
plugins.indent-blankline.enable = true;
|
||||||
plugins.lualine.enable = true;
|
plugins.lualine.enable = true;
|
||||||
plugins.nix.enable = true;
|
plugins.nix.enable = true;
|
||||||
plugins.nvim-tree.enable = true;
|
plugins.nvim-tree.enable = true;
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
|
plugins.telescope = {
|
||||||
|
enable = true;
|
||||||
|
keymaps = {
|
||||||
|
"<leader>ff" = "find_files";
|
||||||
|
"<leader>fg" = "live_grep";
|
||||||
|
"<leader>fb" = "buffers";
|
||||||
|
"<leader>fh" = "help_tags";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
plugins.lsp = {
|
||||||
|
enable = true;
|
||||||
|
servers.tinymist = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
formatterMode = "typstyle";
|
||||||
|
exportPdf = "onSave";
|
||||||
|
semanticTokens = "disable"; # treesitter handles highlighting better
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps.lspBuf = {
|
||||||
|
"<leader>K" = "hover";
|
||||||
|
"<leader>gd" = "definition";
|
||||||
|
"<leader>gr" = "references";
|
||||||
|
"<leader>f" = "format";
|
||||||
|
"<leader>rn" = "rename";
|
||||||
|
"<leader>ca" = "code_action";
|
||||||
|
};
|
||||||
|
};
|
||||||
plugins.treesitter = {
|
plugins.treesitter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.ensure_installed = [ "markdown" "markdown_inline" ];
|
settings.ensure_installed = [ "markdown" "markdown_inline" "typst" ];
|
||||||
|
};
|
||||||
|
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.telescope.enable = true;
|
|
||||||
plugins.web-devicons.enable = true;
|
|
||||||
plugins.indent-blankline.enable = true;
|
|
||||||
plugins.render-markdown = {
|
plugins.render-markdown = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|||||||
@@ -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