feat: add vimtex
parent
1a2369c8db
commit
b03934b4a3
17
flake.lock
17
flake.lock
|
@ -72,6 +72,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cmp-vimtex": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716040164,
|
||||
"narHash": "sha256-CO70M+l/9c4vqNm0XloOTzGQTmogHbSwvUFKQxYGsuw=",
|
||||
"owner": "micangl",
|
||||
"repo": "cmp-vimtex",
|
||||
"rev": "a64b1b5eec0460144c91c4f20a45c74b8ded48ae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "micangl",
|
||||
"repo": "cmp-vimtex",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -1164,6 +1180,7 @@
|
|||
"agenix": "agenix",
|
||||
"arkenfox-userjs": "arkenfox-userjs",
|
||||
"asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver",
|
||||
"cmp-vimtex": "cmp-vimtex",
|
||||
"devshell": "devshell",
|
||||
"disko": "disko",
|
||||
"flake-parts": "flake-parts",
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
hawtkeys-nvim.url = "github:tris203/hawtkeys.nvim";
|
||||
none-ls-shellcheck-nvim.flake = false;
|
||||
none-ls-shellcheck-nvim.url = "github:gbprod/none-ls-shellcheck.nvim";
|
||||
cmp-vimtex.flake = false;
|
||||
cmp-vimtex.url = "github:micangl/cmp-vimtex";
|
||||
|
||||
# river
|
||||
river.url = "git+https://github.com/riverwm/river?submodules=1";
|
||||
|
|
|
@ -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…
Reference in New Issue