Compare commits

..

2 Commits

Author SHA1 Message Date
kj
93bee419e8 Add treemacs. 2022-06-09 03:53:59 -04:00
kj
b59e654bbd Improve lsp (it freezes a lot). 2022-06-09 03:53:28 -04:00
3 changed files with 96 additions and 1 deletions

View File

@ -40,6 +40,9 @@
lsp-enable-symbol-highlighting nil lsp-enable-symbol-highlighting nil
lsp-enable-text-document-color nil lsp-enable-text-document-color nil
lsp-log-io nil
lsp-idle-delay 1
lsp-enable-indentation nil lsp-enable-indentation nil
lsp-enable-on-type-formatting nil) lsp-enable-on-type-formatting nil)
:config :config
@ -85,6 +88,10 @@
:hook (lsp-mode . lsp-ui-mode) :hook (lsp-mode . lsp-ui-mode)
:init :init
(setq lsp-ui-sideline-show-code-actions nil
lsp-ui-sideline-show-symbol nil
lsp-ui-sideline-show-hover nil
lsp-ui-sideline-delay 0.5)
(setq lsp-ui-sideline-show-diagnostics nil (setq lsp-ui-sideline-show-diagnostics nil
lsp-ui-sideline-ignore-duplicate t lsp-ui-sideline-ignore-duplicate t
lsp-ui-doc-show-with-cursor nil lsp-ui-doc-show-with-cursor nil

87
configs/base-treemacs.el Normal file
View File

@ -0,0 +1,87 @@
;;; base-treemacs.el --- Extensiones/paquetes instalados y su configuración -*- lexical-binding: t -*-
;; Author: kj <webmaster@outcontrol.net>
;; URL: https://git.kj2.me/kj/confi-emacs-actual
;;; Commentary:
;;; Code:
(use-package treemacs
:defer t
:straight t
:commands (treemacs-follow-mode
treemacs-filewatch-mode
treemacs-fringe-indicator-mode
treemacs-git-mode)
:custom-face
(cfrs-border-color ((t (:background ,(face-foreground 'font-lock-comment-face nil t)))))
:bind (([f9] . treemacs)
([f8] . treemacs-display-current-project-exclusively)
([f7] . treemacs-add-and-display-current-project)
("C-x t 1" . treemacs-delete-other-windows)
("C-x t b" . treemacs-bookmark)
("C-x t C-f" . treemacs-find-file)
("C-x t C-t" . treemacs-find-tag)
:map treemacs-mode-map
([mouse-1] . treemacs-single-click-expand-action))
:config
(setq treemacs-collapse-dirs (if treemacs-python-executable 3 0)
treemacs-missing-project-action 'remove
treemacs-sorting 'alphabetic-asc
treemacs-follow-after-init t
treemacs-width 30)
:config
(treemacs-follow-mode t)
(treemacs-filewatch-mode t)
(pcase (cons (not (null (executable-find "git")))
(not (null (executable-find "python3"))))
(`(t . t)
(treemacs-git-mode 'deferred))
(`(t . _)
(treemacs-git-mode 'simple))))
(use-package treemacs-projectile
:defer t
:straight t
:after projectile
:bind (:map projectile-command-map
("h" . treemacs-projectile)))
(use-package treemacs-magit
:defer t
:straight
:after magit
:commands treemacs-magit--schedule-update
:hook ((magit-post-commit
git-commit-post-finish
magit-post-stage
magit-post-unstage)
. treemacs-magit--schedule-update))
(use-package treemacs-persp
:defer t
:straight t
:after persp-mode
:demand t
:functions treemacs-set-scope-type
:config (treemacs-set-scope-type 'Perspectives))
;; `lsp-mode' and `treemacs' integration
(use-package lsp-treemacs
:defer t
:straight t
:after lsp-mode
:bind (:map lsp-mode-map
("C-<f8>" . lsp-treemacs-errors-list)
("M-<f8>" . lsp-treemacs-symbols)
("s-<f8>" . lsp-treemacs-java-deps-list))
:init (lsp-treemacs-sync-mode 1)
:config
(with-eval-after-load 'ace-window
(when (boundp 'aw-ignored-buffers)
(push 'lsp-treemacs-symbols-mode aw-ignored-buffers)
(push 'lsp-treemacs-java-deps-mode aw-ignored-buffers))))
(provide 'base-treemacs)
;;; base-treemacs.el ends here

View File

@ -31,7 +31,7 @@
(add-hook 'emacs-startup-hook (add-hook 'emacs-startup-hook
(lambda () (lambda ()
"Recover GC values after startup." "Recover GC values after startup."
(setq gc-cons-threshold 800000 (setq gc-cons-threshold 100000000
gc-cons-percentage 0.1))) gc-cons-percentage 0.1)))
;; Cargar configuraciones ;; Cargar configuraciones
@ -45,6 +45,7 @@
(require 'base-org) (require 'base-org)
(require 'base-lsp) (require 'base-lsp)
(require 'base-company) (require 'base-company)
(require 'base-treemacs)
(require 'base-ctags) (require 'base-ctags)
(require 'base-ivy) (require 'base-ivy)
(require 'base-keys) (require 'base-keys)