Skip to content

Commit

Permalink
lsp, python, tree-sitter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nathantypanski committed Jan 29, 2024
1 parent 85100a0 commit 32e4fb9
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 74 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ tutorial/
url/
srecode-map.el
projectile-bookmarks.eld
**/*.~undo-tree~
*.~undo-tree~
1 change: 1 addition & 0 deletions config/languages/my-languages.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
;; (require 'my-lsp)
(require 'my-tree-sitter)
(require 'my-lsp)

(require 'my-c)
(require 'my-clojure)
Expand Down
33 changes: 1 addition & 32 deletions config/languages/my-python.el
Original file line number Diff line number Diff line change
Expand Up @@ -93,37 +93,6 @@
If symbol is defined in current buffer, jump to it's definition
Optional \\[universal-argument] used for debugging, will prevent deletion of temp file. "
(interactive "P")
())
)
)
))



(use-package jedi
:commands jedi:setup
:ensure jedi
:init
(progn
(add-hook 'python-mode-hook 'jedi:setup)
)
:config
(progn
(setq jedi:complete-on-dot t)
(setq jedi:doc-mode 'help-mode.)
(defun my-jump-to-python-docs (w)
"Jump to a pane and do py-documentation"
(interactive (list (let* ((word (thing-at-point 'word)))
word)))
(jedi:show-doc)
(switch-to-buffer-other-window "*jedi:doc*" t))

(after 'evil
(evil-define-key 'normal python-mode-map (kbd "K") 'my-jump-to-python-docs))
(after 'evil-leader
(evil-leader/set-key-for-mode 'python-mode "." 'jedi:goto-definition)
)
))

())))))

(provide 'my-python)
2 changes: 1 addition & 1 deletion config/languages/my-tree-sitter.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
:ensure tree-sitter
:config
(progn))

(use-package tree-sitter-langs
:commands tree-sitter-langs
:ensure tree-sitter-langs
:config
(progn))


(provide 'my-tree-sitter)
41 changes: 4 additions & 37 deletions config/my-autocomplete.el
Original file line number Diff line number Diff line change
@@ -1,41 +1,8 @@
(use-package company
:ensure company
(use-package ivy
:ensure ivy
:init
(progn
;; (global-company-mode)
)
(progn)
:config
(progn
(defun my-company-pass-key (arg)
"Pass a key out of company-mode"
(interactive "P")
(company-abort)
(kbd arg)
)
;; C-hjkl in company-mode
(define-key company-active-map (kbd "C-h") 'company-show-doc-buffer)
(define-key company-active-map (kbd "C-l") 'company-show-location)
(define-key company-active-map (kbd "C-j") 'company-select-next)
(define-key company-active-map (kbd "C-k") 'company-select-previous)
(define-key company-active-map (kbd "<down>") 'company-select-next-or-abort)
(define-key company-active-map (kbd "<up>") 'company-select-previous-or-abort)
(define-key company-active-map [down-mouse-1] 'ignore)
(define-key company-active-map [down-mouse-3] 'ignore)
(define-key company-active-map [mouse-1] 'ignore)
(define-key company-active-map [mouse-3] 'ignore)
(define-key company-active-map [up-mouse-1] 'ignore)
(define-key company-active-map [up-mouse-3] 'ignore)
(define-key company-active-map [return] 'company-abort)
(define-key company-active-map (kbd "SPC") 'my-company-pass-key)
(define-key company-active-map "\e\e\e" 'company-abort)
(define-key company-active-map "\C-g" 'company-abort)
(define-key company-active-map [tab] 'company-complete-selection)
(define-key company-active-map (kbd "S-TAB") 'company-complete-common)
(define-key company-active-map (kbd "<f1>") 'company-show-doc-buffer)
(define-key company-active-map "\C-w" 'company-show-location)
(define-key company-active-map "\C-s" 'company-search-candidates)
(define-key company-active-map "\C-\M-s" 'company-filter-candidates)
)
)
(progn))

(provide 'my-autocomplete)
6 changes: 5 additions & 1 deletion config/my-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ This command only has an effect on graphical frames."
;; (global-linum-mode 1)

;; TODO: is this a plugin or can we turn it on here?
(global-undo-tree-mode)

(use-package undo-tree
:ensure undo-tree
:init
(progn (global-undo-tree-mode)))

(provide 'my-core)
1 change: 0 additions & 1 deletion config/my-evil.el
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ whether to call indent-according-to-mode."
:config (progn
(evil-collection-init)))

(global-undo-tree-mode)


(provide 'my-evil)
3 changes: 1 addition & 2 deletions config/my-god.el
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
(god-local-mode 1))

(defun evil-god-stop-hook ()
(god-local-mode -1)
(diminish-undo 'god-local-mode))
(god-local-mode -1))

(defvar evil-execute-in-god-state-buffer nil)

Expand Down
2 changes: 2 additions & 0 deletions custom.el
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'(ansi-term-color-vector
[unspecified "#14191f" "#d15120" "#81af34" "#deae3e" "#7e9fc9" "#a878b5" "#7e9fc9" "#dcdddd"] t)
'(company-auto-complete t)
'(company-insertion-on-trigger t)
'(custom-safe-themes
'("3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "9dae95cdbed1505d45322ef8b5aa90ccb6cb59e0ff26fef0b8f411dfc416c552" "3a727bdc09a7a141e58925258b6e873c65ccf393b2240c51553098ca93957723" "756597b162f1be60a12dbd52bab71d40d6a2845a3e3c2584c6573ee9c332a66e" "3b819bba57a676edf6e4881bd38c777f96d1aa3b3b5bc21d8266fa5b0d0f1ebf" "6a37be365d1d95fad2f4d185e51928c789ef7a4ccf17e7ca13ad63a8bf5b922f" "146d24de1bb61ddfa64062c29b5ff57065552a7c4019bee5d869e938782dfc2a" "b1471d88b39cad028bd621ae7ae1e8e3e3fca2c973f0dfe3fd6658c194a542ff" "cd70962b469931807533f5ab78293e901253f5eeb133a46c2965359f23bfb2ea" "9370aeac615012366188359cb05011aea721c73e1cb194798bc18576025cabeb" "4aee8551b53a43a883cb0b7f3255d6859d766b6c5e14bcb01bed572fcbef4328" "57072d797dc09fcf563051a85a29d6a51d6f2b1a602e029c35b05c30df319b2a" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "8eef22cd6c122530722104b7c82bc8cdbb690a4ccdd95c5ceec4f3efa5d654f5" "4cf3221feff536e2b3385209e9b9dc4c2e0818a69a1cdb4b522756bcdf4e00a4" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" default))
'(ess-swv-pdflatex-commands '("texi2pdf" "pdflatex" "make" "xelatex"))
Expand Down Expand Up @@ -154,6 +155,7 @@
'(info-title-1 ((t (:inherit info-title-2 :height 1.1))))
'(info-title-2 ((t (:inherit info-title-3 :height 0.9))))
'(linum ((t (:background "#4f4f4f" :foreground "#656555"))))
'(markdown-code-face ((t (:inherit fixed-pitch :family "Terminus"))))
'(mode-line-highlight ((t (:box nil))))
'(mode-line-inactive ((t (:inherit mode-line :background "#404045" :foreground "gray60" :inverse-video nil :box nil :weight light))))
'(org-block-background ((t (:background "gray23"))))
Expand Down

0 comments on commit 32e4fb9

Please sign in to comment.