Skip to content

Commit

Permalink
style(clients): Fix compile warnings (#4261)
Browse files Browse the repository at this point in the history
* style(clients): Fix compile warnings

* replace tabs with spaces
  • Loading branch information
jcs090218 authored Dec 17, 2023
1 parent 01bd566 commit 24cfc88
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 45 deletions.
4 changes: 2 additions & 2 deletions clients/lsp-bash.el
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
:package-version '(lsp-mode . "6.2"))

(defcustom lsp-bash-explainshell-endpoint nil
"The endpoint to use explainshell.com to answer 'onHover' queries.
"The endpoint to use explainshell.com to answer `onHover' queries.
See instructions at https://marketplace.visualstudio.com/items?itemName=mads-hartmann.bash-ide-vscode"
:type 'string
:risky t
:group 'lsp-bash
:package-version '(lsp-mode . "6.2"))

(defcustom lsp-bash-highlight-parsing-errors nil
"Consider parsing errors in scripts as 'problems'."
"Consider parsing errors in scripts as `problems'."
:type 'boolean
:group 'lsp-bash
:package-version '(lsp-mode . "6.2"))
Expand Down
4 changes: 2 additions & 2 deletions clients/lsp-clangd.el
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ be available here: https://github.com/clangd/clangd/releases/"
"Extract the parts of the LLVM clang-tidy documentation that are relevant.
This function assumes that the current buffer contains the result
of browsing 'clang.llvm.org', as returned by `url-retrieve'.
of browsing `clang.llvm.org', as returned by `url-retrieve'.
More concretely, this function returns the main <div> element
with class 'section', and also removes 'headerlinks'."
with class `section', and also removes `headerlinks'."
(goto-char (point-min))
(lsp-cpp-flycheck-clang-tidy--narrow-to-http-body)
(lsp-cpp-flycheck-clang-tidy--decode-region-as-utf8 (point-min) (point-max))
Expand Down
8 changes: 4 additions & 4 deletions clients/lsp-csharp.el
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,11 @@ PRESENT-BUFFER will make the buffer be presented to the user."
(message "lsp-csharp: No test method(s) found to be ran previously on this workspace")))

(lsp-defun lsp-csharp--handle-os-error (_workspace (&omnisharp:ErrorMessage :file-name :text))
"Handle the 'o#/error' (interop) notification displaying a message."
"Handle the `o#/error' (interop) notification displaying a message."
(lsp-warn "%s: %s" file-name text))

(lsp-defun lsp-csharp--handle-os-testmessage (_workspace (&omnisharp:TestMessageEvent :message))
"Handle the 'o#/testmessage and display test message on test output buffer."
"Handle the `o#/testmessage and display test message on test output buffer."
(lsp-csharp--test-message message))

(lsp-defun lsp-csharp--handle-os-testcompleted (_workspace (&omnisharp:DotNetTestResult
Expand All @@ -298,7 +298,7 @@ PRESENT-BUFFER will make the buffer be presented to the user."
:error-stack-trace
:standard-output
:standard-error))
"Handle the 'o#/testcompleted' message from the server.
"Handle the `o#/testcompleted' message from the server.
Will display the results of the test on the lsp-csharp test output buffer."
(let ((passed (string-equal "passed" outcome)))
Expand Down Expand Up @@ -371,7 +371,7 @@ using the `textDocument/references' request."
(lsp-defun lsp-csharp--cls-metadata-uri-handler (uri)
"Handle `csharp:/(metadata)' uri from csharp-ls server.
'csharp/metadata' request is issued to retrieve metadata from the server.
`csharp/metadata' request is issued to retrieve metadata from the server.
A cache file is created on project root dir that stores this metadata and
filename is returned so lsp-mode can display this file."

Expand Down
46 changes: 23 additions & 23 deletions clients/lsp-go.el
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ The returned type provides a tri-state that either:
- sets element to false (actually, :json-false)
- sets element to true \(actually, t)"
(let ((list '()))
(dolist (v alist)
(push `(cons
:tag ,(cdr v)
(const :format "" ,(car v))
(choice (const :tag "Enable" t) (const :tag "Disable" :json-false)))
list))
(push 'set list)
list))
(dolist (v alist)
(push `(cons
:tag ,(cdr v)
(const :format "" ,(car v))
(choice (const :tag "Enable" t) (const :tag "Disable" :json-false)))
list))
(push 'set list)
list))

(define-obsolete-variable-alias
'lsp-gopls-codelens
Expand All @@ -169,12 +169,12 @@ The returned type provides a tri-state that either:
"lsp-mode 7.0.1")

(defcustom lsp-go-codelenses '((gc_details . :json-false)
(generate . t)
(regenerate_cgo . t)
(tidy . t)
(upgrade_dependency . t)
(test . t)
(vendor . t))
(generate . t)
(regenerate_cgo . t)
(tidy . t)
(upgrade_dependency . t)
(test . t)
(vendor . t))
"Select what codelenses should be enabled or not.
The codelenses can be found at https://github.com/golang/tools/blob/3fa0e8f87c1aae0a9adc2a63af1a1945d16d9359/internal/lsp/source/options.go#L106-L112."
Expand Down Expand Up @@ -231,7 +231,7 @@ $GOPATH/pkg/mod along with the value of
(defcustom lsp-go-link-target "pkg.go.dev"
"Which website to use for displaying Go documentation."
:type '(choice (const "pkg.go.dev")
(string :tag "A custom website"))
(string :tag "A custom website"))
:group 'lsp-go
:package-version '(lsp-mode "7.0.1"))

Expand Down Expand Up @@ -266,7 +266,7 @@ $GOPATH/pkg/mod along with the value of
:package-version '(lsp-mode "8.0.0"))

(defcustom lsp-go-import-shortcut "Both"
"Specifies whether import statements should link to documentation or go to
"Specifies whether import statements should link to documentation or go to
definitions."
:type '(choice (const "Both")
(const "Link")
Expand All @@ -287,13 +287,13 @@ $GOPATH/pkg/mod along with the value of
(defcustom lsp-go-symbol-style "Dynamic"
"Controls how symbols are qualified in symbol responses.
'Dynamic' uses whichever qualifier results in the highest scoring match for
the given symbol query. Here a 'qualifier' is any '/' or '.' delimited suffix
of the fully qualified symbol. i.e. 'to/pkg.Foo.Field' or just 'Foo.Field'.
`Dynamic' uses whichever qualifier results in the highest scoring match for
the given symbol query. Here a `qualifier' is any `/' or '.' delimited suffix
of the fully qualified symbol. i.e. `to/pkg.Foo.Field' or just `Foo.Field'.
'Full' is fully qualified symbols, i.e. 'path/to/pkg.Foo.Field'.
`Full' is fully qualified symbols, i.e. `path/to/pkg.Foo.Field'.
'Package' is package qualified symbols i.e. 'pkg.Foo.Field'."
`Package' is package qualified symbols i.e. `pkg.Foo.Field'."
:type '(choice (const "Dynamic")
(const "Full")
(const "Package"))
Expand Down Expand Up @@ -327,10 +327,10 @@ flake.nix file with:
(use-package nix-sandbox)
(defun my/nix--lsp-go-wrapper (args)
(if-let ((sandbox (nix-current-sandbox)))
(apply 'nix-shell-command sandbox args)
(apply `nix-shell-command sandbox args)
args))
(setq lsp-go-server-path \"gopls\"
lsp-go-server-wrapper-function 'my/nix--lsp-go-wrapper)"
lsp-go-server-wrapper-function `my/nix--lsp-go-wrapper)"
:group 'lsp-go
:type '(choice
(function-item :tag "None" :value identity)
Expand Down
17 changes: 11 additions & 6 deletions clients/lsp-kotlin.el
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ When enabled a debugger for Kotlin will be available."

(defcustom lsp-kotlin-external-sources-use-kls-scheme t
"[Recommended] Specifies whether URIs inside JARs should be represented
using the 'kls'-scheme."
using the `kls'-scheme."
:type 'boolean
:group 'lsp-kotlin
:package-version '(lsp-mode . "6.1"))
Expand Down Expand Up @@ -120,27 +120,32 @@ to Kotlin."

;; cache in this case is the dependency cache. Given as an initialization option.
(defcustom lsp-kotlin-ondisk-cache-path nil
"Path to the ondisk cache if used. If lsp-kotlin-ondisk-cache-enabled is t, but path is nil, then the project root is used as a default."
"Path to the ondisk cache if used. If lsp-kotlin-ondisk-cache-enabled is t,
but path is nil, then the project root is used as a default."
:type 'string
:group 'lsp-kotlin)

(defcustom lsp-kotlin-ondisk-cache-enabled nil
"Specifies whether to enable ondisk cache or not. If nil, in-memory cache will be used."
"Specifies whether to enable ondisk cache or not. If nil, in-memory cache
will be used."
:type 'boolean
:group 'lsp-kotlin)

(defcustom lsp-kotlin-inlayhints-enable-typehints t
"Specifies whether to enable type hints or not. Requires lsp-inlay-hints-mode."
"Specifies whether to enable type hints or not.
Requires lsp-inlay-hints-mode."
:type 'boolean
:group 'lsp-kotlin)

(defcustom lsp-kotlin-inlayhints-enable-parameterhints t
"Specifies whether to enable parameter hints or not. Requires lsp-inlay-hints-mode."
"Specifies whether to enable parameter hints or not.
Requires lsp-inlay-hints-mode."
:type 'boolean
:group 'lsp-kotlin)

(defcustom lsp-kotlin-inlayhints-enable-chainedhints t
"Specifies whether to enable chained hints or not. Requires lsp-inlay-hints-mode."
"Specifies whether to enable chained hints or not.
Requires lsp-inlay-hints-mode."
:type 'boolean
:group 'lsp-kotlin)

Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-lua.el
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ tolerance for this setting. Please adjust it to the appropriate value."
:group 'lsp-lua-language-server)

(defcustom lsp-lua-runtime-file-encoding "utf8"
"File encoding. The 'ansi' option is only available under the 'Windows'
"File encoding. The `ansi' option is only available under the `Windows'
platform."
:type '(choice (:tag "utf8" "ansi"))
:package-version '(lsp-mode . "8.0.0")
Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-pyls.el
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ convention."
(defcustom lsp-pyls-plugins-pydocstyle-match "(?!test_).*\\.py"
"Check only files that exactly match the given regular
expression; default is to match files that don't start with
'test_' but end with '.py'."
`test_' but end with `.py'."
:type 'string
:group 'lsp-pyls
:package-version '(lsp-mode . "6.1"))
Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-pylsp.el
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ convention."
(defcustom lsp-pylsp-plugins-pydocstyle-match "(?!test_).*\\.py"
"Check only files that exactly match the given regular
expression; default is to match files that don't start with
'test_' but end with '.py'."
`test_' but end with `.py'."
:type 'string
:group 'lsp-pylsp)

Expand Down
3 changes: 2 additions & 1 deletion clients/lsp-sml.el
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ send only those, and do not send e.g. statistics diagnostics." "syntax"))
:group 'lsp-sml)

(defcustom lsp-sml-millet-server-diagnostics-moreInfoHint-enable t
"Show a hint on diagnostic messages about clicking the error code number for more information."
"Show a hint on diagnostic messages about clicking the error code number for
more information."
:type 'boolean
:group 'lsp-sml)

Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-svelte.el
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ file paths or globs relative to workspace root."

(defcustom lsp-svelte-plugin-svelte-compiler-warnings nil
"Svelte compiler warning codes to ignore or to treat as errors.
Example: '((css-unused-selector . ignore) (unused-export-let . error))"
Example: `((css-unused-selector . ignore) (unused-export-let . error))"
:type '(alist :key-type (symbol :tag "Warning code")
:value-type (choice
(const :tag "Ignore" ignore)
Expand Down
6 changes: 4 additions & 2 deletions clients/lsp-wgsl.el
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
:package-version '(lsp-mode . "8.0.1"))

(defcustom lsp-wgsl-shaderdefs []
"Defines that should be valid for preprocessor operations like ifdef, e.g, ['USE_TYPES', 'DEBUG']"
"Defines that should be valid for preprocessor operations like ifdef,
e.g, ['USE_TYPES', 'DEBUG']"
:type 'lsp-string-vector
:group 'lsp-wgsl
:package-version '(lsp-mode . "8.0.1"))
Expand Down Expand Up @@ -132,7 +133,8 @@

;; Various interactive functions to use the custom LSP extensions from the server
(defun lsp-wgsl-full-source ()
"Gets the full source of the file with all imports and preprocessor definitions resolved."
"Gets the full source of the file with all imports and preprocessor
definitions resolved."
(interactive)
(lsp-request-async
"wgsl-analyzer/fullSource"
Expand Down
2 changes: 1 addition & 1 deletion clients/lsp-xml.el
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ This only affects the experimental formatter."
(defcustom lsp-xml-validation-schema '((enabled . "always"))
"The XML schema settings.
The value for 'enabled' can be always, never or onValidSchema."
The value for `enabled' can be always, never or onValidSchema."
:type 'alist
:group 'lsp-xml
:package-version '(lsp-mode . "6.1"))
Expand Down

0 comments on commit 24cfc88

Please sign in to comment.