Skip to content

Commit c7a3fcb

Browse files
committed
style: fix common errors
1 parent 56e7e9b commit c7a3fcb

File tree

10 files changed

+80
-101
lines changed

10 files changed

+80
-101
lines changed

clients/lsp-kotlin.el

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ executable with `exec-path'."
5252
"Traces the communication between VSCode and the Kotlin language server."
5353
:type '(choice (const "off")
5454
(const "messages")
55-
(const "verbose")
56-
)
55+
(const "verbose"))
5756
:group 'lsp-kotlin
5857
:package-version '(lsp-mode . "6.1"))
5958

@@ -240,9 +239,9 @@ Requires lsp-inlay-hints-mode."
240239
(progn
241240
(require 'helm-source)
242241
(helm :sources (helm-make-source
243-
message 'helm-source-sync :candidates items
244-
:action '(("Identity" lambda (_)
245-
(setq lsp-kotlin--helm-result (helm-marked-candidates)))))
242+
message 'helm-source-sync :candidates items
243+
:action '(("Identity" lambda (_)
244+
(setq lsp-kotlin--helm-result (helm-marked-candidates)))))
246245
:buffer "*lsp-kotlin select*"
247246
:prompt message)
248247
lsp-kotlin--helm-result)
@@ -279,7 +278,7 @@ Requires lsp-inlay-hints-mode."
279278
(-if-let* ((option-items (-map (lambda (x)
280279
(list (lsp-get x :title)
281280
(lsp-get (lsp-get (lsp-get x :edit)
282-
:changes)
281+
:changes)
283282
(intern (concat ":" (lsp--buffer-uri))))))
284283
member-options))
285284
(selected-members (lsp-kotlin--completing-read-multiple "Select overrides" option-items nil)))

clients/lsp-lua.el

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
:risky t
4242
:type 'file)
4343

44-
(defcustom lsp-clients-emmy-lua-jar-path (f-join lsp-server-install-dir "EmmyLua-LS-all.jar")
44+
(defcustom lsp-clients-emmy-lua-jar-path
45+
(f-join lsp-server-install-dir "EmmyLua-LS-all.jar")
4546
"Emmy Lua language server jar file."
4647
:group 'lsp-emmy-lua
4748
:version "8.0.0"
@@ -147,8 +148,7 @@
147148
:type '(choice
148149
(const "Disable")
149150
(const "Both")
150-
(const "Replace")
151-
)
151+
(const "Replace"))
152152
:package-version '(lsp-mode . "8.0.0")
153153
:group 'lsp-lua-language-server)
154154

@@ -391,13 +391,11 @@ and the language server will provide special support.
391391

392392
(defcustom lsp-lua-runtime-version "Lua 5.4"
393393
"Lua runtime version."
394-
:type '(choice
395-
(const "Lua 5.1")
396-
(const "Lua 5.2")
397-
(const "Lua 5.3")
398-
(const "Lua 5.4")
399-
(const "LuaJIT")
400-
)
394+
:type '(choice (const "Lua 5.1")
395+
(const "Lua 5.2")
396+
(const "Lua 5.3")
397+
(const "Lua 5.4")
398+
(const "LuaJIT"))
401399
:package-version '(lsp-mode . "8.0.0")
402400
:group 'lsp-lua-language-server)
403401

@@ -690,13 +688,13 @@ and `../lib` ,exclude `../lib/temp`.
690688
"Download the latest version of lua-language-server and extract it to
691689
`lsp-lua-roblox-language-server-download-url'."
692690
(lsp-download-install
693-
(lambda (&rest _)
691+
(lambda (&rest _)
694692
(set-file-modes lsp-lua-roblox-language-server-bin #o0700)
695693
(funcall callback))
696-
error-callback
697-
:url lsp-lua-roblox-server-download-url
698-
:store-path lsp-lua-roblox-server-store-path
699-
:decompress :zip))
694+
error-callback
695+
:url lsp-lua-roblox-server-download-url
696+
:store-path lsp-lua-roblox-server-store-path
697+
:decompress :zip))
700698

701699
(lsp-register-client
702700
(make-lsp-client

clients/lsp-markdown.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ For a complete list of plugins, check:
5959
6060
For a complete list of plugins, check:
6161
https://github.com/unifiedjs/unified-language-server/blob/main/CONFIGURATION.md#re-using-settings"
62-
:type '(choice
63-
(const "retext-english")
64-
(const "remark-parse"))
62+
:type '(choice (const "retext-english")
63+
(const "remark-parse"))
6564
:group 'lsp-markdown
6665
:package-version '(lsp-mode . "8.0.0"))
6766

clients/lsp-perlnavigator.el

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ default to ~/.perlcriticrc. (no aliases, .bat files or ~/)."
6565

6666
(defconst lsp-perlnavigator--log-level-type
6767
'(choice (const "error")
68-
(const "warning")
69-
(const "info")
70-
(const "hint")
71-
(const "none")
72-
))
68+
(const "warning")
69+
(const "info")
70+
(const "hint")
71+
(const "none")))
72+
7373
(defcustom lsp-perlnavigator-severity5 "warning"
7474
"Editor Diagnostic severity level for Critic severity 5."
7575
:type lsp-perlnavigator--log-level-type
@@ -114,11 +114,9 @@ default to ~/.perlcriticrc. (no aliases, .bat files or ~/)."
114114

115115
(defcustom lsp-perlnavigator-trace-server "messages"
116116
"Traces the communication between VS Code and the language server."
117-
:type '(choice
118-
(const "off")
119-
(const "messages")
120-
(const "verbose")
121-
)
117+
:type '(choice (const "off")
118+
(const "messages")
119+
(const "verbose"))
122120
:group 'lsp-perlnavigator
123121
:package-version '(lsp-mode . "9.0.0"))
124122

@@ -177,9 +175,9 @@ default to ~/.perlcriticrc. (no aliases, .bat files or ~/)."
177175

178176

179177
(defvar lsp-perlnavigator--autoinstall-binary-path
180-
(let ((exe-name (if (eq system-type 'windows-nt) "perlnavigator.exe" "perlnavigator")))
181-
(f-join lsp-perlnavigator-autoinstall-dir "latest" (concat "perlnavigator" lsp-perlnavigator--os-suffix) exe-name))
182-
"The path to the automatically installed language server executable.")
178+
(let ((exe-name (if (eq system-type 'windows-nt) "perlnavigator.exe" "perlnavigator")))
179+
(f-join lsp-perlnavigator-autoinstall-dir "latest" (concat "perlnavigator" lsp-perlnavigator--os-suffix) exe-name))
180+
"The path to the automatically installed language server executable.")
183181

184182
(lsp-dependency
185183
'perlnavigator

clients/lsp-php.el

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,9 @@ definitions are found in excluded files/folders."
219219
(lsp-defcustom lsp-intelephense-trace-server "off"
220220
"Traces the communication between VSCode and the intelephense
221221
language server."
222-
:type '(choice
223-
(const "off")
224-
(const "messages")
225-
(const "verbose")
226-
)
222+
:type '(choice (const "off")
223+
(const "messages")
224+
(const "verbose"))
227225
:group 'lsp-intelephense
228226
:package-version '(lsp-mode . "6.1")
229227
:lsp-path "intelephense.trace.server")

clients/lsp-purescript.el

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,10 @@ Passed to the IDE server for source locations."
6868
(lsp-defcustom lsp-purescript-formatter "purty"
6969
"Tool to use to for formatting.
7070
Must be installed and on PATH (or npm installed with addNpmPath set)"
71-
:type '(choice
72-
(const "none")
73-
(const "purty")
74-
(const "purs-tidy")
75-
(const "pose")
76-
)
71+
:type '(choice (const "none")
72+
(const "purty")
73+
(const "purs-tidy")
74+
(const "pose"))
7775
:group 'lsp-purescript
7876
:package-version '(lsp-mode . "9.0.0")
7977
:lsp-path "purescript.formatter")

clients/lsp-pwsh.el

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@
4343
Set the generated help style with \='BlockComment\=' or \='LineComment\='.
4444
Disable the feature with \='Disabled\='."
4545
:type
46-
'(choice
47-
(const "Disabled")
48-
(const "BlockComment")
49-
(const "LineComment")
50-
)
46+
'(choice (const "Disabled")
47+
(const "BlockComment")
48+
(const "LineComment"))
5149
:group 'lsp-pwsh
5250
:package-version '(lsp-mode . "6.2"))
5351

@@ -87,12 +85,10 @@ When disabled, the entire folded region is hidden."
8785
Sets in a way that is compatible with PowerShell syntax.
8886
For more information about the brace styles please refer to https://github.com/PoshCode/PowerShellPracticeAndStyle/issues/81."
8987
:type
90-
'(choice
91-
(const "Custom")
92-
(const "Allman")
93-
(const "OTBS")
94-
(const "Stroustrup")
95-
)
88+
'(choice (const "Custom")
89+
(const "Allman")
90+
(const "OTBS")
91+
(const "Stroustrup"))
9692
:group 'lsp-pwsh
9793
:package-version '(lsp-mode . "6.2"))
9894

@@ -117,11 +113,9 @@ For more information about the brace styles please refer to https://github.com/P
117113
(defcustom lsp-pwsh-code-formatting-pipeline-indentation-style "NoIndentation"
118114
"Multi-line pipeline style settings."
119115
:type
120-
'(choice
121-
(const "IncreaseIndentationForFirstPipeline")
122-
(const "IncreaseIndentationAfterEveryPipeline")
123-
(const "NoIndentation")
124-
)
116+
'(choice (const "IncreaseIndentationForFirstPipeline")
117+
(const "IncreaseIndentationAfterEveryPipeline")
118+
(const "NoIndentation"))
125119
:group 'lsp-pwsh
126120
:package-version '(lsp-mode . "6.2"))
127121

@@ -186,13 +180,11 @@ associated conditional expression."
186180
Valid values are \='Diagnostic\=', \='Verbose\=', \='Normal\=',
187181
\='Warning\=', and \='Error\='"
188182
:type
189-
'(choice
190-
(const "Diagnostic")
191-
(const "Verbose")
192-
(const "Normal")
193-
(const "Warning")
194-
(const "Error")
195-
)
183+
'(choice (const "Diagnostic")
184+
(const "Verbose")
185+
(const "Normal")
186+
(const "Warning")
187+
(const "Error"))
196188
:group 'lsp-pwsh
197189
:package-version '(lsp-mode . "6.2"))
198190

clients/lsp-roslyn.el

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,12 @@ Unused on other platforms.")
6060
(defcustom lsp-roslyn-server-log-level "Information"
6161
"Log level for the Roslyn language server."
6262
:type '(choice (const "None")
63-
(const "Trace")
64-
(const "Debug")
65-
(const "Information")
66-
(const "Warning")
67-
(const "Error")
68-
(const "Critical")
69-
)
63+
(const "Trace")
64+
(const "Debug")
65+
(const "Information")
66+
(const "Warning")
67+
(const "Error")
68+
(const "Critical"))
7069
:package-version '(lsp-mode . "8.0.0")
7170
:group 'lsp-roslyn)
7271

@@ -272,13 +271,13 @@ Assumes it was installed with the server install function."
272271
(is-arm64 (string-match-p "aarch64" system-configuration))
273272
(is-x86 (and (string-match-p "x86" system-configuration) (not is-x64))))
274273
(if-let* ((platform-name (cond
275-
((eq system-type 'gnu/linux) "linux")
276-
((eq system-type 'darwin) "osx")
277-
((eq system-type 'windows-nt) "win")))
278-
(arch-name (cond
279-
(is-x64 "x64")
280-
(is-arm64 "arm64")
281-
(is-x86 "x86"))))
274+
((eq system-type 'gnu/linux) "linux")
275+
((eq system-type 'darwin) "osx")
276+
((eq system-type 'windows-nt) "win")))
277+
(arch-name (cond
278+
(is-x64 "x64")
279+
(is-arm64 "arm64")
280+
(is-x86 "x86"))))
282281
(format "%s-%s" platform-name arch-name)
283282
(error "Unsupported platform: %s (%s)" system-type system-configuration))))
284283

clients/lsp-rust.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
(defcustom lsp-rust-server 'rust-analyzer
5858
"Choose LSP server."
5959
:type '(choice (const :tag "rls" rls)
60-
(const :tag "rust-analyzer" rust-analyzer))
60+
(const :tag "rust-analyzer" rust-analyzer))
6161
:group 'lsp-rust
6262
:package-version '(lsp-mode . "6.2"))
6363

clients/lsp-yaml.el

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@
5656
Always: wrap prose if it exceeds the print width.
5757
Never: never wrap the prose.
5858
Preserve: wrap prose as-is."
59-
:type '(choice
60-
(const "always")
61-
(const "never")
62-
(const "preserve"))
59+
:type '(choice (const "always")
60+
(const "never")
61+
(const "preserve"))
6362
:group 'lsp-yaml
6463
:package-version '(lsp-mode . "6.2"))
6564

@@ -111,9 +110,9 @@
111110
:type 'string
112111
:group 'lsp-yaml)
113112

114-
(defcustom lsp-yaml-schema-store-local-db (expand-file-name
115-
(locate-user-emacs-file
116-
(f-join ".cache" "lsp" "lsp-yaml-schemas.json")))
113+
(defcustom lsp-yaml-schema-store-local-db
114+
(expand-file-name
115+
(locate-user-emacs-file (f-join ".cache" "lsp" "lsp-yaml-schemas.json")))
117116
"Cached database of schema store."
118117
:type 'file
119118
:group 'lsp-yaml)
@@ -173,16 +172,15 @@ Limited for performance reasons."
173172
callback error-callback))))
174173

175174
(defconst lsp--yaml-schema-extension-type
176-
'(list
177-
(cons 'name string)
178-
(cons 'description string)
179-
(cons 'url string)
180-
(cons 'fileMatch (repeat string))))
175+
'(list (cons 'name string)
176+
(cons 'description string)
177+
(cons 'url string)
178+
(cons 'fileMatch (repeat string))))
181179

182180
(defcustom lsp-yaml-schema-extensions '(((name . "Kubernetes v1.30.3")
183-
(description . "Kubernetes v1.30.3 manifest schema definition")
184-
(url . "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.30.3-standalone-strict/all.json")
185-
(fileMatch . ["*-k8s.yaml" "*-k8s.yml"])))
181+
(description . "Kubernetes v1.30.3 manifest schema definition")
182+
(url . "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.30.3-standalone-strict/all.json")
183+
(fileMatch . ["*-k8s.yaml" "*-k8s.yml"])))
186184
"User defined schemas that extend default schema store.
187185
Used in `lsp-yaml--get-supported-schemas' to supplement schemas provided by
188186
`lsp-yaml-schema-store-uri'."

0 commit comments

Comments
 (0)