Skip to content

Commit 9222365

Browse files
authored
Add basic support for futhark mode (#4556)
* Add basic support for futhark mode * Remove duplicate adding to lsp-language-id-configuration * Add futhark addition to changelog * Add futhark to list of client-packages * Add futhark to docs list * Add documentation group for futhark * Add server installation docs for futhark * N/A → Not available
1 parent 710f2a2 commit 9222365

File tree

5 files changed

+55
-2
lines changed

5 files changed

+55
-2
lines changed

CHANGELOG.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* Add ~lsp-flush-delayed-changes-before-next-message~ customization point to enforce throttling document change notifications.
1212
* Fix bug in ~rust-analyzer.check.features~ configuration via ~lsp-rust-checkonsave-features~ Emacs setting: we were defaulting to ~[]~, but ~rust-analyzer~ defaults to inheriting the value from ~rust-analyzer.cargo.features~. The bug resulted in code hidden behind features not getting type checked when those features were enabled by setting ~rust-analyzer.cargo.features~ via the ~lsp-rust-features~ Emacs setting.
1313
* Change ~ruff-lsp~ to ~ruff~ for python lsp client. All ~ruff-lsp~ customizable variable change to ~ruff~. Lsp server command now is ~["ruff" "server"]~ instead of ~["ruff-lsp"]~.
14+
* Add futhark support
1415

1516
** 9.0.0
1617
* Add language server config for QML (Qt Modeling Language) using qmlls.

clients/lsp-futhark.el

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
;;; lsp-futhark.el --- lsp-mode futhark integration -*- lexical-binding: t; -*-
2+
3+
;; Copyright (C) 2024 lsp-mode maintainers
4+
5+
;; Keywords: languages
6+
7+
;; This program is free software; you can redistribute it and/or modify
8+
;; it under the terms of the GNU General Public License as published by
9+
;; the Free Software Foundation, either version 3 of the License, or
10+
;; (at your option) any later version.
11+
12+
;; This program is distributed in the hope that it will be useful,
13+
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
;; GNU General Public License for more details.
16+
17+
;; You should have received a copy of the GNU General Public License
18+
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
20+
;;; Commentary:
21+
22+
;; Client for the futhark language server.
23+
24+
;;; Code:
25+
26+
(require 'lsp-mode)
27+
28+
(defgroup lsp-futhark nil
29+
"LSP support for Futhark, using futhark lsp"
30+
:group 'lsp-mode
31+
:link '(url-link "https://github.com/diku-dk/futhark/tree/master/src/Futhark/LSP")
32+
:package-version `(lsp-mode . "9.0.1"))
33+
34+
(lsp-register-client
35+
(make-lsp-client :new-connection (lsp-stdio-connection '("futhark" "lsp"))
36+
:activation-fn (lsp-activate-on "futhark")
37+
:server-id 'futhark))
38+
39+
(lsp-consistency-check lsp-futhark)
40+
41+
(provide 'lsp-futhark)
42+
;;; lsp-futhark.el ends here

docs/lsp-clients.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@
334334
"installation": "pip install fortls",
335335
"debugger": "Yes"
336336
},
337+
{
338+
"name": "futhark",
339+
"full-name": "Futhark",
340+
"server-name": "futhark-lsp",
341+
"server-url": "https://github.com/diku-dk/futhark"
342+
"installation": "A part of the compiler since 0.21.9",
343+
"debugger": "Not available"
344+
},
337345
{
338346
"name": "gdscript",
339347
"full-name": "GDScript",

lsp-mode.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ As defined by the Language Server Protocol 3.16."
177177
lsp-autotools lsp-awk lsp-bash lsp-beancount lsp-bufls lsp-clangd
178178
lsp-clojure lsp-cmake lsp-cobol lsp-credo lsp-crystal lsp-csharp lsp-css
179179
lsp-cucumber lsp-cypher lsp-d lsp-dart lsp-dhall lsp-docker lsp-dockerfile
180-
lsp-earthly lsp-elixir lsp-elm lsp-emmet lsp-erlang lsp-eslint lsp-fortran lsp-fsharp
181-
lsp-gdscript lsp-gleam lsp-glsl lsp-go lsp-golangci-lint lsp-grammarly
180+
lsp-earthly lsp-elixir lsp-elm lsp-emmet lsp-erlang lsp-eslint lsp-fortran lsp-futhark
181+
lsp-fsharp lsp-gdscript lsp-gleam lsp-glsl lsp-go lsp-golangci-lint lsp-grammarly
182182
lsp-graphql lsp-groovy lsp-hack lsp-haskell lsp-haxe lsp-idris lsp-java
183183
lsp-javascript lsp-jq lsp-json lsp-kotlin lsp-latex lsp-lisp lsp-ltex
184184
lsp-lua lsp-magik lsp-markdown lsp-marksman lsp-mdx lsp-meson lsp-metals lsp-mint
@@ -893,6 +893,7 @@ Changes take effect only when a new session is started."
893893
(reason-mode . "reason")
894894
(caml-mode . "ocaml")
895895
(tuareg-mode . "ocaml")
896+
(futhark-mode . "futhark")
896897
(swift-mode . "swift")
897898
(elixir-mode . "elixir")
898899
(elixir-ts-mode . "elixir")

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ nav:
8080
- ESLint: page/lsp-eslint.md
8181
- F#: page/lsp-fsharp.md
8282
- Fortran: page/lsp-fortran.md
83+
- Futhark: page/lsp-futhark.md
8384
- GDScript: page/lsp-gdscript.md
8485
- Gleam: page/lsp-gleam.md
8586
- GLSL: page/lsp-glsl.md

0 commit comments

Comments
 (0)