diff options
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/lsp.vim | 45 | ||||
-rw-r--r-- | runtime/autoload/provider/pythonx.vim | 4 | ||||
-rw-r--r-- | runtime/autoload/spellfile.vim | 7 |
3 files changed, 54 insertions, 2 deletions
diff --git a/runtime/autoload/lsp.vim b/runtime/autoload/lsp.vim new file mode 100644 index 0000000000..4c8f8b396a --- /dev/null +++ b/runtime/autoload/lsp.vim @@ -0,0 +1,45 @@ +function! lsp#add_filetype_config(config) abort + call luaeval('vim.lsp.add_filetype_config(_A)', a:config) +endfunction + +function! lsp#set_log_level(level) abort + call luaeval('vim.lsp.set_log_level(_A)', a:level) +endfunction + +function! lsp#get_log_path() abort + return luaeval('vim.lsp.get_log_path()') +endfunction + +function! lsp#omnifunc(findstart, base) abort + return luaeval("vim.lsp.omnifunc(_A[1], _A[2])", [a:findstart, a:base]) +endfunction + +function! lsp#text_document_hover() abort + lua vim.lsp.buf_request(nil, 'textDocument/hover', vim.lsp.protocol.make_text_document_position_params()) + return '' +endfunction + +function! lsp#text_document_declaration() abort + lua vim.lsp.buf_request(nil, 'textDocument/declaration', vim.lsp.protocol.make_text_document_position_params()) + return '' +endfunction + +function! lsp#text_document_definition() abort + lua vim.lsp.buf_request(nil, 'textDocument/definition', vim.lsp.protocol.make_text_document_position_params()) + return '' +endfunction + +function! lsp#text_document_signature_help() abort + lua vim.lsp.buf_request(nil, 'textDocument/signatureHelp', vim.lsp.protocol.make_text_document_position_params()) + return '' +endfunction + +function! lsp#text_document_type_definition() abort + lua vim.lsp.buf_request(nil, 'textDocument/typeDefinition', vim.lsp.protocol.make_text_document_position_params()) + return '' +endfunction + +function! lsp#text_document_implementation() abort + lua vim.lsp.buf_request(nil, 'textDocument/implementation', vim.lsp.protocol.make_text_document_position_params()) + return '' +endfunction diff --git a/runtime/autoload/provider/pythonx.vim b/runtime/autoload/provider/pythonx.vim index aec18c0508..23e7ff8f64 100644 --- a/runtime/autoload/provider/pythonx.vim +++ b/runtime/autoload/provider/pythonx.vim @@ -29,8 +29,8 @@ endfunction function! s:get_python_candidates(major_version) abort return { \ 2: ['python2', 'python2.7', 'python2.6', 'python'], - \ 3: ['python3', 'python3.7', 'python3.6', 'python3.5', 'python3.4', 'python3.3', - \ 'python'] + \ 3: ['python3', 'python3.8', 'python3.7', 'python3.6', 'python3.5', + \ 'python3.4', 'python3.3', 'python'] \ }[a:major_version] endfunction diff --git a/runtime/autoload/spellfile.vim b/runtime/autoload/spellfile.vim index c0ef51cdfe..d098902305 100644 --- a/runtime/autoload/spellfile.vim +++ b/runtime/autoload/spellfile.vim @@ -13,6 +13,13 @@ let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset. " This function is used for the spellfile plugin. function! spellfile#LoadFile(lang) + " Check for sandbox/modeline. #11359 + try + :! + catch /\<E12\>/ + throw 'Cannot download spellfile in sandbox/modeline. Try ":set spell" from the cmdline.' + endtry + " If the netrw plugin isn't loaded we silently skip everything. if !exists(":Nread") if &verbose |