From 0db17a8ff9337abe257ee5be66bc110dd81efb81 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Tue, 17 Jan 2017 22:59:29 -0600 Subject: [PATCH] Try adding some window specific commands --- autoload/langserver/api/window.vim | 2 ++ autoload/langserver/window.vim | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 autoload/langserver/api/window.vim create mode 100644 autoload/langserver/window.vim diff --git a/autoload/langserver/api/window.vim b/autoload/langserver/api/window.vim new file mode 100644 index 0000000..d094a8d --- /dev/null +++ b/autoload/langserver/api/window.vim @@ -0,0 +1,2 @@ +function! langserver#api#window#showMessage() +endfunction diff --git a/autoload/langserver/window.vim b/autoload/langserver/window.vim new file mode 100644 index 0000000..134f3e0 --- /dev/null +++ b/autoload/langserver/window.vim @@ -0,0 +1,30 @@ +let s:message_type = { + \ 'name': { + \ 'error': 1, + \ 'warning': 2, + \ 'info': 3, + \ 'log': 4, + \ }, + \ 'number': { + \ 1: 'error', + \ 2: 'warning', + \ 3: 'info', + \ 4: 'log', + \ }, + \ } + +function! langserver#window#handle#showMessage(message) abort + let l:type = a:message['type'] + let l:message = a:message['message'] + + echo l:type | echo l:message +endfunction + +function! langserver#window#handle#logMessage(message) abort + let l:type = a:message['type'] + let l:message = a:message['message'] + + " Not sure if this will work exactly. + " Might have to do another mapping here. + call langserver#log#log(l:type, l:message) +endfunction