Skip to content
This repository has been archived by the owner on Mar 25, 2020. It is now read-only.

Commit

Permalink
Try adding some window specific commands
Browse files Browse the repository at this point in the history
  • Loading branch information
tjdevries committed Jan 18, 2017
1 parent 248b081 commit 0db17a8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autoload/langserver/api/window.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
function! langserver#api#window#showMessage()
endfunction
30 changes: 30 additions & 0 deletions autoload/langserver/window.vim
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0db17a8

Please sign in to comment.