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:
w0rp
2023-09-16 17:17:42 +01:00
parent 1799f8bec6
commit cf270a1ada
4 changed files with 14 additions and 47 deletions

View File

@@ -32,12 +32,12 @@ Execute(ale#lsp#message#Exit() should return correct messages):
AssertEqual [1, 'exit'], ale#lsp#message#Exit(),
Given typescript(A TypeScript file with 3 lines):
foo()
bar()
baz()
Foo()
Bar()
Baz()
Execute(ale#util#GetBufferContents() should return correctly formatted newlines):
AssertEqual "foo()\nbar()\nbaz()\n", ale#util#GetBufferContents(bufnr(''))
AssertEqual "Foo()\nBar()\nBaz()\n", ale#util#GetBufferContents(bufnr(''))
Execute(ale#lsp#message#DidOpen() should return correct messages):
let g:ale_lsp_next_version_id = 12
@@ -50,7 +50,7 @@ Execute(ale#lsp#message#DidOpen() should return correct messages):
\ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ 'languageId': 'typescript',
\ 'version': 12,
\ 'text': "foo()\nbar()\nbaz()\n",
\ 'text': "Foo()\nBar()\nBaz()\n",
\ },
\ }
\ ],
@@ -68,7 +68,7 @@ Execute(ale#lsp#message#DidChange() should return correct messages):
\ 'uri': ale#path#ToFileURI(g:dir . '/foo/bar.ts'),
\ 'version': 34,
\ },
\ 'contentChanges': [{'text': "foo()\nbar()\nbaz()\n"}],
\ 'contentChanges': [{'text': "Foo()\nBar()\nBaz()\n"}],
\ }
\ ],
\ ale#lsp#message#DidChange(bufnr(''))
@@ -281,7 +281,7 @@ Execute(ale#lsp#tsserver_message#Change() should return correct messages):
\ 'offset': 1,
\ 'endLine': 1073741824,
\ 'endOffset': 1,
\ 'insertString': "foo()\nbar()\nbaz()\n",
\ 'insertString': "Foo()\nBar()\nBaz()\n",
\ }
\ ],
\ ale#lsp#tsserver_message#Change(bufnr(''))

View File

@@ -1,10 +1,7 @@
Before:
Save g:ale_lsp_root
Save g:ale_root
Save b:ale_lsp_root
Save b:ale_root
unlet! g:ale_lsp_root
let g:ale_root = {}
call ale#assert#SetUpLinterTest('c', 'clangd')
@@ -38,12 +35,6 @@ Execute(The buffer-specific variable can have funcrefs):
AssertLSPProject 'abc123'
Execute(The buffer-specific variable can be the old ale_lsp_root setting):
let b:ale_lsp_root = '/some/path'
call ale#test#SetFilename('other-file.c')
AssertLSPProject '/some/path'
Execute(The global variable can be a dictionary):
let g:ale_root = {'clangd': '/some/path', 'golangserver': '/other/path'}
call ale#test#SetFilename('other-file.c')
@@ -70,20 +61,6 @@ Execute(The global variable is queried if the buffer-specific has no value):
AssertLSPProject '/some/path'
Execute(The global variable can be the old ale_lsp_root setting):
let g:ale_root = {}
let g:ale_lsp_root = {'clangd': '/some/path', 'golangserver': '/other/path'}
call ale#test#SetFilename('other-file.c')
AssertLSPProject '/some/path'
Execute(A non-empty ale_root setting should replace the old ale_lsp_root):
let g:ale_root = {'clangd': '/some/path', 'golangserver': '/other/path'}
let g:ale_lsp_root = {'clangd': '/xxx', 'golangserver': '/xxx'}
call ale#test#SetFilename('other-file.c')
AssertLSPProject '/some/path'
Execute(No path should be returned by default):
call ale#test#SetFilename(tempname() . '/other-file.c')