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