Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for textidote (LaTeX and Markdown linter) #2467

Open
dkasak opened this issue Apr 29, 2019 · 2 comments
Open

Add support for textidote (LaTeX and Markdown linter) #2467

dkasak opened this issue Apr 29, 2019 · 2 comments
Labels
new tool Support for new linters, fixers, etc.

Comments

@dkasak
Copy link

dkasak commented Apr 29, 2019

Name: textidote
URL: https://github.com/sylvainhalle/textidote

This is a linter for LaTeX which strips away LaTeX commands, but remembering the original positions of the text. It then passes the text to LanguageTool and can map errors from it back to the correct LaTeX source file locations.

They also recently added support for Markdown.

@w0rp w0rp added the new tool Support for new linters, fixers, etc. label Apr 29, 2019
@jagjordi
Copy link

jagjordi commented Mar 13, 2020

" Author: Jordi Altayo <[email protected]>
" Description: support for textidote grammar and syntax checker

let g:ale_tex_textidote_executable = 'textidote'
let g:ale_tex_textidote_options = '--output singleline'

function! ale_linters#tex#textidote#Handle(buffer, lines) abort
    let l:pattern = '.*' . expand('%:t:r') . '\.tex(L\(\d\+\)C\(\d\+\)-L\d\+C\d\+): \(.*\)".*"'
    let l:output = []

    for l:match in ale#util#GetMatches(a:lines, l:pattern)
        call add(l:output, {
        \   'lnum': l:match[1] + 0,
        \   'col' : l:match[2] + 0,
        \   'text': l:match[3],
        \   'type': 'E',
        \})
    endfor

    return l:output
endfunction

call ale#linter#Define('tex', {
\   'name': 'textidote',
\   'output_stream': 'stdout',
\   'executable': 'textidote',
\   'command': 'textidote --no-color --output singleline ' . expand('%'),
\   'callback': 'ale_linters#tex#textidote#Handle',
\})

Right now I don't have time to write the tests and create the pull request (will do it at some point) but this works with textidote, just place it under .vim/plugged/ale/ale_linters/tex/textidote.vim

juanolon added a commit to juanolon/ale that referenced this issue Mar 21, 2020
cyyever pushed a commit to cyyever/ale that referenced this issue Apr 29, 2020
cyyever pushed a commit to cyyever/ale that referenced this issue Aug 8, 2020
cyyever pushed a commit to cyyever/ale that referenced this issue Oct 5, 2020
cyyever pushed a commit to cyyever/ale that referenced this issue Oct 31, 2020
cyyever pushed a commit to cyyever/ale that referenced this issue Feb 14, 2021
cyyever pushed a commit to cyyever/ale that referenced this issue Feb 14, 2021
cyyever pushed a commit to cyyever/ale that referenced this issue May 12, 2021
cyyever pushed a commit to cyyever/ale that referenced this issue Jun 22, 2021
cyyever pushed a commit to cyyever/ale that referenced this issue Jul 31, 2021
cyyever pushed a commit to cyyever/ale that referenced this issue Sep 28, 2021
cyyever pushed a commit to cyyever/ale that referenced this issue Sep 28, 2021
cyyever pushed a commit to cyyever/ale that referenced this issue Sep 28, 2021
cyyever pushed a commit to cyyever/ale that referenced this issue Sep 28, 2021
cyyever pushed a commit to cyyever/ale that referenced this issue Sep 28, 2021
bvolkmer pushed a commit to bvolkmer/ale that referenced this issue Oct 30, 2021
cyyever pushed a commit to cyyever/ale that referenced this issue Mar 13, 2022
cyyever pushed a commit to cyyever/ale that referenced this issue Mar 13, 2022
cyyever pushed a commit to cyyever/ale that referenced this issue Jul 11, 2022
cyyever pushed a commit to cyyever/ale that referenced this issue Jul 11, 2022
cyyever pushed a commit to cyyever/ale that referenced this issue Oct 3, 2022
cyyever pushed a commit to cyyever/ale that referenced this issue Oct 3, 2022
cyyever pushed a commit to cyyever/ale that referenced this issue Oct 22, 2022
cyyever pushed a commit to cyyever/ale that referenced this issue Oct 22, 2022
cyyever pushed a commit to cyyever/ale that referenced this issue Oct 22, 2022
cyyever pushed a commit to cyyever/ale that referenced this issue Jan 20, 2023
cyyever pushed a commit to cyyever/ale that referenced this issue Jan 20, 2023
cyyever pushed a commit to cyyever/ale that referenced this issue Apr 20, 2023
cyyever pushed a commit to cyyever/ale that referenced this issue Apr 20, 2023
cyyever pushed a commit to cyyever/ale that referenced this issue Feb 14, 2024
cyyever pushed a commit to cyyever/ale that referenced this issue Feb 25, 2024
cyyever pushed a commit to cyyever/ale that referenced this issue Jul 1, 2024
cyyever pushed a commit to cyyever/ale that referenced this issue Jul 11, 2024
@nospam2998
Copy link
Contributor

Please see quote from :help ale#linter#Define below. It should be safe to skip setting output_stream.

This argument defaults to 'stdout'.

cyyever pushed a commit to cyyever/ale that referenced this issue Nov 2, 2024
cyyever pushed a commit to cyyever/ale that referenced this issue Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new tool Support for new linters, fixers, etc.
Projects
None yet
Development

No branches or pull requests

4 participants