summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rwxr-xr-xinit.el78
1 files changed, 67 insertions, 11 deletions
diff --git a/init.el b/init.el
index 3ccb252..32f1fa5 100755
--- a/init.el
+++ b/init.el
@@ -104,6 +104,11 @@
tramp-file-name-regexp))
(setq tramp-verbose 1)
+;; Copy paste in terminal
+(use-package xclip
+ :ensure t)
+(xclip-mode 1)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Custom variables snippet
@@ -117,9 +122,10 @@
;; If there is more than one, they won't work right.
'(custom-safe-themes
'("32f22d075269daabc5e661299ca9a08716aa8cda7e85310b9625c434041916af" "f458b92de1f6cf0bdda6bce23433877e94816c3364b821eb4ea9852112f5d7dc" default))
- '(org-agenda-files '("~/Projects/org-files/agenda/financeiro.org"))
+ '(org-agenda-files
+ '("~/Projects/01.henriquelalves/99.others/org-files/agenda/financeiro.org"))
'(package-selected-packages
- '(yaml-mode lsp-ui lsp-mode pet editorconfig geiser-guile paredit git-auto-commit-mode elpy rust-mode lua-mode sass-mode poetry markdown-mode flymake-cursor gdscript-mode magit org-pomodoro org-tracktable doom-themes which-key))
+ '(envrc treesit-auto lsp-pyright company company-mode flycheck ledger-mode org-drill mu4e wallabag nov anki calibredb shrface yaml-mode lsp-ui lsp-mode pet editorconfig geiser-guile paredit git-auto-commit-mode elpy rust-mode lua-mode sass-mode poetry markdown-mode flymake-cursor gdscript-mode magit org-pomodoro org-tracktable doom-themes which-key))
'(pyvenv-tracking-mode t)
'(safe-local-variable-values '((git-auto-commit-mode . 1) (git-auto-commit-mode . t))))
(custom-set-faces
@@ -188,7 +194,7 @@
eshell-mode-hook
treemacs-mode-hook))
(add-hook mode (lambda () (display-line-numbers-mode 0))))
-(set-face-attribute 'default nil :font "Fira Code" :height 120)
+(set-face-attribute 'default nil :height 120)
;; Enable horizontal scrolling
(setq mouse-wheel-tilt-scroll t)
@@ -201,6 +207,8 @@
;; Fix TUI background
(add-to-list 'default-frame-alist '(background-color . "#464258"))
+(set-face-attribute 'region nil :background "#9673D3")
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
@@ -232,6 +240,17 @@
:mode ("README\\.md\\'" . gfm-mode)
:init (setq markdown-command "multimarkdown"))
+;; Org / reading modes
+(use-package nov
+ :ensure t)
+(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
+
+(use-package org-drill
+ :ensure t)
+
+(use-package ledger-mode
+ :ensure t)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Programming modes
@@ -243,10 +262,14 @@
:ensure t)
(editorconfig-mode 1)
-;; Flymake errors under cursor
-(use-package flymake-cursor
+(use-package flycheck
:ensure t)
-(eval-after-load 'flymake '(require 'flymake-cursor))
+(global-flycheck-mode)
+
+;; ;; Flymake errors under cursor
+;; (use-package flymake-cursor
+;; :ensure t)
+;; (eval-after-load 'flymake '(require 'flymake-cursor))
;; Disable automatic eldoc
(setq eglot-managed-mode-hook (list (lambda () (eldoc-mode -1))))
@@ -275,19 +298,41 @@
:ensure t
:init
(setq lsp-keymap-prefix "C-c l")
- :hook ((python-mode . lsp))
+ :hook (;(rust-mode . lsp)
+ (rust-ts-mode . lsp)
+ (c++-ts-mode . lsp)
+ (python-ts-mode . lsp)
+ ;; (python-ts-mode . lsp)
+ )
:commands lsp
)
+
(use-package lsp-ui
:ensure t
:commands lsp-ui-mode)
+(use-package company)
+
+;; (setq lsp-ui-sideline-show-diagnostics t)
+;; (setq lsp-ui-sideline-show-hover t)
+;; (setq lsp-ui-sideline-show-code-actions t)
+;; (setq lsp-ui-sideline-update-mode t)
+(setq lsp-ui-sideline-delay 0.0)
;; python mode
-(use-package poetry
+;; (use-package poetry
+;; :ensure t
+;; :hook
+;; (python-ts-mode . poetry-tracking-mode))
+
+;; (add-hook 'python-ts-mode-hook 'eglot-ensure)
+
+(use-package lsp-pyright
:ensure t
- :hook
- (python-mode . poetry-tracking-mode))
+ :custom (lsp-pyright-langserver-command "pyright") ;; or basedpyright
+ :hook (python-ts-mode . (lambda ()
+ (require 'lsp-pyright)
+ (lsp)))) ; or lsp-deferred
;; Lua mode
(use-package lua-mode
@@ -306,6 +351,17 @@
(add-hook 'gdscript-mode-hook 'eglot-ensure)
(put 'dired-find-alternate-file 'disabled nil)
-
;; Sass mode
(use-package sass-mode)
+
+;; Hooks
+
+;; Auto use treesitter modes
+(use-package treesit-auto
+ :demand t
+ :config
+ (global-treesit-auto-mode))
+
+(add-hook 'python-ts-mode-hook 'company-mode)
+(add-hook 'c++-ts-mode-hook 'company-mode)
+(add-hook 'rust-ts-mode-hook 'company-mode)