aboutsummaryrefslogtreecommitdiff
path: root/autoload/lsp_settings.vim
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-17 20:39:29 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-17 20:39:29 +0900
commit147a718922790df0e76e5fdeaac557ca5b645b55 (patch)
tree5d1063f5a8e01f1adda97fa4812371ecb6942a35 /autoload/lsp_settings.vim
parent609bbac849fe18c09fa08c8b26851ac14e0802e9 (diff)
downloadvim-lsp-settings-147a718922790df0e76e5fdeaac557ca5b645b55.tar.gz
vim-lsp-settings-147a718922790df0e76e5fdeaac557ca5b645b55.tar.bz2
vim-lsp-settings-147a718922790df0e76e5fdeaac557ca5b645b55.zip
Add fsharp-language-server
Diffstat (limited to 'autoload/lsp_settings.vim')
-rw-r--r--autoload/lsp_settings.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim
index e710d9a..08a8b3e 100644
--- a/autoload/lsp_settings.vim
+++ b/autoload/lsp_settings.vim
@@ -76,3 +76,18 @@ function! lsp_settings#root_uri(pattern) abort
endif
return lsp#utils#path_to_uri(l:dir)
endfunction
+
+function! lsp_settings#autocd(server_info) abort
+ if !has_key(a:server_info, 'root_uri')
+ return
+ endif
+ if type(a:server_info['root_uri']) ==# v:t_func
+ let l:root_uri = a:server_info['root_uri'](a:server_info)
+ else
+ let l:root_uri = a:server_info['root_uri']
+ endif
+ let l:path = lsp#utils#uri_to_path(l:root_uri)
+ if isdirectory(l:path)
+ exe 'cd' l:path
+ endif
+endfunction