Skip to content

Commit

Permalink
More copy/pasteable README
Browse files Browse the repository at this point in the history
- Add ':' before all of the vim commands
- Put in a real server command in the diagnostic examples, otherwise it
  might not work when it tries to start the server after switching tabs
  etc
  • Loading branch information
natebosch committed Dec 9, 2016
1 parent ae6f753 commit 5167e26
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ a demo_server which fills this purpose.
../dart-language-server/bin/demo_server.dart')`
- Anything which makes a buffer with this file type become visible will launch
the server. `edit`, `split`, etc
- `call CallMethod(&filetype, 'random_ints', {'count': 10})`
- `:call CallMethod(&filetype, 'random_ints', {'count': 10})`
- In another terminal, `cat /tmp/wirelog.txt`. You should also see a message in
vim with the response
- `call CallMethod(&filetype, 'start_notifications', '')`
- `:call CallMethod(&filetype, 'start_notifications', '')`
- You should see a notification message every 3 seconds
- `call CallMethod(&filetype, 'stop_notifications', '')`
- `call KillServers(&filetype)`
- `:call CallMethod(&filetype, 'stop_notifications', '')`
- `:call KillServers(&filetype)`
- You should see more output in `/tmp/wirelog.txt` and the process should exit

## Testing diagnostic highlighting
Expand All @@ -37,7 +37,8 @@ displaying that file.
- Open `plugin/lsc.vim`
- `:source %`
- Register the `&filetype` as above. Only registered filetypes get highlighting.
- `:call RegisterLanguageServer(&filetype, 'arbitrary string')`
- `:call RegisterLanguageServer(&filetype, 'dart
../dart-language-server/bin/demo_server.dart')`
- `:call SetFileDiagnostics(expand('%:p'), [{'severity': 1, 'range': [4, 1, 3]},
{'severity': 2, 'range': [20, 1, 4]}])`
- Change buffers/windows/tabs. Every time the file is visible it will have
Expand Down

0 comments on commit 5167e26

Please sign in to comment.