From d2f5a63ff5db6e1a8f9124d4cc8149c97129dd9a Mon Sep 17 00:00:00 2001 From: David Briscoe Date: Wed, 22 Jan 2020 23:33:46 -0800 Subject: Support svn, hg, bzr as root markers Move common root marker list to plugin/lsp_settings.vim. Update all uses to merge the two lists. Test: :edit lsp-settings/data/catalog.json :Verbose ec lsp_settings#root_uri(extend(['catalog.json'], g:lsp_settings_root_markers)) file:///C:/david/settings/daveconfig/multi/vim/bundle/lsp-settings/data :Verbose ec lsp_settings#root_uri(g:lsp_settings_root_markers) file:///C:/david/settings/daveconfig :Verbose ec lsp_settings#root_uri(extend(['rebar.config'], g:lsp_settings_root_markers)) file:///C:/david/settings/daveconfig Install rls and edit a rust file. --- plugin/lsp_settings.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugin/lsp_settings.vim') diff --git a/plugin/lsp_settings.vim b/plugin/lsp_settings.vim index 344d95e..0d0ef97 100644 --- a/plugin/lsp_settings.vim +++ b/plugin/lsp_settings.vim @@ -3,6 +3,13 @@ if exists('g:loaded_lsp_settings') || !exists('*json_encode') || !has('lambda') endif let g:loaded_lsp_settings= 1 +let g:lsp_settings_root_markers = get(g:, 'lsp_settings_root_markers', [ + \ '.git/', + \ '.svn/', + \ '.hg/', + \ '.bzr/' + \ ]) + let s:settings_dir = expand(':h:h').'/settings' let s:checkers_dir = expand(':h:h').'/checkers' let s:installer_dir = expand(':h:h').'/installer' -- cgit v1.2.3-54-g00ecf