Browse Source

Language client: corrected diagnostic underline for some cases, and updated language server setup docs for rust

merge-requests/398/head
eidheim 7 years ago
parent
commit
edb4369bf0
  1. 2
      docs/language_servers.md
  2. 5
      src/source_language_protocol.cc

2
docs/language_servers.md

@ -45,7 +45,7 @@ ln -s `which pyls` /usr/local/bin/python-language-server
Install language server, and create symbolic link to enable server in juCi++:
```sh
rustup update
rustup component add rls-preview rust-analysis rust-src
rustup component add rls rust-analysis rust-src
ln -s `rustc --print sysroot`/bin/rls /usr/local/bin/rust-language-server
```

5
src/source_language_protocol.cc

@ -949,10 +949,11 @@ void Source::LanguageProtocolView::update_diagnostics(std::vector<LanguageProtoc
auto end = get_iter_at_line_pos(diagnostic.range.end.line, diagnostic.range.end.character);
if(start == end) {
if(!end.is_end())
if(!end.ends_line())
end.forward_char();
else
start.backward_char();
while(start.ends_line() && start.backward_char()) { // Move start so that diagnostic underline is visible
}
}
bool error = false;

Loading…
Cancel
Save