mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-27 05:12:16 +08:00
Stop supporting ale_lsp_root
We renamed the ale_lsp_root setting to ale_root long ago. Stop supporting the old setting name.
This commit is contained in:
@@ -261,11 +261,7 @@ function! ale#lsp_linter#GetConfig(buffer, linter) abort
|
||||
endfunction
|
||||
|
||||
function! ale#lsp_linter#FindProjectRoot(buffer, linter) abort
|
||||
let l:buffer_ale_root = getbufvar(
|
||||
\ a:buffer,
|
||||
\ 'ale_root',
|
||||
\ getbufvar(a:buffer, 'ale_lsp_root', {})
|
||||
\)
|
||||
let l:buffer_ale_root = getbufvar(a:buffer, 'ale_root', {})
|
||||
|
||||
if type(l:buffer_ale_root) is v:t_string
|
||||
return l:buffer_ale_root
|
||||
@@ -282,15 +278,9 @@ function! ale#lsp_linter#FindProjectRoot(buffer, linter) abort
|
||||
endif
|
||||
endif
|
||||
|
||||
let l:global_root = g:ale_root
|
||||
|
||||
if empty(g:ale_root) && exists('g:ale_lsp_root')
|
||||
let l:global_root = g:ale_lsp_root
|
||||
endif
|
||||
|
||||
" Try to get a global setting for the root
|
||||
if has_key(l:global_root, a:linter.name)
|
||||
let l:Root = l:global_root[a:linter.name]
|
||||
if has_key(g:ale_root, a:linter.name)
|
||||
let l:Root = g:ale_root[a:linter.name]
|
||||
|
||||
if type(l:Root) is v:t_func
|
||||
return l:Root(a:buffer)
|
||||
|
||||
@@ -21,11 +21,11 @@ function! s:OpenJDTLink(root, uri, line, column, options, result) abort
|
||||
call ale#util#Open(a:uri, a:line, a:column, a:options)
|
||||
autocmd AleURISchemes BufNewFile,BufReadPre jdt://** call ale#uri#jdt#ReadJDTLink(expand('<amatch>'))
|
||||
|
||||
if !empty(getbufvar(bufnr(''), 'ale_lsp_root', ''))
|
||||
if !empty(getbufvar(bufnr(''), 'ale_root', ''))
|
||||
return
|
||||
endif
|
||||
|
||||
let b:ale_lsp_root = a:root
|
||||
let b:ale_root = a:root
|
||||
set filetype=java
|
||||
|
||||
call setline(1, split(l:contents, '\n'))
|
||||
@@ -83,7 +83,7 @@ endfunction
|
||||
|
||||
" Read jdt:// contents, as part of current project, into current buffer.
|
||||
function! ale#uri#jdt#ReadJDTLink(encoded_uri) abort
|
||||
if !empty(getbufvar(bufnr(''), 'ale_lsp_root', ''))
|
||||
if !empty(getbufvar(bufnr(''), 'ale_root', ''))
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -100,7 +100,7 @@ function! ale#uri#jdt#ReadJDTLink(encoded_uri) abort
|
||||
endif
|
||||
|
||||
let l:uri = a:encoded_uri
|
||||
let b:ale_lsp_root = l:root
|
||||
let b:ale_root = l:root
|
||||
set filetype=java
|
||||
|
||||
call ale#lsp_linter#SendRequest(
|
||||
|
||||
Reference in New Issue
Block a user