function s:initialize() call lspoints#load_extensions([ \ 'config', \ 'format', \ 'lsputil', \ 'nvim_diagnostics', \ ]) " \ 'semantic_tokens', endfunction call s:initialize() function s:on_attach() " L let b:ddu_source_lsp_clientName = 'lspoints' nnoremap K echo lspoints#request('denols', 'textDocument/hover', denops#request('lspoints', 'executeCommand', ['lsputil', 'makePositionParams'])) nnoremap gd DduSelectorCall lsp_definition nnoremap ma DduSelectorCall lsp_codeAction nnoremap md DduSelectorCall lsp_diagnostic nnoremap mf call denops#request('lspoints', 'executeCommand', ['format', 'execute', bufnr()]) endfunction autocmd vimrc User LspointsAttach:* call s:on_attach() function s:attach_denols() abort let name = bufname() if name =~# ':/' && name !~# '^\v(file|deno)' return endif let deno_json = findfile('deno.json', '.;') if empty(deno_json) let deno_json = findfile('deno.jsonc', '.;') endif if empty(deno_json) call lspoints#attach('denols') else let options = #{rootPath: deno_json->fnamemodify(':p:h')} call lspoints#attach('denols', options) endif endfunction function s:attach() abort let ft = &filetype if ft ==# 'typescript' || ft ==# 'typescriptreact' call s:attach_denols() endif endfunction "autocmd vimrc FileType typescript,typescriptreact call s:attach_denols() command! LspointsStart call s:attach()