Skip to content

Commit 3ccb52d

Browse files
authored
feat: Adding tilt lsp client (#3968)
* feat: Adding tilt lsp client * fix: Make lsp-tilt available directly via lsp-mode
1 parent cf22920 commit 3ccb52d

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed

clients/lsp-tilt.el

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
;;; lsp-tilt.el --- tilt LSP -*- lexical-binding: t; -*-
2+
3+
;; Copyright (C) 2023 konubinix
4+
5+
;; Author: konubinix <konubinixweb@gmail.com>
6+
;; Keywords: tools
7+
8+
;; This program is free software; you can redistribute it and/or modify
9+
;; it under the terms of the GNU General Public License as published by
10+
;; the Free Software Foundation, either version 3 of the License, or
11+
;; (at your option) any later version.
12+
13+
;; This program is distributed in the hope that it will be useful,
14+
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
;; GNU General Public License for more details.
17+
18+
;; You should have received a copy of the GNU General Public License
19+
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
21+
;;; Commentary:
22+
23+
;; Using tilt mode from https://github.com/Konubinix/tilt-mode
24+
25+
;;; Code:
26+
27+
(require 'lsp-mode)
28+
29+
(lsp-register-client
30+
(make-lsp-client :new-connection (lsp-stdio-connection '("tilt" "lsp" "start"))
31+
:activation-fn (lsp-activate-on "tiltfile")
32+
:server-id 'tiltfile))
33+
34+
(provide 'lsp-tilt)
35+
;;; lsp-tilt.el ends here

docs/lsp-clients.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,15 @@
825825
"installation-url": "https://github.com/hashicorp/terraform-ls",
826826
"debugger": "Not available"
827827
},
828+
{
829+
"name": "tilt",
830+
"full-name": "Tilt LSP",
831+
"server-name": "tilt",
832+
"installation": "To be used with tilt-mode available in https://github.com/Konubinix/tilt-mode",
833+
"server-url": "https://docs.tilt.dev/cli/tilt_lsp.html",
834+
"installation-url": "https://docs.tilt.dev/",
835+
"debugger": "Not available"
836+
},
828837
{
829838
"name": "latex",
830839
"full-name": "TeX, LaTeX, etc.",

lsp-mode.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ As defined by the Language Server Protocol 3.16."
183183
lsp-pyright lsp-python-ms lsp-purescript lsp-r lsp-racket lsp-remark lsp-ruff-lsp lsp-rf lsp-rust lsp-solargraph
184184
lsp-sorbet lsp-sourcekit lsp-sonarlint lsp-tailwindcss lsp-tex lsp-terraform lsp-toml
185185
lsp-ttcn3 lsp-typeprof lsp-v lsp-vala lsp-verilog lsp-vetur lsp-volar lsp-vhdl lsp-vimscript
186-
lsp-xml lsp-yaml lsp-ruby-lsp lsp-ruby-syntax-tree lsp-sqls lsp-svelte lsp-steep lsp-zig)
186+
lsp-xml lsp-yaml lsp-ruby-lsp lsp-ruby-syntax-tree lsp-sqls lsp-svelte lsp-steep lsp-tilt lsp-zig)
187187
"List of the clients to be automatically required."
188188
:group 'lsp-mode
189189
:type '(repeat symbol))
@@ -890,7 +890,8 @@ Changes take effect only when a new session is started."
890890
(idris-mode . "idris")
891891
(idris2-mode . "idris2")
892892
(gleam-mode . "gleam")
893-
(graphviz-dot-mode . "dot"))
893+
(graphviz-dot-mode . "dot")
894+
(tiltfile-mode . "tiltfile"))
894895
"Language id configuration.")
895896

896897
(defvar lsp--last-active-workspaces nil

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ nav:
141141
- TeX, LaTeX, etc (digestif): page/lsp-tex.md
142142
- TeX, LaTeX, etc (texlab): page/lsp-texlab.md
143143
- TeX, LaTeX, etc (texlab, external): page/lsp-latex.md
144+
- Tilt: page/lsp-tilt.md
144145
- TOML: page/lsp-toml.md
145146
- TTCN3: page/lsp-ttcn3.md
146147
- V: page/lsp-v.md

0 commit comments

Comments
 (0)