2016-10-03 14:41:02 -04:00
|
|
|
" Author: w0rp <devw0rp@gmail.com>
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
" Description: Main entry point for the plugin: sets up prefs and autocommands
|
|
|
|
" Preferences can be set in vimrc files and so on to configure ale
|
2016-09-08 19:23:26 -04:00
|
|
|
|
2016-10-11 10:54:14 -04:00
|
|
|
" Sanity Checks
|
|
|
|
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
if exists('g:loaded_ale')
|
2016-09-08 19:23:26 -04:00
|
|
|
finish
|
|
|
|
endif
|
2016-10-25 09:09:58 -04:00
|
|
|
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
let g:loaded_ale = 1
|
2016-09-08 19:23:26 -04:00
|
|
|
|
2016-10-10 08:16:32 -04:00
|
|
|
" A flag for detecting if the required features are set.
|
|
|
|
if has('nvim')
|
2016-10-11 10:54:14 -04:00
|
|
|
let s:ale_has_required_features = has('timers')
|
2016-10-10 08:16:32 -04:00
|
|
|
else
|
2016-10-11 10:54:14 -04:00
|
|
|
let s:ale_has_required_features = has('timers') && has('job') && has('channel')
|
2016-10-10 08:16:32 -04:00
|
|
|
endif
|
|
|
|
|
2016-10-11 10:54:14 -04:00
|
|
|
if !s:ale_has_required_features
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
echoerr 'ALE requires NeoVim >= 0.1.5 or Vim 8 with +timers +job +channel'
|
|
|
|
echoerr 'Please update your editor appropriately.'
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2016-10-24 15:21:32 -04:00
|
|
|
" This global variable is used internally by ALE for tracking information for
|
|
|
|
" each buffer which linters are being run against.
|
2016-10-23 17:41:00 -04:00
|
|
|
let g:ale_buffer_info = {}
|
2016-10-11 10:54:14 -04:00
|
|
|
|
|
|
|
" User Configuration
|
|
|
|
|
2016-10-25 09:09:58 -04:00
|
|
|
" This option prevents ALE autocmd commands from being run for particular
|
|
|
|
" filetypes which can cause issues.
|
|
|
|
let g:ale_filetype_blacklist = ['nerdtree', 'unite']
|
|
|
|
|
|
|
|
" This function lets you define autocmd commands which blacklist particular
|
|
|
|
" filetypes.
|
|
|
|
function! ALEAutoCMD(events, function_call)
|
|
|
|
execute 'autocmd '
|
|
|
|
\ . a:events
|
|
|
|
\ ' * if index(g:ale_filetype_blacklist, &filetype) < 0 | call '
|
|
|
|
\ . a:function_call
|
|
|
|
endfunction
|
|
|
|
|
2016-10-11 18:11:45 -04:00
|
|
|
" This Dictionary configures which linters are enabled for which languages.
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
let g:ale_linters = get(g:, 'ale_linters', {})
|
|
|
|
|
2016-10-11 18:11:45 -04:00
|
|
|
" This Dictionary allows users to set up filetype aliases for new filetypes.
|
|
|
|
let g:ale_linter_aliases = get(g:, 'ale_linter_aliases', {})
|
|
|
|
|
2016-09-08 19:23:26 -04:00
|
|
|
" This flag can be set with a number of milliseconds for delaying the
|
|
|
|
" execution of a linter when text is changed. The timeout will be set and
|
|
|
|
" cleared each time text is changed, so repeated edits won't trigger the
|
|
|
|
" jobs for linting until enough time has passed after editing is done.
|
2016-10-05 04:27:03 -04:00
|
|
|
let g:ale_lint_delay = get(g:, 'ale_lint_delay', 200)
|
2016-09-08 19:23:26 -04:00
|
|
|
|
2016-10-11 10:54:14 -04:00
|
|
|
" This flag can be set to 0 to disable linting when text is changed.
|
|
|
|
let g:ale_lint_on_text_changed = get(g:, 'ale_lint_on_text_changed', 1)
|
|
|
|
if g:ale_lint_on_text_changed
|
|
|
|
augroup ALERunOnTextChangedGroup
|
|
|
|
autocmd!
|
2016-10-25 09:09:58 -04:00
|
|
|
call ALEAutoCMD('TextChanged,TextChangedI', 'ale#Queue(g:ale_lint_delay)')
|
2016-10-11 10:54:14 -04:00
|
|
|
augroup END
|
|
|
|
endif
|
|
|
|
|
2016-09-08 19:23:26 -04:00
|
|
|
" This flag can be set to 0 to disable linting when the buffer is entered.
|
2016-10-04 16:28:54 -04:00
|
|
|
let g:ale_lint_on_enter = get(g:, 'ale_lint_on_enter', 1)
|
2016-10-11 10:54:14 -04:00
|
|
|
if g:ale_lint_on_enter
|
|
|
|
augroup ALERunOnEnterGroup
|
|
|
|
autocmd!
|
2016-10-25 09:09:58 -04:00
|
|
|
call ALEAutoCMD('BufEnter,BufRead', 'ale#Queue(100)')
|
2016-10-11 10:54:14 -04:00
|
|
|
augroup END
|
|
|
|
endif
|
2016-09-08 19:23:26 -04:00
|
|
|
|
2016-10-04 16:31:47 -04:00
|
|
|
" This flag can be set to 1 to enable linting when a buffer is written.
|
|
|
|
let g:ale_lint_on_save = get(g:, 'ale_lint_on_save', 0)
|
2016-10-11 10:54:14 -04:00
|
|
|
if g:ale_lint_on_save
|
|
|
|
augroup ALERunOnSaveGroup
|
|
|
|
autocmd!
|
2016-10-25 09:09:58 -04:00
|
|
|
call ALEAutoCMD('BufWrite', 'ale#Queue(0)')
|
2016-10-11 10:54:14 -04:00
|
|
|
augroup END
|
|
|
|
endif
|
2016-10-04 16:31:47 -04:00
|
|
|
|
2016-09-08 19:23:26 -04:00
|
|
|
" This flag can be set to 0 to disable setting the loclist.
|
2016-10-04 16:28:54 -04:00
|
|
|
let g:ale_set_loclist = get(g:, 'ale_set_loclist', 1)
|
2016-09-08 19:23:26 -04:00
|
|
|
|
|
|
|
" This flag can be set to 0 to disable setting signs.
|
2016-10-04 16:28:54 -04:00
|
|
|
" This is enabled by default only if the 'signs' feature exists.
|
|
|
|
let g:ale_set_signs = get(g:, 'ale_set_signs', has('signs'))
|
2016-09-08 19:23:26 -04:00
|
|
|
|
2016-10-11 10:54:14 -04:00
|
|
|
" These variables dicatate what sign is used to indicate errors and warnings.
|
|
|
|
let g:ale_sign_error = get(g:, 'ale_sign_error', '>>')
|
|
|
|
let g:ale_sign_warning = get(g:, 'ale_sign_warning', '--')
|
2016-09-15 08:08:21 -04:00
|
|
|
|
2016-10-11 10:54:14 -04:00
|
|
|
" This variable sets an offset which can be set for sign IDs.
|
|
|
|
" This ID can be changed depending on what IDs are set for other plugins.
|
|
|
|
" The dummy sign will use the ID exactly equal to the offset.
|
|
|
|
let g:ale_sign_offset = get(g:, 'ale_sign_offset', 1000000)
|
2016-09-26 11:02:21 -04:00
|
|
|
|
|
|
|
" This flag can be set to 1 to keep sign gutter always open
|
2016-10-04 16:28:54 -04:00
|
|
|
let g:ale_sign_column_always = get(g:, 'ale_sign_column_always', 0)
|
2016-10-07 01:49:30 -04:00
|
|
|
|
2016-10-10 07:53:54 -04:00
|
|
|
" String format for the echoed message
|
|
|
|
" A %s is mandatory
|
|
|
|
" It can contain 2 handlers: %linter%, %severity%
|
|
|
|
let g:ale_echo_msg_format = get(g:, 'ale_echo_msg_format', '%s')
|
|
|
|
|
|
|
|
" Strings used for severity in the echoed message
|
|
|
|
let g:ale_echo_msg_error_str = get(g:, 'ale_echo_msg_error_str', 'Error')
|
|
|
|
let g:ale_echo_msg_warning_str = get(g:, 'ale_echo_msg_warning_str', 'Warning')
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
|
2016-10-11 10:54:14 -04:00
|
|
|
" This flag can be set to 0 to disable echoing when the cursor moves.
|
Implement a more efficient statusbar
The statusbar now keeps its state in a separate variable, in order to
avoid excess iterations. The engine now updates said variable on run,
and a new function is made available for external statusbars to call (to
avoid dependencies on internal implementation details of ale).
To keep things light, the status bar code is not loaded unless invoked
by the user or an external plugin. On the first load it will update
itself from the global loclist, after that, the engine will handle all
updates.
The external integration function, `ale#statusline#Count()`, will return
a tuple in the format [E, W] (where E is errors, W is warnings), unless
no data exists (ie, the plugin doesn't have a linter for a file or has
not run yet), in which case it returns 0/false.
2016-10-11 17:51:01 -04:00
|
|
|
let g:ale_echo_cursor = get(g:, 'ale_echo_cursor', 1)
|
|
|
|
if g:ale_echo_cursor
|
2016-10-11 10:54:14 -04:00
|
|
|
augroup ALECursorGroup
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
autocmd!
|
2016-10-25 09:09:58 -04:00
|
|
|
call ALEAutoCMD('CursorMoved,CursorHold', 'ale#cursor#EchoCursorWarningWithDelay()')
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
augroup END
|
|
|
|
endif
|
|
|
|
|
2016-10-11 10:54:14 -04:00
|
|
|
" String format for statusline
|
|
|
|
" Its a list where:
|
|
|
|
" * The 1st element is for errors
|
|
|
|
" * The 2nd element is for warnings
|
|
|
|
" * The 3rd element is when there are no errors
|
|
|
|
let g:ale_statusline_format = get(g:, 'ale_statusline_format',
|
|
|
|
\ ['%d error(s)', '%d warning(s)', 'OK']
|
|
|
|
\)
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
|
2016-10-11 10:54:14 -04:00
|
|
|
" This flag can be set to 0 to disable warnings for trailing whitespace
|
|
|
|
let g:ale_warn_about_trailing_whitespace =
|
|
|
|
\ get(g:, 'ale_warn_about_trailing_whitespace', 1)
|
|
|
|
|
|
|
|
" Housekeeping
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
|
Implement a more efficient statusbar
The statusbar now keeps its state in a separate variable, in order to
avoid excess iterations. The engine now updates said variable on run,
and a new function is made available for external statusbars to call (to
avoid dependencies on internal implementation details of ale).
To keep things light, the status bar code is not loaded unless invoked
by the user or an external plugin. On the first load it will update
itself from the global loclist, after that, the engine will handle all
updates.
The external integration function, `ale#statusline#Count()`, will return
a tuple in the format [E, W] (where E is errors, W is warnings), unless
no data exists (ie, the plugin doesn't have a linter for a file or has
not run yet), in which case it returns 0/false.
2016-10-11 17:51:01 -04:00
|
|
|
augroup ALECleanupGroup
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
autocmd!
|
2016-10-11 10:54:14 -04:00
|
|
|
" Clean up buffers automatically when they are unloaded.
|
2016-10-25 09:09:58 -04:00
|
|
|
call ALEAutoCMD('BufUnload', "ale#cleanup#Buffer(expand('<abuf>'))")
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
augroup END
|
|
|
|
|
2016-10-11 10:54:14 -04:00
|
|
|
" Backwards Compatibility
|
2016-10-10 14:56:05 -04:00
|
|
|
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
function! ALELint(delay)
|
|
|
|
call ale#Queue(a:delay)
|
|
|
|
endfunction
|
2016-10-11 10:54:14 -04:00
|
|
|
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
function! ALEGetStatusLine()
|
2016-10-11 15:24:43 -04:00
|
|
|
return ale#statusline#Status()
|
First pass at optimizing ale to autoload (#80)
* First pass at optimizing ale to autoload
First off, the structure/function names should be revised a bit,
but I will wait for @w0rp's input before unifying the naming style.
Second off, the docs probably need some more work, I just did some
simple find-and-replace work.
With that said, this pull brings major performance gains for ale. On my
slowest system, fully loading ale and all its code takes around 150ms.
I have moved all of ale's autoload-able code to autoload/, and in
addition, implemented lazy-loading of linters. This brings load time on
that same system down to 5ms.
The only downside of lazy loading is that `g:ale_linters` cannot be
changed at runtime; however, it also speeds up performance at runtime by
simplfying the logic greatly.
Please let me know what you think!
Closes #59
* Address Travis/Vint errors
For some reason, ale isn't running vint for me...
* Incorporate feedback, make fixes
Lazy-loading logic is much improved.
* Add header comments; remove incorrect workaround
* Remove unneeded plugin guards
* Fix lazy-loading linter logic
Set the wrong variable....
* Fix capitialization
2016-10-10 14:51:29 -04:00
|
|
|
endfunction
|