mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-02 17:43:33 +08:00
Implement Lua ALE setup & overhaul documentation
1. Add ale.setup and ale.setup.buffer for pure Lua configuration. 2. Update many global settings to use Booleans instead of numbers to make types easiert to work with in Lua. 3. Radically reformat documentation and fix errors to make documentation more usable for Neovim users.
This commit is contained in:
@@ -92,6 +92,12 @@ Before:
|
||||
call g:LastHandleCallback(a:conn_id, a:message)
|
||||
AssertEqual [[0, '']], g:ale_queue_call_list
|
||||
|
||||
let g:ale_lint_on_text_changed = v:true
|
||||
|
||||
let g:ale_queue_call_list = []
|
||||
call g:LastHandleCallback(a:conn_id, a:message)
|
||||
AssertEqual [[0, '']], g:ale_queue_call_list
|
||||
|
||||
let g:ale_lint_on_text_changed = 'normal'
|
||||
|
||||
let g:ale_queue_call_list = []
|
||||
@@ -228,7 +234,7 @@ Execute(ALEImport should request imports correctly for tsserver):
|
||||
\ [
|
||||
\ [0, 'ts@completions', {
|
||||
\ 'file': expand('%:p'),
|
||||
\ 'includeExternalModuleExports': 1,
|
||||
\ 'includeExternalModuleExports': v:true,
|
||||
\ 'offset': 21,
|
||||
\ 'line': 2,
|
||||
\ 'prefix': 'missingword',
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
Before:
|
||||
Save g:ale_completion_delay
|
||||
Save g:ale_completion_enabled
|
||||
Save g:ale_completion_max_suggestions
|
||||
Save g:ale_completion_info
|
||||
Save g:ale_completion_autoimport
|
||||
Save &l:omnifunc
|
||||
Save &l:completeopt
|
||||
|
||||
let g:ale_completion_enabled = 1
|
||||
let g:ale_completion_enabled = v:true
|
||||
let g:ale_completion_autoimport = v:true
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/completion')
|
||||
call ale#test#SetFilename('dummy.txt')
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
Before:
|
||||
Save g:ale_completion_autoimport
|
||||
Save g:ale_completion_tsserver_remove_warnings
|
||||
|
||||
let g:ale_completion_tsserver_remove_warnings = 0
|
||||
let g:ale_completion_autoimport = v:true
|
||||
let g:ale_completion_tsserver_remove_warnings = v:false
|
||||
|
||||
After:
|
||||
Restore
|
||||
@@ -91,7 +93,7 @@ Execute(TypeScript completion details responses should be parsed correctly):
|
||||
\ 'kind': 'v',
|
||||
\ 'icase': 1,
|
||||
\ 'user_data': json_encode({'_ale_completion_item': 1}),
|
||||
\ 'dup': g:ale_completion_autoimport,
|
||||
\ 'dup': g:ale_completion_autoimport + 0,
|
||||
\ },
|
||||
\ {
|
||||
\ 'word': 'def',
|
||||
@@ -100,7 +102,7 @@ Execute(TypeScript completion details responses should be parsed correctly):
|
||||
\ 'kind': 'v',
|
||||
\ 'icase': 1,
|
||||
\ 'user_data': json_encode({'_ale_completion_item': 1}),
|
||||
\ 'dup': g:ale_completion_autoimport,
|
||||
\ 'dup': g:ale_completion_autoimport + 0,
|
||||
\ },
|
||||
\ {
|
||||
\ 'word': 'ghi',
|
||||
@@ -109,7 +111,7 @@ Execute(TypeScript completion details responses should be parsed correctly):
|
||||
\ 'kind': 'v',
|
||||
\ 'icase': 1,
|
||||
\ 'user_data': json_encode({'_ale_completion_item': 1}),
|
||||
\ 'dup': g:ale_completion_autoimport,
|
||||
\ 'dup': g:ale_completion_autoimport + 0,
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#completion#ParseTSServerCompletionEntryDetails({
|
||||
@@ -188,7 +190,7 @@ Execute(Entries without details should be included in the responses):
|
||||
\ 'changes': [],
|
||||
\ }],
|
||||
\ }),
|
||||
\ 'dup': g:ale_completion_autoimport,
|
||||
\ 'dup': g:ale_completion_autoimport + 0,
|
||||
\ },
|
||||
\ {
|
||||
\ 'word': 'def',
|
||||
@@ -197,7 +199,7 @@ Execute(Entries without details should be included in the responses):
|
||||
\ 'kind': 'v',
|
||||
\ 'icase': 1,
|
||||
\ 'user_data': json_encode({'_ale_completion_item': 1}),
|
||||
\ 'dup': g:ale_completion_autoimport,
|
||||
\ 'dup': g:ale_completion_autoimport + 0,
|
||||
\ },
|
||||
\ {
|
||||
\ 'word': 'xyz',
|
||||
@@ -272,7 +274,7 @@ Execute(Default imports should be handled correctly):
|
||||
\ 'changes': [],
|
||||
\ }],
|
||||
\ }),
|
||||
\ 'dup': g:ale_completion_autoimport,
|
||||
\ 'dup': g:ale_completion_autoimport + 0,
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#completion#ParseTSServerCompletionEntryDetails({
|
||||
|
||||
Reference in New Issue
Block a user