diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-01-30 00:31:25 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-01-30 00:31:25 +0900 |
commit | f14f0f7cb62855844fcdac60911c279813d3cd05 (patch) | |
tree | e36fe56dd26f4c81e51c3906b9c2b3dafb235177 /autoload/lsp_settings/utils.vim | |
parent | f76f655e5733ec766db2d627c6ec01beeade3590 (diff) | |
download | vim-lsp-settings-f14f0f7cb62855844fcdac60911c279813d3cd05.tar.gz vim-lsp-settings-f14f0f7cb62855844fcdac60911c279813d3cd05.tar.bz2 vim-lsp-settings-f14f0f7cb62855844fcdac60911c279813d3cd05.zip |
Testable
Diffstat (limited to 'autoload/lsp_settings/utils.vim')
-rw-r--r-- | autoload/lsp_settings/utils.vim | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/autoload/lsp_settings/utils.vim b/autoload/lsp_settings/utils.vim new file mode 100644 index 0000000..940acb1 --- /dev/null +++ b/autoload/lsp_settings/utils.vim @@ -0,0 +1,27 @@ +function! lsp_settings#utils#msg(msg) abort + redraw + echohl Comment + echo a:msg + echohl None +endfunction + +function! lsp_settings#utils#error(msg) abort + echohl Error + echomsg a:msg + echohl None +endfunction + +function! lsp_settings#utils#valid_name(command) abort + return a:command =~# '^[a-zA-Z0-9_-]\+$' +endfunction + +function! lsp_settings#utils#group_name(ft) abort + return printf('vim_lsp_suggest_%s', a:ft) +endfunction + +function! lsp_settings#utils#first_one(cmd) abort + if empty(a:cmd) + return '' + endif + return fnamemodify(split(a:cmd, "\n")[0], ':p') +endfunction |