Skip to content

Commit

Permalink
feat: provide a custom variable for typeCheckingMode
Browse files Browse the repository at this point in the history
  • Loading branch information
kassick committed Oct 11, 2024
1 parent bf27f19 commit 0cd0ed7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lsp-pyright.el
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ If this option is set to \"openFilesOnly\", pyright analyzes only open files."
(const "workspace"))
:group 'lsp-pyright)

(defcustom lsp-pyright-type-checking-mode "standard"
"Specifies the default rule set to use.
\"off\" disables all type-checking rules, but Python syntax and semantic
errors are still reported. \"all\" reports all errors in basedpyright,
but is not supported by pyright. "
:type '(choice
(const :tag "Off" "off")
(const :tag "Basic" "basic")
(const :tag "Standard" "standard")
(const :tag "Strict" "strict")
(const :tag "All (basedpyright only)" "all"))
:group 'lsp-pyright)

(defcustom lsp-pyright-log-level "info"
"Determines the default log level used by pyright.
This can be overridden in the configuration file."
Expand Down Expand Up @@ -213,6 +227,8 @@ Current LSP WORKSPACE should be passed in."
`((,(concat lsp-pyright-langserver-command ".disableLanguageServices") lsp-pyright-disable-language-services t)
(,(concat lsp-pyright-langserver-command ".disableOrganizeImports") lsp-pyright-disable-organize-imports t)
(,(concat lsp-pyright-langserver-command ".disableTaggedHints") lsp-pyright-disable-tagged-hints t)
(,(concat lsp-pyright-langserver-command ".typeCheckingMode") lsp-pyright-type-checking-mode)
("python.analysis.typeCheckingMode" lsp-pyright-type-checking-mode)
("python.analysis.autoImportCompletions" lsp-pyright-auto-import-completions t)
("python.analysis.diagnosticMode" lsp-pyright-diagnostic-mode)
("python.analysis.logLevel" lsp-pyright-log-level)
Expand Down

0 comments on commit 0cd0ed7

Please sign in to comment.