-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Install Geany 2.1
geany-lsp requires Geany 2.1 to even build. Geany 2.1 is not released yet (at the time of writing this). I have prepared a Makefile to build Geany master: https://gist.github.com/hellium6/af20fe5395102530e1dc0ec4a6c99741
$ cd /usr/pkgsrc/devel
$ cp -r geany geany-master
$ cd geany-master
Put contents of the linked file above as the file named Makefile
, then continue.
$ make makesum # update checksum
$ make install # this is expected to fail, just hang on... we need to update PLIST...
$ make print-PLIST > PLIST
$ make install-clean
$ make install
This should install Geany 2.1. Run Geany from application menu, or just run geany
Install geany-lsp
Instructions are more or less taken from geany-lsp readme.
meson setup -Dprefix=/usr/pkg build
cd build
ninja
doas ninja install
(You might need to relaunch Geany to make the plugin appear on list)
- Install the LSP server you want to use. (such as zls)
- Enable the LSP Client plugin under
Tools->Plugin Manager
. - Check the configuration file under
Tools->LSP Client->User Configuration
and make sure the LSP server is configured correctly, following the documentation
of the LSP server you wish to use.
I have this:
[Zig]
cmd=/usr/pkg/bin/zls-master
semantic_tokens_enable=true
#autocomplete_use_snippets=true
#rpc_log=stdout
#rpc_log_full=true
#show_server_stderr=true
use_without_project=true
use_outside_project_dir=true
Make sure to change cmd
if the path to your zls is different.
I added last two lines so that LSP is enabled on any zig file. That would make the next two steps optional.
- (optional) Create a Geany project and set its base path to the root directory of
your sources. - (optional) Enable the LSP plugin for the project under
Project->Properties->LSP Client
.
Test
- Open a file, remove a
;
. It should show a wavy red line below the line ending. - If the file doesn't have
const std = @import("std");
add it. In a new line typestd.d
and it should show options.
Update:
- 2025.03.25: Add relaunch message
Metadata
Metadata
Assignees
Labels
No labels