From c7e507f5ba9971e7c7f758d1116ff1be63466303 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 30 Mar 2020 21:21:10 +0100 Subject: [PATCH] chore(editor): Switch back to highlight-symbol package The auto-highlight-symbol package has a nicer interactive editing mode, but it messes with the visual presentation for selected region and other things. So let's go back to the less fancy but more reliable highlight-symbol package. Also let's properly disable both symbol highlighting packages in golang and dart, where lsp-mode provides a better and more intelligent symbol highlighting feature. --- core/siren-core-modules.el | 2 +- modules/languages/siren-dart.el | 7 +++++-- modules/languages/siren-golang.el | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/core/siren-core-modules.el b/core/siren-core-modules.el index be62bed..056ab39 100644 --- a/core/siren-core-modules.el +++ b/core/siren-core-modules.el @@ -25,7 +25,7 @@ ;; Editor (require 'siren-amx) -(require 'siren-auto-highlight-symbol) +(require 'siren-highlight-symbol) (require 'siren-browse-kill-ring) (require 'siren-display-fill-column) (require 'siren-display-indentation) diff --git a/modules/languages/siren-dart.el b/modules/languages/siren-dart.el index 486e05e..590e847 100644 --- a/modules/languages/siren-dart.el +++ b/modules/languages/siren-dart.el @@ -8,7 +8,6 @@ (require 'siren-company) (require 'siren-folding) -(require 'siren-highlight-symbol) (require 'siren-lsp) (require 'siren-projectile) @@ -25,8 +24,12 @@ :init (defun siren-dart-mode-setup () + (when (fboundp 'highlight-symbol-mode) + (highlight-symbol-mode -1)) + (when (fboundp 'auto-highlight-symbol-mode) + (auto-highlight-symbol-mode -1)) + (company-mode +1) - (highlight-symbol-mode -1) (lsp) (siren-folding) (subword-mode +1)) diff --git a/modules/languages/siren-golang.el b/modules/languages/siren-golang.el index a9338a1..9988853 100644 --- a/modules/languages/siren-golang.el +++ b/modules/languages/siren-golang.el @@ -9,7 +9,6 @@ (require 'siren-company) (require 'siren-flycheck) (require 'siren-folding) -(require 'siren-highlight-symbol) (require 'siren-lsp) (require 'siren-projectile) @@ -37,7 +36,11 @@ (add-hook 'before-save-hook #'lsp-format-buffer t t) (add-hook 'before-save-hook #'lsp-organize-imports t t) - (highlight-symbol-mode -1) + (when (fboundp 'highlight-symbol-mode) + (highlight-symbol-mode -1)) + (when (fboundp 'auto-highlight-symbol-mode) + (auto-highlight-symbol-mode -1)) + (company-mode +1) (lsp-deferred) (siren-folding)