Compare commits

...

5 Commits

Author SHA1 Message Date
kj
52a7058da6 On daemon mode, kill all buffer except dashboard on close frame. 2022-05-18 03:31:22 -04:00
kj
290243835f Enable lsp on Rust. 2022-05-18 03:08:59 -04:00
kj
f75b9eda35 Update gitignore. 2022-05-18 03:08:39 -04:00
kj
e98d12e7e8 Change windmove shortcut keys. 2022-05-18 03:07:54 -04:00
kj
0411b624da Fix lsp to works with another company-backends. 2022-05-18 03:07:05 -04:00
5 changed files with 26 additions and 21 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ bookmarks
projectile-bookmarks.eld projectile-bookmarks.eld
.org-id-locations .org-id-locations
org-roam.db org-roam.db
lsp-cache/

View File

@ -46,13 +46,14 @@
;; Automcompletado ;; Automcompletado
(use-package company (use-package company
:defer t :defer t
:config :init
(global-company-mode) (global-company-mode)
:config
(setq company-dabbrev-downcase nil) ; autocompletado case-sensitive. (setq company-dabbrev-downcase nil) ; autocompletado case-sensitive.
(setq company-idle-delay 0) ; mostrar autocompletado lo más rápido posible (setq company-idle-delay 0) ; mostrar autocompletado lo más rápido posible
(setq company-minimum-prefix-length 1) ; mostrar autocompletado desde que se coloca la primera letra. (setq company-minimum-prefix-length 1) ; mostrar autocompletado desde que se coloca la primera letra.
(setq company-backends '((company-files :with company-yasnippet) (setq company-backends '((company-capf :with company-yasnippet)
(company-capf :with company-yasnippet) (company-files :with company-yasnippet)
(company-dabbrev-code company-ctags company-keywords :with company-yasnippet) (company-dabbrev-code company-ctags company-keywords :with company-yasnippet)
(company-dabbrev :with company-yasnippet))) (company-dabbrev :with company-yasnippet)))
) )
@ -174,9 +175,10 @@
;; Languaje server protocol ;; Languaje server protocol
(use-package lsp-mode (use-package lsp-mode
:defer t :defer t
;; :hook (js-mode . lsp-deferred)
:custom :custom
(lsp-headerline-breadcrumb-enable nil)) (lsp-headerline-breadcrumb-enable nil)
:config
(setq lsp-completion-provider :none))
;; Interface para lsp ;; Interface para lsp
(use-package lsp-ui :defer t) (use-package lsp-ui :defer t)
@ -280,7 +282,7 @@
:init :init
(winner-mode 1)) (winner-mode 1))
;; ;; Permitir snippets
(use-package yasnippet (use-package yasnippet
:defer t :defer t
:ensure t :ensure t
@ -292,10 +294,9 @@
((prog-mode feature-mode) . yas-minor-mode-on) ((prog-mode feature-mode) . yas-minor-mode-on)
(html-mode . yas-minor-mode)) (html-mode . yas-minor-mode))
;; ;; Coleción de snippets
(use-package yasnippet-snippets :ensure t :defer t) (use-package yasnippet-snippets :ensure t :defer t)
;; Org-Mode ;; Org-Mode
(require 'org-config) (require 'org-config)

View File

@ -38,10 +38,10 @@
(global-set-key (kbd "C-x tp") 'multi-vterm-project) (global-set-key (kbd "C-x tp") 'multi-vterm-project)
;; Atajos de windmove ;; Atajos de windmove
(global-set-key (kbd "C-x C-<left>") 'windmove-left) (global-set-key (kbd "C-x <left>") 'windmove-left)
(global-set-key (kbd "C-x C-<right>") 'windmove-right) (global-set-key (kbd "C-x <right>") 'windmove-right)
(global-set-key (kbd "C-x C-<up>") 'windmove-up) (global-set-key (kbd "C-x <up>") 'windmove-up)
(global-set-key (kbd "C-x C-<down>") 'windmove-down) (global-set-key (kbd "C-x <down>") 'windmove-down)
;; Atajos para reemplazar (los por fedecto no van bien para el teclado en español) ;; Atajos para reemplazar (los por fedecto no van bien para el teclado en español)
(global-set-key (kbd "C-x /") 'query-replace-regexp) (global-set-key (kbd "C-x /") 'query-replace-regexp)

View File

@ -11,7 +11,8 @@
;;; Code: ;;; Code:
;; The default is 800 kilobytes. Measured in bytes. ;; The default is 800 kilobytes. Measured in bytes.
(setq gc-cons-threshold (* 50 1000 1000)) (setq gc-cons-threshold (* 50 1024 1024))
(setq read-process-output-max (* 1024 1024))
;; Native compilation ;; Native compilation
(when (and (fboundp 'native-comp-available-p) (when (and (fboundp 'native-comp-available-p)
@ -115,10 +116,8 @@
;; Cerrar buffers al cerrar emacsclient ;; Cerrar buffers al cerrar emacsclient
(add-hook 'delete-frame-functions (add-hook 'delete-frame-functions
(lambda (frame) (lambda (frame)
(let* ((window (frame-selected-window frame)) (mapc 'kill-buffer (delq (get-buffer "*dashboard*") (buffer-list)))
(buffer (and window (window-buffer window)))) ))
(when (and buffer (buffer-file-name buffer))
(kill-buffer buffer)))))
) )
(if (daemonp) (if (daemonp)

View File

@ -9,13 +9,17 @@
(use-package rust-mode (use-package rust-mode
:defer t :defer t
:ensure t) :ensure t
:config
(setq rust-format-on-save t))
(use-package rustic (use-package rustic
:defer t :defer t
:ensure t :ensure t
:config :config
(setq rustic-lsp-client nil) (setq rustic-lsp-server 'rls)
(setq rustic-lsp-client 'lsp)
;;(setq rustic-lsp-client nil)
(push 'rustic-clippy flycheck-checkers)) (push 'rustic-clippy flycheck-checkers))
(provide 'lang-rust) (provide 'lang-rust)