Commit Graph

134 Commits

Author SHA1 Message Date
w0rp c0a279f967
Indicate things to be removed in version 2.0 2018-05-28 19:39:49 +01:00
w0rp f2837b5802
#1524 - Define global variables where they are needed 2018-05-28 19:19:20 +01:00
w0rp 18509195f5
#1524 Do not try to check buffers with empty filetypes 2018-05-28 17:38:14 +01:00
w0rp d9717147bf
Close #1559 - Report errors from LSP servers in :ALEInfo 2018-05-28 16:24:15 +01:00
Chris Marchesi b7996803c9
Add ALEJobStarted User autocommand event
The ALELintPre and ALELintPost autocommand events are currently being
used by lightline-ale to refresh the status line and check the linter
status for a current buffer. One of the plugin's checks looks to see if
linters are currently running, via ale#engine#IsCheckingBuffer(). This
currently only works partially in certain situations. In my particular
case, working with Go files, this only seems to function properly when a
file is initially opened. Saving a file does not correctly update the
status.

This seems to be due to the fact that ALELintPre actually runs before
any jobs are carried out, making it plausible that hooking into
ALELintPre for the purpose of checking to see if there are any currently
running linters for a buffer is unreliable as it would be prone to
pretty obvious race conditions.

This adds a new User autocommand, ALEJobStarted, that gets fired at the
start of every new job that is successfully run. This allows a better
point to hook into checking the linter status of a buffer using
ale#engine#IsCheckingBuffer() by ensuring that at least one job has
started by the time IsCheckingBuffer is run.
2018-04-27 15:40:02 -07:00
w0rp 91d7e81ebc
Fix #605 - Support `vcol: 1` for multi-byte character positions 2018-04-08 17:17:46 +01:00
w0rp 43e8f47e6e
#1431 Normalize paths when checking for temporary paths on Windows 2018-03-18 20:39:50 +00:00
w0rp 0a0535546f Add a command for stopping all LSP clients 2018-03-06 10:23:55 +00:00
w0rp 08cfd5f90c
Close #1379 - Increment b:ale_linted when a buffer is checked 2018-03-03 16:22:56 +00:00
w0rp 2096562899 Make updating linter results slightly faster when the list is empty 2018-03-02 12:10:27 +00:00
w0rp 478a2883a6 #1363 Make ale#engine#IsCheckingBuffer part of the public API 2018-02-25 12:57:54 +00:00
w0rp a5ec4143d2 Fix the didSave tests so they work in NeoVim 0.1.7, and do not send the message for tsserver 2018-01-19 16:50:04 +00:00
Rafael Lerm 042dec059a Send didSave message to LSP-based linters (#1295)
* Also send didSave to LSP linters.
* Add tests for messages sent to LSP linters.
2018-01-19 16:40:55 +00:00
w0rp e43e7065da Fix #1115 - Add support for wrapping all commands with an option 2017-12-20 12:20:38 +00:00
w0rp 8afd9a70a6 #1212 Fix some echo cursor flashing by only echoing once all linters are finished. 2017-12-18 11:14:10 +00:00
Martin Tournoij 4825cce1cc
Run before lint cycle, rename autocmds 2017-12-10 13:10:52 +00:00
Martin Tournoij d6bf13502a
Add ALEStartLint autocmd
This grew out of my work in #1193; to ensure the statusline was being
updated I had to add:

    fun! s:redraw(timer)
        redrawstatus
    endfun

    augroup ALEProgress
        autocmd!
        autocmd BufWritePost * call timer_start(100, function('s:redraw'))
        autocmd User ALELint redrawstatus
    augroup end

Which kind of works, but is ugly. With this, I can replace the
`BufWritePost` with:

    autocmd User ALEStartLint redrawstatus

Which is much better, IMHO.

Actually, this patch actually replaces adding a function, since you can
do:

    augroup ALEProgress
        autocmd!
        autocmd User ALEStartLint hi Statusline ctermfg=darkgrey
        autocmd User ALELint      hi Statusline ctermfg=NONE
    augroup end

or:

    let s:ale_running = 0
    let l:stl .= '%{s:ale_running ? "[linting]" : ""}'
    augroup ALEProgress
        autocmd!
        autocmd User ALEStartLint let s:ale_running = 1 | redrawstatus
        autocmd User ALELint      let s:ale_running = 0 | redrawstatus
    augroup end

Both seem to work very well in my testing.

No need to `ale#Statusline#IsRunning()` anymore, I think?
2017-12-07 16:14:20 +00:00
w0rp a990188e27 Fix #1176 - Add an option for caching failing executable checks 2017-11-30 10:34:51 +00:00
w0rp 3ef98f42bd Fix #783 - Do not run Flow with home directory configuration files by default 2017-11-21 14:37:01 +00:00
w0rp e12e5c912c Complain about stray echo lines in the codebase 2017-11-15 12:00:13 +00:00
w0rp fea708cff3 #852 Pass on error codes in the loclist corrections 2017-11-13 23:34:00 +00:00
w0rp caed406e16 Fix #1062 - Use <nomodeline> for the ALELint autocmd, so we don not mess with folds, etc. 2017-11-05 17:34:36 +00:00
w0rp b952dda386 Get all tests to pass on Windows 2017-10-23 23:09:40 +01:00
w0rp 69d6ff6020 #904 Do less processing when newer NeoVim versions are exiting 2017-10-14 19:22:19 +01:00
rhysd 753592ca66 Fix typos 2017-10-03 01:11:54 +09:00
w0rp a59d1ddbf3 Make temporary file detection work on just about all platforms 2017-09-14 00:11:17 +01:00
w0rp c7fbcb3c02 Fix #899 - Make the quickfix and loclist windows close again 2017-09-03 19:44:00 +01:00
w0rp e13651c16d Fix #825 - Downgrade signs when problems change 2017-08-26 16:38:27 +01:00
w0rp cdd1ddffdb Fix #876 - Save history in a separate buffer variable so history works when linting is disabled 2017-08-25 22:22:26 +01:00
w0rp 623fdf212c Include executable checks in ALEInfo 2017-08-23 21:41:29 +01:00
w0rp 0507503aa7 #653 Set loclists better when taking data from previous buffers 2017-08-22 22:45:55 +01:00
w0rp 1a524ca63e #653 - Always set loclist or quickfix in a timer callback, which prevents errors E924, E925, and E926 2017-08-22 21:19:36 +01:00
w0rp 7112776d1b #653 Update tslint to set the filename key for problems in other files 2017-08-20 00:05:15 +01:00
w0rp fb0adc602e #653 Treat temporary filenames as being for the current buffer 2017-08-19 21:18:27 +01:00
w0rp 9d6883561c #653 Set problems from other buffers when buffers are first checked 2017-08-19 20:15:46 +01:00
w0rp 1680f7af63 Fix a bug where the sign column was not closed some of the time, etc. 2017-08-14 10:00:46 +01:00
w0rp d5ae3201a4 Ban !=# and !=? from the codebase 2017-08-11 00:31:42 +01:00
w0rp b1462ac66c #653 - Pass on filenames for loclist items 2017-08-10 23:08:40 +01:00
w0rp a535d07f28 Ban use of ==# or ==? in the codebase, and prefer is# or is? instead 2017-08-08 08:39:13 +01:00
w0rp 16cfedf04a Fix #271 - Add the ability to open the quickfix or loclist windows only after saving a file 2017-08-08 00:46:42 +01:00
w0rp 593cafa18b Fix #823 - Write Windows files with CRLF 2017-08-05 20:17:25 +01:00
w0rp 09d50ebe31 Cover the Rust LSP with tests, allow LSP linters to be named anything, and rename the Rust LSP linter to `rls` 2017-08-02 23:21:30 +01:00
w0rp a4ffd2f37c #734 - Use the buffer number from the events for entering buffers and saving buffers for checking buffers 2017-08-01 00:03:24 +01:00
w0rp ec82530247 #734 - Do not clear file linter results when no buffers are run 2017-07-31 22:36:30 +01:00
w0rp 5810d7faa0 Add some error message handling for LSP, for test purposes 2017-07-30 22:17:29 +01:00
w0rp 63b9d9e9df Fix #798 - Handle syntax errors for tsserver 2017-07-27 13:24:32 +01:00
w0rp fbf59fd4ce Check the active_linter_list only for running linters 2017-07-26 10:44:27 +01:00
w0rp cfdb41f4d2 Remove a redundant check for tsserver 2017-07-26 10:44:07 +01:00
w0rp cd860e3e8d #517 Add more code LSP support which makes the tssserver linter behave more like the LSP linters 2017-07-26 10:37:37 +01:00
w0rp cad9fc19c6 Fix #773 - Do not clear the loclist when closing the loclist window 2017-07-15 18:44:45 +01:00