Made a start -
Welcome @freevryheid and thank you for this. I havenāt heard of Kakoune before this so I went to take a look and may even try it.
this is strictly free-form format and I donāt have plans right now to develop kak syntax for pre-f90 or fixed format files.
This seems sensible to me. With f90.kak, will Kakoune render a .f file without any syntax highlighting or will it assume free-form for that as well?
Yep, the top lines in the f90.kak file define the syntax. Detection is done by regex examining the filename extension. Currently the following is used:
hook global BufCreate .*\.(f90|f95|f03|f08) %{
set-option buffer filetype fortran
}
To use .f as free-form, just append ā|fā as in:
hook global BufCreate .*\.(f90|f95|f03|f08|f) %{
set-option buffer filetype fortran
}
Also, I forgot to mention - kak can be extended as a language server client to the fortran-language-server.
Welcome @freevryheid. Awesome, thanks for doing this. Here is the link to the editor, I never heard of it before: https://kakoune.org/
Just what Iāve was looking for! I just restarted my Fortran learning from a few years ago. I came to love kakoune for my main C++ job. Iāll dig through the syntax files.
Have you considered opening a PR to add Fortran support āout of the boxā?
Iāll probably spend the new few hours tackling the integration with fort-ls into kak-lsp. IIRC one issue is the recognition of %
as a trigger for the completion engine.
Hi @MagBad welcome to fortran-lang, I was under the impression that kakoune was already able to integrate with fortls Editor Integration - fortls .
Is that not the case?
Welcome @MagBad
Good to see another kak user. I considered moving over to helix, which supports fortran āout-of-the-boxā but missed kakouneās client/server sessions.
The recent update to python broke my fortls installation. Iām on archlinux and was using the fortls package (yay fortls). I caved and opted for pip install fortls. In archlinux this installs fortls to your ~/.local/bin folder, which kakoune cannot see (even though in the PATH). Trick was to move fortls to the /usr/bin folder.
Thank you!
IMHO the configuration has always been a bit tricky / unstable with kakoune, i.e. the language server might work great sometimes - and no so good in other situations. Since the highlighting etc is also lacking a bit, only thanks to @freevryheid we have some sort of highlighting.
I found his suggestion on switching to helix
insightful! Iāve been itching to test that one. The client/server sessions certainly are amazing, but since Iām using tmux
anyway thatās not that big of a problem. At least at the moment.
But since I now donāt need to tinker with the kakoune LSP configuration, I can continue with the study of the ModernFortran book.