Remove C-sharp LSP and obsolete settings

This commit is contained in:
MitchMarq42 2022-08-08 06:37:40 -08:00
parent 0d11700a19
commit 7e11792ce9

View File

@ -506,58 +506,24 @@ targets."
(setq haskell-hoogle-url "https://www.stackage.org/lts/hoogle?q=%s"))
;; c sharp; taken from https://www.reddit.com/r/emacs/comments/k8tnzg/help_setting_up_c_lsp_omnisharproslyn/
(use-package csharp-mode
;; :ensure t
:mode (("\\.cs\\'" . csharp-mode))
:config
(add-to-list 'compilation-error-regexp-alist-alist
'(my-csharp
"^\\(.+\\)(\\([1-9][0-9]+\\),\\([0-9]+\\)): \\(?:\\(warning\\)\\|error\\)?"
1 2 3 (4)))
(add-to-list 'compilation-error-regexp-alist 'my-csharp)
(defun my-csharp-repl ()
"Switch to the CSharpRepl buffer, creating it if necessary."
(interactive)
(if-let ((buf (get-buffer "*CSharpRepl*")))
(pop-to-buffer buf)
(when-let ((b (make-comint "CSharpRepl" "csharp")))
(switch-to-buffer-other-window b))))
(define-key csharp-mode-map (kbd "C-c C-z") 'my-csharp-repl)
;; (define-key csharp-mode-map (kbd "C-c C-c") #'projectile-compile-project)
)
(use-package omnisharp
;; :ensure t
:after csharp-mode
:config
(eval-after-load 'company '(add-to-list 'company-backends 'company-omnisharp))
;; (setq omnisharp-completing-read-function #'ivy-completing-read)
(put 'my-omnisharp-solution-path 'safe-local-variable #'stringp)
:hook (csharp-mode . omnisharp-mode))
;; '(there is nothing here because I'm not using c sharp...)
(use-package lsp-mode
:hook ((powershell-mode . lsp)
(csharp-mode . lsp)
(lsp-mode . lsp-enable-which-key-integration)
(lsp-completion-mode . my/lsp-mode-setup-completion))
(lsp-mode . lsp-ui-mode))
:commands lsp
:init
(defun my/lsp-mode-setup-completion ()
(setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))
'(flex))) ;; Configure flex
:custom
(lsp-completion-provider :none))
(use-package yasnippet
:after lsp)
;; optionally
(use-package lsp-ui
:after lsp
:commands lsp-ui-mode)
;; optionally if you want to use debugger
;; (use-package dap-mode)
;; (use-package dap-powershell)
;; (use-package dap-LANGUAGE) to load the dap adapter for your language
;; broken snippets I don't care about...
(use-package yasnippet
:hook (prog-mode . yas-minor-mode))
;; Better help-pages. Genuinely pretty great.
(use-package helpful