diff --git a/clients/lsp-pwsh.el b/clients/lsp-pwsh.el index b99b9f8a6b..f6dda10f50 100644 --- a/clients/lsp-pwsh.el +++ b/clients/lsp-pwsh.el @@ -293,14 +293,12 @@ Must not nil.") rule-id)) (lsp-warn "Cannot show documentation for code action, no ruleName was supplied"))) -(defvar lsp-pwsh--major-modes '(powershell-mode)) - (lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection #'lsp-pwsh--command (lambda () (f-exists? lsp-pwsh-pses-script))) - :major-modes lsp-pwsh--major-modes + :activation-fn (lsp-activate-on "powershell") :server-id 'pwsh-ls :priority -1 :initialization-options #'lsp-pwsh--extra-init-params diff --git a/lsp-mode.el b/lsp-mode.el index 5f0fb7117e..eccc2e0dd6 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -764,26 +764,27 @@ Changes take effect only when a new session is started." ("\\.astro$" . "astro") ("\\.cs\\'" . "csharp") ("\\.css$" . "css") + ("\\.cypher$" . "cypher") ("\\.ebuild$" . "shellscript") ("\\.go\\'" . "go") ("\\.html$" . "html") ("\\.hx$" . "haxe") ("\\.hy$" . "hy") ("\\.java\\'" . "java") + ("\\.jq$" . "jq") ("\\.js$" . "javascript") ("\\.json$" . "json") - ("\\.jsonnet$" . "jsonnet") ("\\.jsonc$" . "jsonc") + ("\\.jsonnet$" . "jsonnet") ("\\.jsx$" . "javascriptreact") - ("\\.jq$" . "jq") ("\\.lua$" . "lua") ("\\.mdx\\'" . "mdx") ("\\.nu$" . "nushell") ("\\.php$" . "php") + ("\\.ps[dm]?1\\'" . "powershell") ("\\.rs\\'" . "rust") ("\\.spec\\'" . "rpm-spec") ("\\.sql$" . "sql") - ("\\.cypher$" . "cypher") ("\\.svelte$" . "svelte") ("\\.toml\\'" . "toml") ("\\.ts$" . "typescript") @@ -866,6 +867,7 @@ Changes take effect only when a new session is started." (php-ts-mode . "php") (powershell-mode . "powershell") (powershell-mode . "PowerShell") + (powershell-ts-mode . "powershell") (json-mode . "json") (json-ts-mode . "json") (jsonc-mode . "jsonc") @@ -6021,6 +6023,7 @@ Request codeAction/resolve for more info if server supports." (php-mode . c-basic-offset) ; PHP (php-ts-mode . php-ts-mode-indent-offset) ; PHP (powershell-mode . powershell-indent) ; PowerShell + (powershell-ts-mode . powershell-ts-mode-indent-offset) ; PowerShell (raku-mode . raku-indent-offset) ; Perl6/Raku (ruby-mode . ruby-indent-level) ; Ruby (rust-mode . rust-indent-offset) ; Rust