Vim for LaTeX addition

This commit is contained in:
Eduardo Cueto-Mendoza 2023-07-21 09:46:34 +01:00
parent a32b412a85
commit 7f57a289e8
3 changed files with 68 additions and 14 deletions

View File

@ -16,7 +16,61 @@ lsp.ensure_installed({
'zls' 'zls'
}) })
--[[
START LANGUAGE SERVERS CONFIG HERE!!!
]]--
-- (Optional) Configure lua language server for neovim -- (Optional) Configure lua language server for neovim
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
require('lspconfig').texlab.setup({})
require('lspconfig').ltex.setup({
settings = {
ltex = {
language = "en-GB",
},
},
})
require('lspconfig').pylsp.setup({})
--require('lspconfig').gopls.setup({
-- on_attach = on_attach,
--})
require('lspconfig').julials.setup({
--on_attach = on_attach,
symbol_cache_download = true,
--symbol_server = "https://symbol-server",
on_new_config = function(new_config, _)
local julia = vim.fn.expand("/usr/share/julia/bin/julia")
if require'lspconfig'.util.path.is_file(julia) then
vim.notify("Hello!")
new_config.cmd[1] = julia
end
end
})
require('lspconfig').zls.setup({})
require('lspconfig').bashls.setup({})
-- source: https://rust-analyzer.github.io/manual.html#nvim-lsp
--require('lspconfig').rust_analyzer.setup({
-- on_attach = on_attach,
-- settings = {
-- ["rust-analyzer"] = {
-- inlayHints = {
-- closingBraceHints = true, -- Whether to show inlay hints after a closing } to indicate what item it belongs to.
-- }
-- }
-- }
--})
--[[
END LANGUAGE SERVERS CONFIG HERE!!!
]]--
lsp.setup() lsp.setup()

View File

@ -63,29 +63,26 @@ vim.g.completion_enable_auto_popup = 1
vim.g.loaded_python_provider = 0 vim.g.loaded_python_provider = 0
vim.g.python3_host_prog = "/usr/local/bin/python" vim.g.python3_host_prog = "/usr/local/bin/python"
-- PDF Viewer: -- Vimtex options:
-- http://manpages.ubuntu.com/manpages/trusty/man5/zathurarc.5.html vim.g.vimtex_view_method = "zathura"
vim.g["vimtex_view_method"] = "zathura" vim.g.vimtex_general_viewer = "zathura"
vim.g["vimtex_quickfix_mode"] =0 --vim.g.vimtex_quickfix_mode = 0
-- Ignore mappings ---- Ignore mappings
vim.g["vimtex_mappings_enabled"] = 1 --vim.g["vimtex_mappings_enabled"] = 1
-- Auto Indent ---- Auto Indent
vim.g["vimtex_indent_enabled"] = 1 --vim.g["vimtex_indent_enabled"] = 1
-- Syntax highlighting ---- Syntax highlighting
vim.g["vimtex_syntax_enabled"] = 1 vim.g.vimtex_syntax_enabled = 0
-- Error suppression: -- Error suppression:
-- https://github.com/lervag/vimtex/blob/master/doc/vimtex.txt vim.g.vimtex_log_ignore = ({
vim.g["vimtex_log_ignore"] = ({
"Underfull", "Underfull",
"Overfull", "Overfull",
"specifier changed to", "specifier changed to",
"Token not allowed in a PDF string", "Token not allowed in a PDF string",
}) })
vim.g["vimtex_context_pdf_viewer"] = "zathura"

View File

@ -58,6 +58,9 @@ return require('packer').startup(function(use)
} }
} }
-- Latex on NVIM
use 'lervag/vimtex'
-- :FixWhitespace -- :FixWhitespace
use "bronson/vim-trailing-whitespace" use "bronson/vim-trailing-whitespace"