lervag / vimtex

VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
MIT License
5.45k stars 388 forks source link

Option to turn chktex off #2937

Closed aksuhton closed 5 months ago

aksuhton commented 5 months ago

Hi Lervag, thanks again for all your work here.

I'd like for warnings such as the following to not automatically appear in my documents while writing and I think the culprit is chktex:

% W: missing `\…
% W: Interword spacing (`\ ') should perhaps be used. (12)

Ideally for me, chktex would write only to a file that I could inspect separately, but I'll settle to just like to turn chktex off entirely. Reading through documentation I had though the following would work, but it does not

let g:vimtex_lint_chktex_ignore_warnings = '-nall -oall'

Edit: Is this a duplicate of #2263?

I do not think I have any linter or lsp plugin installed; here's the beginning of my vimrc:

filetype on
filetype plugin on
filetype plugin indent on
syntax enable
set nocompatible
call plug#begin()
Plug 'lervag/vimtex'
Plug 'morhetz/gruvbox'
Plug 'KeitaNakamura/tex-conceal.vim'
Plug 'JuliaEditorSupport/julia-vim'
Plug 'jpalardy/vim-slime'
Plug 'mroavi/vim-julia-cell', { 'for': 'julia' }
Plug 'hanschen/vim-ipython-cell', { 'for': 'python' }
Plug 'iberianpig/ranger-explorer.vim'
call plug#end()
lervag commented 5 months ago

I'd like for warnings such as the following to not automatically appear in my documents while writing and I think the culprit is chktex: …

VimTeX does not give this type of warning by default. The chktex utility should not be run automatically unless you have specifically configured it to do so.

Edit: Is this a duplicate of #2263?

Yes, perhaps.

I do not think I have any linter or lsp plugin installed; here's the beginning of my vimrc: …

You don't need the first 5 lines - plug#end() will do the filetype and syntax stuff, and set nocompatible is not needed in vimrc file. Also, I think VimTeX more or less is a superset of the tex-conceal.vim plugin now, so I think you don't need that one either.

Now, it's hard to say what's wrong on your end based on only the start of your vimrc...

When you open a LaTeX file, what is the output of :scriptnames?

aksuhton commented 5 months ago

Hey Lervag, thank you for getting back to me and for helping me fix up my vimrc. The output of :scriptnames included an ale.vim plugin, loaded by some script I downloaded and didn't thoroughly inspect. After tracking that down I realized that the quickest solution is to add

let:g_ale_enabled = 0

Problem fixed (:

lervag commented 5 months ago

Hey Lervag, thank you for getting back to me and for helping me fix up my vimrc. The output of :scriptnames included an ale.vim plugin, after tracking that down I realized that the quickest solution is to add

Huh, this means you have plugins for your Vim that you don't know how you've installed. In my humble opinion, that's a very bad thing, and you should really investigate this and avoid it!

I expect one of two things:

  1. You may have installed Vim plugins through your system software installer (e.g apt on Ubuntu). DON'T DO THAT! It's NOT a good way to install Vim plugins!

  2. You are using the built in package stuff (:help packages). I also strongly advice against that. It is generally much easier to handle vim-plug or other similar plugin managers. If you are on Neovim, I recommend lazy.nvim.

aksuhton commented 5 months ago

Huh, this means you have plugins for your Vim that you don't know how you've installed. In my humble opinion, that's a very bad thing, and you should really investigate this and avoid it!

There's quite a bit being loaded that I need to go in and vet. It's not so bad as coming in through my system software installer, but still some very bad thing is going on.

Thank you again!

lervag commented 5 months ago

No poblem :)