From 906a6ddf8456969c99fe9e0c12ae16b4ca5e0747 Mon Sep 17 00:00:00 2001 From: Updater Date: Sun, 2 Jun 2024 00:04:59 -0400 Subject: [PATCH] fix(nvim): set config file for latex indenting --- common/home/neovim/langs/markdown.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/common/home/neovim/langs/markdown.nix b/common/home/neovim/langs/markdown.nix index 8027dca..5d6db55 100644 --- a/common/home/neovim/langs/markdown.nix +++ b/common/home/neovim/langs/markdown.nix @@ -30,7 +30,6 @@ in }; in { startup_commands = "toggle_custom_color"; - # TODO: make sure the font is applied ui_font = "JetBrainsMono Nerd Font Mono Regular"; font_size = "24"; source = "${dracula-theme}/dracula.config"; @@ -55,7 +54,18 @@ in local lsp = require('lspconfig'); local coq = require('coq'); - lsp.texlab.setup(coq.lsp_ensure_capabilities({})); + lsp.texlab.setup(coq.lsp_ensure_capabilities({ + settings = { + texlab = { + formatterLineLength = 100, + latexFormatter = 'latexindent', + latexindent = { + modifyLineBreaks = false, + ["local"] = '.indentconfig.yaml'; + }, + }, + }, + })); ''; plugins = [ @@ -79,6 +89,11 @@ in lua */ '' + vim.api.nvim_create_autocmd('FileType', { + pattern = 'tex', + command = 'setlocal ts=4 sw=4 sts=0 expandtab', + }); + local gknapsettings = { -- HTML htmloutputext = "html",