diff options
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | lsp-write.c | 5 | ||||
-rw-r--r-- | main.c | 2 |
3 files changed, 15 insertions, 3 deletions
@@ -145,7 +145,7 @@ to include the absolute path if not). [clangd](https://clangd.llvm.org/installation) is enabled by default. On Debian/Ubuntu you can install it with: -``` +```bash sudo apt install clangd-15 # replace 15 with the highest number you can get sudo ln -s /usr/bin/clangd-15 /usr/bin/clangd ``` @@ -180,6 +180,13 @@ You can download it [here](https://github.com/python-lsp/python-lsp-server). `rust-analyzer` is enabled by default. You can download it by following [the instructions here](https://rust-analyzer.github.io/manual.html#rust-analyzer-language-server-binary). +On Linux you can install it with: + +```bash +mkdir -p ~/.local/bin +curl -L https://github.com/rust-lang/rust-analyzer/releases/latest/download/rust-analyzer-x86_64-unknown-linux-gnu.gz | gunzip -c - > ~/.local/bin/rust-analyzer +chmod +x ~/.local/bin/rust-analyzer +``` ## Tags (lightweight LSP alternative) @@ -204,7 +211,7 @@ To install `ted` from source on Linux, you will also need: These can be installed on Ubuntu/Debian with: -``` +```bash sudo apt install clang libsdl2-dev cmake ``` diff --git a/lsp-write.c b/lsp-write.c index 7d8a0f1..9d7c2b1 100644 --- a/lsp-write.c +++ b/lsp-write.c @@ -432,6 +432,11 @@ static void write_request(LSP *lsp, LSPRequest *request) { write_arr_elem_string(o, "plaintext"); write_arr_end(o); write_obj_end(o); + + // definition capabilities + write_key_obj_start(o, "definition"); + // NOTE: LocationLink support doesn't seem useful to us right now. + write_obj_end(o); write_obj_end(o); write_key_obj_start(o, "workspace"); write_key_bool(o, "workspaceFolders", true); @@ -1,6 +1,6 @@ /* @TODO: -- check definition capabilities +- LSPResponse is_error member (and make sure ide-*.c handles it) - some way of showing that we're currently loading the definition location (different cursor color?) - more LSP stuff: - go to definition using LSP |