feat: add vimtex
This commit is contained in:
parent
1a2369c8db
commit
b03934b4a3
6 changed files with 52 additions and 8 deletions
|
|
@ -16,6 +16,11 @@ in
|
|||
source = ./plugins/snippets;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xdotool
|
||||
];
|
||||
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
|
||||
|
|
|
|||
|
|
@ -36,10 +36,17 @@ in
|
|||
{ plugin = pkgs.vimPlugins.cmp-async-path; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-buffer; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-cmdline; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-nvim-lsp; }
|
||||
{ plugin = pkgs.vimPlugins.cmp_luasnip; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-spell; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-nvim-lsp-signature-help; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-nvim-lsp; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-spell; }
|
||||
{
|
||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "cmp-vimtex";
|
||||
version = lib.my.mkVersionInput inputs.cmp-vimtex;
|
||||
src = inputs.cmp-vimtex;
|
||||
};
|
||||
}
|
||||
{ plugin = pkgs.vimPlugins.cmp_luasnip; }
|
||||
{
|
||||
plugin = pkgs.vimPlugins.copilot-cmp;
|
||||
opts = { };
|
||||
|
|
@ -211,5 +218,17 @@ in
|
|||
conf = readFile ./lua/conform.lua;
|
||||
}
|
||||
{ plugin = pkgs.vimPlugins.plantuml-syntax; }
|
||||
{
|
||||
plugin = pkgs.vimPlugins.vimtex;
|
||||
lazy = false;
|
||||
conf = /* lua */ ''
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
vim.g.vimtex_mappings_disable = vim.fn.executable("texlab") == 1 and { ["n"] = { "K" } } or {} -- disable `K` as it conflicts with LSP hover
|
||||
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
|
||||
'';
|
||||
keys = [
|
||||
{ key = "<localleader>l"; cmd = ""; desc = "+vimtex"; }
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ cmp.setup({
|
|||
{ priority = 3, name = "copilot" },
|
||||
{ priority = 3, name = "nvim_lsp_signature_help" },
|
||||
{ priority = 4, name = "luasnip" },
|
||||
{ priority = 4, name = "vimtex" },
|
||||
}),
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
with builtins;
|
||||
{
|
||||
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [
|
||||
config.home-manager.users.moritz.programs.neovim.lazy.plugins = [
|
||||
(
|
||||
let
|
||||
parserDir = pkgs.symlinkJoin {
|
||||
|
|
@ -11,13 +10,14 @@ with builtins;
|
|||
};
|
||||
in
|
||||
{
|
||||
plugin = nvim-treesitter;
|
||||
plugin = pkgs.vimPlugins.nvim-treesitter;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
opts = {
|
||||
sync_install = false;
|
||||
auto_install = false;
|
||||
highlight = {
|
||||
enable = true;
|
||||
disable = [ "latex" ];
|
||||
};
|
||||
textobjects =
|
||||
{
|
||||
|
|
@ -60,8 +60,8 @@ with builtins;
|
|||
'';
|
||||
priority = 100;
|
||||
dependencies = [
|
||||
{ plugin = nvim-treesitter-textobjects; }
|
||||
{ plugin = nvim-ts-context-commentstring; opts = { }; }
|
||||
{ plugin = pkgs.vimPlugins.nvim-treesitter-textobjects; }
|
||||
{ plugin = pkgs.vimPlugins.nvim-ts-context-commentstring; opts = { }; }
|
||||
];
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue