summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/general.el46
-rw-r--r--lisp/org-custom.el9
-rw-r--r--lisp/python-custom.el25
-rw-r--r--lisp/text.el3
-rw-r--r--lisp/web.el10
5 files changed, 63 insertions, 30 deletions
diff --git a/lisp/general.el b/lisp/general.el
index 52f276a..8f4f92e 100644
--- a/lisp/general.el
+++ b/lisp/general.el
@@ -30,6 +30,9 @@
(global-set-key (kbd "C-c C-l") 'reload-init-file)
+(setq-default header-line-format mode-line-format) ; Copy mode-line
+(setq-default mode-line-format nil) ; Remove mode-line
+
;; Tab mode
(global-tab-line-mode t)
@@ -89,9 +92,10 @@
)
(use-package helm-posframe
- :ensure t
- :config
- (helm-posframe-enable))
+ :ensure t
+ :config
+ (helm-posframe-enable)
+ (setq helm-posframe-poshandler 'posframe-poshandler-frame-top-center))
;; Projectile for project navigation
(use-package projectile
@@ -154,7 +158,7 @@
:ensure t
:hook (prog-mode . git-gutter-mode)
:config
- (setq git-gutter:update-interval 0.02)
+ (setq git-gutter:update-interval 1)
(setq git-gutter:window-width 1))
(use-package git-gutter-fringe
@@ -178,8 +182,8 @@
;; Global key binds
(require 'eglot)
(bind-key* (kbd "<f2>") #'eglot-rename)
-;(bind-key* (kbd "C-x C-f") 'helm-find-files)
-;(bind-key* (kbd "C-s") 'helm-do-grep-ag)
+(bind-key* (kbd "C-x C-f") 'helm-find-files)
+(bind-key* (kbd "C-s") 'helm-do-grep-ag)
(bind-key* (kbd "M-x") 'helm-M-x)
(bind-key* (kbd "M-.") 'xref-find-definitions)
(bind-key* (kbd "C-x k") 'kill-this-buffer)
@@ -239,7 +243,7 @@
:defer t
:init (add-hook 'after-init-hook 'global-company-mode)
:config
- (setq company-idle-delay 0.1
+ (setq company-idle-delay 0.5
company-minimum-prefix-length 2
company-tooltip-limit 20
company-backends '((company-capf company-gtags company-elisp company-css company-dabbrev))
@@ -263,20 +267,20 @@
(set-face-underline 'eglot-highlight-symbol-face t)
-(use-package tree-sitter
- :ensure t
- :defer t
- :config
- ;; use treesitter when possible
- (global-tree-sitter-mode)
- ;; overwrite the default syntax-highlighting (from major modes)
- (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)
- :hook
- (prog-mode . tree-sitter-mode))
-
-(use-package tree-sitter-langs
- :ensure t
- :defer t)
+;; (use-package tree-sitter
+;; :ensure t
+;; :defer t
+;; :config
+;; ;; use treesitter when possible
+;; (global-tree-sitter-mode)
+;; ;; overwrite the default syntax-highlighting (from major modes)
+;; (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)
+;; :hook
+;; (prog-mode . tree-sitter-mode))
+
+;; (use-package tree-sitter-langs
+;; :ensure t
+;; :defer t)
;; Highlight similar text
(use-package highlight-thing
diff --git a/lisp/org-custom.el b/lisp/org-custom.el
index 9b60cf6..ea826bd 100644
--- a/lisp/org-custom.el
+++ b/lisp/org-custom.el
@@ -59,9 +59,12 @@
(flyspell-mode 1)
)
-(custom-set-variables
- '(org-directory "~/OrgRoam")
- '(org-agenda-files (list org-directory)))
+(setq org-directory "~/OrgRoam")
+
+(setq org-agenda-files '("~/OrgRoam" "~/OrgRoam/daily"))
+
+;(setq org-agenda-files
+; (find-lisp-find-files "~/OrgRoam" "\.org$"))
(setq org-todo-keywords
'((sequence "TODO" "PROGRESS" "VERIFY" "|" "DONE" "ABANDONED")))
diff --git a/lisp/python-custom.el b/lisp/python-custom.el
index 432ad48..10c4cfc 100644
--- a/lisp/python-custom.el
+++ b/lisp/python-custom.el
@@ -9,5 +9,30 @@
:hook
((python-mode . eglot-ensure)))
+(defun python-args-to-google-docstring (text &optional make-fields)
+ "Return a reST docstring format for the python arguments in yas-text."
+ (let* ((indent (concat "\n" (make-string (current-column) 32)))
+ (args (python-split-args text))
+ (nr 0)
+ (formatted-args
+ (mapconcat
+ (lambda (x)
+ (concat " " (nth 0 x)
+ (if make-fields (format " ${%d:arg%d}" (cl-incf nr) nr))
+ (if (nth 1 x) (concat " \(default " (nth 1 x) "\)"))))
+ args
+ indent)))
+ (unless (string= formatted-args "")
+ (concat
+ (mapconcat 'identity
+ (list "" "Args:" formatted-args)
+ indent)
+ "\n"))))
+
+(use-package yasnippet
+ :ensure t
+ :config
+ (yas-global-mode 1))
+
(provide 'python-custom)
;;; python-custom.el ends here
diff --git a/lisp/text.el b/lisp/text.el
index 2438b7d..3ee8e33 100644
--- a/lisp/text.el
+++ b/lisp/text.el
@@ -16,7 +16,8 @@
(use-package perfect-margin
:ensure t
:config
- (add-hook 'text-mode-hook 'my-perfect-margin-mode-hook))
+ (add-hook 'text-mode-hook 'my-perfect-margin-mode-hook)
+ (add-hook 'org-mode-hook 'perfect-margin-mode))
(add-hook 'text-mode-hook 'setup-text-mode)
(use-package ispell
diff --git a/lisp/web.el b/lisp/web.el
index 73f3935..b92507b 100644
--- a/lisp/web.el
+++ b/lisp/web.el
@@ -38,11 +38,11 @@
)
;; TSX
-(use-package tree-sitter-langs
- :config
- (tree-sitter-require 'tsx)
- (add-to-list 'tree-sitter-major-mode-language-alist '(typescript-tsx-mode . tsx))
- )
+;; (use-package tree-sitter-langs
+;; :config
+;; (tree-sitter-require 'tsx)
+;; (add-to-list 'tree-sitter-major-mode-language-alist '(typescript-tsx-mode . tsx))
+;; )
(define-derived-mode typescript-tsx-mode web-mode "TypeScript[tsx]")
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-tsx-mode))