aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2019-12-25 23:40:23 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2019-12-25 23:40:23 +0900
commitdd6f34e7089a8a06fbd239b8f3dba46b0074010a (patch)
treeda108eb0fb31e84fd6e93d25b9fca93a1ed196d2 /autoload
parent0bc757a306ec6a34c495341fe2d63c867aaa9831 (diff)
downloadvim-lsp-settings-dd6f34e7089a8a06fbd239b8f3dba46b0074010a.tar.gz
vim-lsp-settings-dd6f34e7089a8a06fbd239b8f3dba46b0074010a.tar.bz2
vim-lsp-settings-dd6f34e7089a8a06fbd239b8f3dba46b0074010a.zip
Fix settings
Diffstat (limited to 'autoload')
-rw-r--r--autoload/lsp_settings.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim
index d681b01..1685bce 100644
--- a/autoload/lsp_settings.vim
+++ b/autoload/lsp_settings.vim
@@ -68,3 +68,11 @@ function! lsp_settings#exec_path(cmd) abort
endif
return ''
endfunction
+
+function! lsp_settings#root_uri(pattern) abort
+ let l:dir = lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), a:pattern)
+ if empty(l:dir)
+ return lsp#utils#get_default_root_uri()
+ endif
+ return lsp#utils#path_to_uri(l:dir)
+endfunction