From ae06884e90a5e21a8e0353ca9895d6e1c6d1cdd4 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 20 Aug 2024 14:53:02 -0500 Subject: [PATCH] add plantuml syntax --- .../nvim/lua/plugins/builtins.lua | 39 ++++++++-------- .../nvim/lua/plugins/host.lua | 1 + .../nvim/lua/plugins/language/tex.lua | 46 +++++++++++++++++++ 3 files changed, 66 insertions(+), 20 deletions(-) create mode 100644 home/private_dot_config/nvim/lua/plugins/language/tex.lua diff --git a/home/private_dot_config/nvim/lua/plugins/builtins.lua b/home/private_dot_config/nvim/lua/plugins/builtins.lua index 6d358ee..4949761 100644 --- a/home/private_dot_config/nvim/lua/plugins/builtins.lua +++ b/home/private_dot_config/nvim/lua/plugins/builtins.lua @@ -8,22 +8,26 @@ return { }, { "folke/noice.nvim", - opts = { - presets = { - command_palette = false, - }, - }, + -- opts = { + -- presets = { + -- command_palette = false, + -- }, + -- https://github.com/folke/noice.nvim/wiki/Configuration-Recipes#ignore-certain-lsp-servers-for-progress-messages + -- routes = { + -- { + -- filter = { + -- event = "lsp", + -- kind = "msg_show"; + -- cond = function(message) + -- local client = vim.tbl_get(message.opts, "progress", "client") + -- return client == "nim_langserver" + -- end, + -- }, + -- opts = { skip = true }, + -- }, + -- }, + -- }, }, - -- add emoji completion - -- { - -- "hrsh7th/nvim-cmp", - -- dependencies = { "hrsh7th/cmp-emoji" }, - -- ---@param opts cmp.ConfigSchema - -- opts = function(_, opts) - -- local cmp = require("cmp") - -- opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } })) - -- end, - -- }, { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) @@ -35,12 +39,7 @@ return { "json", "yaml", - "go", "regex", - - "javascript", - "tsx", - "typescript", }) end, }, diff --git a/home/private_dot_config/nvim/lua/plugins/host.lua b/home/private_dot_config/nvim/lua/plugins/host.lua index 0dd0974..3130eb4 100644 --- a/home/private_dot_config/nvim/lua/plugins/host.lua +++ b/home/private_dot_config/nvim/lua/plugins/host.lua @@ -3,6 +3,7 @@ local plugins = {} local single_host_plugins = { othalan = { + { "aklt/plantuml-syntax" }, { "kaarmu/typst.vim" }, { "mickael-menu/zk-nvim", diff --git a/home/private_dot_config/nvim/lua/plugins/language/tex.lua b/home/private_dot_config/nvim/lua/plugins/language/tex.lua new file mode 100644 index 0000000..da52ff8 --- /dev/null +++ b/home/private_dot_config/nvim/lua/plugins/language/tex.lua @@ -0,0 +1,46 @@ +-- based on: https://raw.githubusercontent.com/LazyVim/LazyVim/main/lua/lazyvim/plugins/extras/lang/tex.lua +return { + -- Add BibTeX/LaTeX to treesitter + -- some issue with latex treesitter + -- { + -- "nvim-treesitter/nvim-treesitter", + -- opts = function(_, opts) + -- opts.highlight = opts.highlight or {} + -- if type(opts.ensure_installed) == "table" then + -- vim.list_extend(opts.ensure_installed, { "bibtex" }) + -- end + -- if type(opts.highlight.disable) == "table" then + -- vim.list_extend(opts.highlight.disable, { "latex" }) + -- else + -- opts.highlight.disable = { "latex" } + -- end + -- end, + -- }, + -- + { + "lervag/vimtex", + lazy = false, -- lazy-loading will disable inverse search + config = function() + vim.g.vimtex_mappings_disable = { ["n"] = { "K" } } -- disable `K` as it conflicts with LSP hover + vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog" + end, + keys = { + { "l", "", desc = "+vimtext" }, + }, + }, + + -- Correctly setup lspconfig for LaTeX 🚀 + { + "neovim/nvim-lspconfig", + optional = true, + opts = { + servers = { + texlab = { + keys = { + { "K", "(vimtex-doc-package)", desc = "Vimtex Docs", silent = true }, + }, + }, + }, + }, + }, +}