Skip to content

Commit b8fa0a4

Browse files
committed
Add Typescript module
1 parent ef32b6f commit b8fa0a4

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
;;; lsp-sonarlint-typescript.el --- lsp-sonarlint typescript module -*- lexical-binding: t; -*-
2+
3+
;; Copyright (C) 2021 Gueorgui Tcherednitchenko
4+
;; Author: Gueorgui Tcherednitchenko <[email protected]>
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+
;; Specific configuration for the sonarlint typescript plugin.
22+
23+
;; This is NOT and official Sonarlint extension.
24+
25+
26+
;;; Code:
27+
28+
(defgroup lsp-sonarlint-typescript nil
29+
"lsp-sonarlint typescript analyzer group"
30+
:group 'lsp-sonarlint
31+
:version '(lsp-sonarlint-typescript . "8.2.0"))
32+
33+
(defcustom lsp-sonarlint-typescript-enabled nil
34+
"Enable lsp-sonarlint-typescript plugin."
35+
:group 'lsp-sonarlint-typescript
36+
:type 'boolean)
37+
38+
(defcustom lsp-sonarlint-typescript-download-url
39+
"https://binaries.sonarsource.com/Distribution/sonar-javascript-plugin/sonar-javascript-plugin-8.2.0.16042.jar"
40+
"Typescript plugin download URL."
41+
:group 'lsp-sonarlint-typescript
42+
:type 'string)
43+
44+
(defcustom lsp-sonarlint-typescript-analyzer-path
45+
(concat
46+
(file-name-directory load-file-name)
47+
"sonar-typescript.jar")
48+
"Lsp-sonarlint typescript analyzer location."
49+
:group 'lsp-sonarlint-typescript
50+
:type 'file)
51+
52+
(defvar lsp-sonarlint-typescript-doc-url "https://www.sonarsource.com/ts/"
53+
"Documentation sonarsource URL.")
54+
55+
(defvar lsp-sonarlint-typescript-repository-url "https://github.com/SonarSource/SonarJS"
56+
"Official sonarlint code extension reposiroty.")
57+
58+
(provide 'lsp-sonarlint-typescript)
59+
;;; lsp-sonarlint-typescript.el ends here

lsp-sonarlint.el

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,19 @@
5252
:group 'lsp-sonarlint
5353
:type 'file)
5454

55-
(defcustom lsp-sonarlint-modes-enabled '(php-mode html-mode web-mode js-mode js2-mode python-mode java-mode ruby-mode scala-mode xml-mode nxml-mode)
55+
(defcustom lsp-sonarlint-modes-enabled '(php-mode
56+
html-mode
57+
web-mode
58+
js-mode
59+
js2-mode
60+
rjsx-mode
61+
typescript-mode
62+
typescript-tsx-mode
63+
python-mode java-mode
64+
ruby-mode
65+
scala-mode
66+
xml-mode
67+
nxml-mode)
5668
"List of enabled major modes."
5769
:group 'lsp-sonarlint
5870
:type 'file)

0 commit comments

Comments
 (0)