mirror of
https://github.com/ksyasuda/rice.git
synced 2025-12-22 18:05:19 -08:00
Compare commits
19 Commits
4307fa28db
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0450ea843 | ||
|
|
96355a39ba | ||
|
|
3cf5559b0c | ||
|
|
c82203111a | ||
|
|
851ae5a1a2 | ||
|
|
227a06e002 | ||
|
|
bb361c8aa2 | ||
|
|
93411a86c5 | ||
|
|
2fbf5e0909 | ||
|
|
c70f3ec15a | ||
|
|
164aa942e0 | ||
|
|
8c30d6f1d6 | ||
|
|
9b80bee1d5 | ||
|
|
997cd34645 | ||
|
|
b6992ccdcb | ||
|
|
aa59a3830a | ||
|
|
3dfed596cb | ||
|
|
7eafb32215 | ||
|
|
758fc2fe3f |
341
doom/config.el
341
doom/config.el
@@ -5,36 +5,60 @@
|
|||||||
|
|
||||||
|
|
||||||
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
||||||
;; clients, file templates and snippets.
|
;; clients, file templates and snippets. It is optional.
|
||||||
(setq user-full-name "Kyle Yasuda"
|
(setq user-full-name "Kyle Yasuda"
|
||||||
user-mail-address "ksyasuda@umich.edu")
|
user-mail-address "the.sudacode@gmail.com")
|
||||||
|
|
||||||
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
|
;; Doom exposes five (optional) variables for controlling fonts in Doom:
|
||||||
;; are the three important ones:
|
|
||||||
;;
|
;;
|
||||||
;; + `doom-font'
|
;; - `doom-font' -- the primary font to use
|
||||||
;; + `doom-variable-pitch-font'
|
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
|
||||||
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
||||||
;; presentations or streaming.
|
;; presentations or streaming.
|
||||||
|
;; - `doom-unicode-font' -- for unicode glyphs
|
||||||
|
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
|
||||||
;;
|
;;
|
||||||
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
|
;; See 'C-h v doom-font' for documentation and more examples of what they
|
||||||
;; font string. You generally only need these two:
|
;; accept. For example:
|
||||||
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
|
;;
|
||||||
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
|
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
|
||||||
;; (setq doom-font (font-spec :family "FiraCode Nerd Font" :size 14))
|
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
|
||||||
(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 14))
|
;;
|
||||||
|
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
|
||||||
|
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
|
||||||
|
;; refresh your font settings. If Emacs still can't find your font, it likely
|
||||||
|
;; wasn't installed correctly. Font issues are rarely Doom issues!
|
||||||
|
|
||||||
;; There are two ways to load a theme. Both assume the theme is installed and
|
;; There are two ways to load a theme. Both assume the theme is installed and
|
||||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
;; available. You can either set `doom-theme' or manually load a theme with the
|
||||||
;; `load-theme' function. This is the default:
|
;; `load-theme' function. This is the default:
|
||||||
(setq doom-theme 'doom-one)
|
(setq doom-theme 'doom-one)
|
||||||
|
|
||||||
|
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 16 :weight 'medium :dpi 144) doom-unicode-font (font-spec :family "JetBrainsMono Nerd Font" :size 16 :weight 'medium :dpi 144))
|
||||||
|
|
||||||
|
;; This determines the style of line numbers in effect. If set to `nil', line
|
||||||
|
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||||
|
(setq display-line-numbers-type t)
|
||||||
|
|
||||||
;; If you use `org' and don't want your org files in the default location below,
|
;; If you use `org' and don't want your org files in the default location below,
|
||||||
;; change `org-directory'. It must be set before org loads!
|
;; change `org-directory'. It must be set before org loads!
|
||||||
(setq org-directory "~/org/")
|
(setq org-directory "~/org/")
|
||||||
|
|
||||||
|
|
||||||
;; Here are some additional functions/macros that could help you configure Doom:
|
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
||||||
|
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
||||||
|
;;
|
||||||
|
;; (after! PACKAGE
|
||||||
|
;; (setq x y))
|
||||||
|
;;
|
||||||
|
;; The exceptions to this rule:
|
||||||
|
;;
|
||||||
|
;; - Setting file/directory variables (like `org-directory')
|
||||||
|
;; - Setting variables which explicitly tell you to set them before their
|
||||||
|
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
|
||||||
|
;; - Setting doom variables (which start with 'doom-' or '+').
|
||||||
|
;;
|
||||||
|
;; Here are some additional functions/macros that will help you configure Doom.
|
||||||
;;
|
;;
|
||||||
;; - `load!' for loading external *.el files relative to this one
|
;; - `load!' for loading external *.el files relative to this one
|
||||||
;; - `use-package!' for configuring packages
|
;; - `use-package!' for configuring packages
|
||||||
@@ -47,86 +71,83 @@
|
|||||||
;; To get information about any of these functions/macros, move the cursor over
|
;; To get information about any of these functions/macros, move the cursor over
|
||||||
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
||||||
;; This will open documentation for it, including demos of how they are used.
|
;; This will open documentation for it, including demos of how they are used.
|
||||||
|
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
|
||||||
|
;; etc).
|
||||||
;;
|
;;
|
||||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
||||||
;; they are implemented.
|
;; they are implemented.
|
||||||
|
|
||||||
|
;; make _ part of word
|
||||||
|
(defadvice evil-inner-word (around underscore-as-word activate)
|
||||||
|
(let ((table (copy-syntax-table (syntax-table))))
|
||||||
|
(modify-syntax-entry ?_ "w" table)
|
||||||
|
(with-syntax-table table
|
||||||
|
ad-do-it)))
|
||||||
|
|
||||||
|
;; COPILOT ;;
|
||||||
|
;; accept completion from copilot and fallback to company
|
||||||
|
(use-package! copilot
|
||||||
|
:hook (prog-mode . copilot-mode)
|
||||||
|
:bind (("C-TAB" . 'copilot-accept-completion-by-word)
|
||||||
|
("C-<tab>" . 'copilot-accept-completion-by-word)
|
||||||
|
:map copilot-completion-map
|
||||||
|
("C-<spc>" . 'copilot-accept-completion)
|
||||||
|
("C-SPC" . 'copilot-accept-completion)))
|
||||||
|
|
||||||
|
;; (use-package lsp-pyright
|
||||||
|
;; :ensure t
|
||||||
|
;; :hook (python-mode . (lambda ()
|
||||||
|
;; (require 'lsp-pyright)
|
||||||
|
;; (lsp)))) ; or lsp-deferred
|
||||||
|
|
||||||
|
(use-package lsp-jedi
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(with-eval-after-load "lsp-mode"
|
||||||
|
(add-to-list 'lsp-disabled-clients 'pyls)
|
||||||
|
(add-to-list 'lsp-enabled-clients 'jedi)
|
||||||
|
(add-to-list 'lsp-enabled-clients 'bash-ls)
|
||||||
|
(add-to-list 'lsp-enabled-clients 'lsp)))
|
||||||
|
|
||||||
|
|
||||||
(setq python-prettify-symbols-alist
|
;; (setq lsp-jedi-workspace-extra-paths
|
||||||
'(("lambda" . ?λ)
|
;; (vconcat lsp-jedi-workspace-extra-paths
|
||||||
("and" . ?∧)
|
;; ["/home/me/src/my-project/.venv/lib/python3.10/site-packages"]))
|
||||||
("or" . ?∨)
|
|
||||||
("in" . ?∈)
|
|
||||||
("for" . ?∀)
|
|
||||||
("def" . ?ƒ)
|
|
||||||
("int" . ?ℤ)
|
|
||||||
("not" . ?¬)))
|
|
||||||
|
|
||||||
;; (setq prettify-symbols-alist
|
;; EAF ;;
|
||||||
;; '(("lambda" . ?λ)
|
(add-load-path! (expand-file-name "~/Downloads/emacs-application-framework"))
|
||||||
;; ("&&" . ?∧)
|
(require 'eaf)
|
||||||
;; ("||" . ?∨)
|
(require 'eaf-pdf-viewer)
|
||||||
;; ("in" . ?∈)
|
(require 'eaf-browser)
|
||||||
;; ("for" . ?∀)
|
(require 'eaf-jupyter)
|
||||||
;; ("function" . ?ƒ)
|
(require 'eaf-markdown-previewer)
|
||||||
;; ("int" . ?ℤ)
|
(require 'eaf-image-viewer)
|
||||||
;; ("not" . ?¬)))
|
(require 'eaf-org-previewer)
|
||||||
|
(require 'eaf-video-player)
|
||||||
|
(require 'eaf-rss-reader)
|
||||||
|
|
||||||
|
;;-------;;
|
||||||
|
;; VTERM ;;
|
||||||
|
;;-------;;
|
||||||
|
(after! vterm
|
||||||
|
(set-popup-rule! "*doom:vterm-popup:main" :size 0.45 :vslot -4 :select t :quit nil :ttl 0 :side 'right)
|
||||||
|
)
|
||||||
|
|
||||||
|
;;----------;;
|
||||||
|
;; WAKATIME ;;
|
||||||
|
;;----------;;
|
||||||
(use-package! wakatime-mode :ensure t)
|
(use-package! wakatime-mode :ensure t)
|
||||||
(global-wakatime-mode)
|
(global-wakatime-mode)
|
||||||
|
|
||||||
|
;;-----------;;
|
||||||
|
;; FIRA CODE ;;
|
||||||
|
;;-----------;;
|
||||||
|
;; (use-package! fira-code-mode
|
||||||
|
;; :hook prog-mode)
|
||||||
|
|
||||||
(use-package! fira-code-mode
|
;;---------------;;
|
||||||
:hook prog-mode)
|
;; ALL THE ICONS ;;
|
||||||
|
;;---------------;;
|
||||||
;;; LSP
|
|
||||||
(use-package! lsp
|
|
||||||
:init
|
|
||||||
(setq lsp-pyls-plugins-pylint-enabled t)
|
|
||||||
(setq lsp-pyls-plugins-autopep8-enabled t)
|
|
||||||
(setq lsp-pyls-plugins-yapf-enabled t)
|
|
||||||
(setq lsp-pyls-plugins-pyflakes-enabled t)
|
|
||||||
)
|
|
||||||
|
|
||||||
(lsp-ui-mode)
|
|
||||||
|
|
||||||
;; (require 'lsp-python-ms)
|
|
||||||
;; (use-package lsp-python-ms
|
|
||||||
;; :init (setq lsp-python-ms-auto-install-server t)
|
|
||||||
;; :hook (python-mode . (lambda ()
|
|
||||||
;; (require 'lsp-python-ms)
|
|
||||||
;; (lsp)))) ; or lsp-deferred
|
|
||||||
|
|
||||||
(use-package lsp-pyright
|
|
||||||
:ensure t
|
|
||||||
:hook (python-mode . (lambda ()
|
|
||||||
(require 'lsp-pyright)
|
|
||||||
(lsp)))) ; or lsp-deferred
|
|
||||||
|
|
||||||
(use-package! lsp-mode
|
|
||||||
:commands lsp
|
|
||||||
:hook
|
|
||||||
(sh-mode . 'lsp))
|
|
||||||
|
|
||||||
(setq lsp-enable-folding t)
|
|
||||||
|
|
||||||
(org-babel-do-load-languages
|
|
||||||
'org-babel-load-languages
|
|
||||||
'((python . t)))
|
|
||||||
|
|
||||||
|
|
||||||
;; (setq python-shell-interpreter "ipython"
|
|
||||||
;; python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True")
|
|
||||||
|
|
||||||
; (setf (lsp-session-folders-blacklist (lsp-session)) nil)
|
|
||||||
; (lsp--persist-session (lsp-session))
|
|
||||||
|
|
||||||
(advice-add 'lsp :before (lambda (&rest _args) (eval '(setf (lsp-session-server-id->folders (lsp-session)) (ht)))))
|
|
||||||
|
|
||||||
;;; all the icons
|
|
||||||
|
|
||||||
(add-load-path! (expand-file-name "~/Downloads/all-the-icons-dired"))
|
(add-load-path! (expand-file-name "~/Downloads/all-the-icons-dired"))
|
||||||
(load "all-the-icons-dired.el")
|
(load "all-the-icons-dired.el")
|
||||||
(use-package! all-the-icons-dired
|
(use-package! all-the-icons-dired
|
||||||
@@ -148,108 +169,90 @@
|
|||||||
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
|
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
|
||||||
|
|
||||||
|
|
||||||
;;; enacs application framework
|
;; DIRED ;;
|
||||||
(use-package eaf
|
(evil-define-key 'normal dired-mode-map
|
||||||
:load-path "~/Downloads/emacs-application-framework" ; Set to "/usr/share/emacs/site-lisp/eaf" if installed from AUR
|
(kbd "M-i") 'dired-display-file
|
||||||
:custom
|
(kbd "h") 'dired-up-directory
|
||||||
; See https://github.com/emacs-eaf/emacs-application-framework/wiki/Customization
|
(kbd "l") 'dired-open-file
|
||||||
(eaf-browser-continue-where-left-off t)
|
(kbd "C") 'dired-do-copy
|
||||||
(eaf-browser-enable-adblocker t)
|
(kbd "D") 'dired-do-delete
|
||||||
(browse-url-browser-function 'eaf-open-browser)
|
(kbd "J") 'dired-goto-file
|
||||||
:config
|
(kbd "M") 'dired-do-chmod
|
||||||
(defalias 'browse-web #'eaf-open-browser))
|
(kbd "O") 'dired-do-chown
|
||||||
|
(kbd "P") 'dired-do-print
|
||||||
|
(kbd "R") 'dired-do-rename
|
||||||
|
(kbd "T") 'dired-do-touch
|
||||||
|
(kbd "Y") 'dired-copy-filenamecopy
|
||||||
|
(kbd "+") 'dired-create-directory
|
||||||
|
(kbd "-") 'dired-up-directory)
|
||||||
|
|
||||||
(require 'eaf-system-monitor)
|
;;-----------;;
|
||||||
(require 'eaf-pdf-viewer)
|
;; VARIABLES ;;
|
||||||
(require 'eaf-terminal)
|
;;-----------;;
|
||||||
(require 'eaf-music-player)
|
(setq display-line-numbers-type 'relative)
|
||||||
(require 'eaf-browser)
|
|
||||||
(require 'eaf-jupyter)
|
|
||||||
(require 'eaf-file-browser)
|
|
||||||
(require 'eaf-markdown-previewer)
|
|
||||||
(require 'eaf-image-viewer)
|
|
||||||
(require 'eaf-file-manager)
|
|
||||||
(require 'eaf-airshare)
|
|
||||||
(require 'eaf-org-previewer)
|
|
||||||
(require 'eaf-file-sender)
|
|
||||||
(require 'eaf-video-player)
|
|
||||||
|
|
||||||
(require 'eaf-evil)
|
|
||||||
|
|
||||||
|
|
||||||
(define-key key-translation-map (kbd "SPC")
|
|
||||||
(lambda (prompt)
|
|
||||||
(if (derived-mode-p 'eaf-mode)
|
|
||||||
(pcase eaf--buffer-app-name
|
|
||||||
("browser" (if (string= (eaf-call-sync "call_function" eaf--buffer-id "is_focus") "True")
|
|
||||||
(kbd "SPC")
|
|
||||||
(kbd eaf-evil-leader-key)))
|
|
||||||
("pdf-viewer" (kbd eaf-evil-leader-key))
|
|
||||||
("image-viewer" (kbd eaf-evil-leader-key))
|
|
||||||
(_ (kbd "SPC")))
|
|
||||||
(kbd "SPC"))))
|
|
||||||
|
|
||||||
|
|
||||||
;;; vterm
|
|
||||||
|
|
||||||
(after! vterm
|
|
||||||
(set-popup-rule! "*doom:vterm-popup:main" :size 0.45 :vslot -4 :select t :quit nil :ttl 0 :side 'right)
|
|
||||||
)
|
|
||||||
|
|
||||||
;;; gif screencast
|
|
||||||
|
|
||||||
(with-eval-after-load 'gif-screencast
|
|
||||||
(define-key gif-screencast-mode-map (kbd "<f8>") 'gif-screencast-toggle-pause))
|
|
||||||
|
|
||||||
(global-set-key (kbd "<f9>") 'gif-screencast-start-or-stop)
|
|
||||||
|
|
||||||
|
|
||||||
;;; HOOKS
|
|
||||||
|
|
||||||
|
|
||||||
(add-hook 'org-mode-hook #'org-bullets-mode)
|
|
||||||
(add-hook 'before-save-hook 'py-isort-before-save)
|
|
||||||
|
|
||||||
(after! flyspell
|
|
||||||
(setq flyspell-lazy-idle-seconds 2))
|
|
||||||
|
|
||||||
;;; VARIABLES
|
|
||||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
|
||||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
|
||||||
(setq display-line-numbers-type t)
|
|
||||||
(setq rainbow-delimiters-mode t)
|
(setq rainbow-delimiters-mode t)
|
||||||
(setq confirm-kill-emacs nil)
|
(setq confirm-kill-emacs nil)
|
||||||
|
(setq browse-url-browser-function 'browse-url-firefox)
|
||||||
|
(setq prettify-symbols-mode nil)
|
||||||
|
(setq +pretty-code-enabled-modes nil)
|
||||||
(setq prettify-symbols-mode nil)
|
(setq prettify-symbols-mode nil)
|
||||||
(setq global-prettify-symbols-mode nil)
|
(setq global-prettify-symbols-mode nil)
|
||||||
(setq browse-url-browser-function 'browse-url-firefox)
|
(setq shfmt-arguments '("-i" "0" "-ci" "-sr"))
|
||||||
|
|
||||||
|
;;--------;;
|
||||||
(setq lsp-ui-doc-position 'bottom)
|
;; HOOKS ;;
|
||||||
(setq lsp-ui-doc-alignment 'window)
|
;;--------;;
|
||||||
(setq lsp-ui-doc-max-height 25)
|
(add-hook 'org-mode-hook #'org-bullets-mode)
|
||||||
(setq lsp-ui-doc-max-width 350)
|
(add-hook 'before-save-hook 'py-isort-before-save)
|
||||||
(setq lsp-ui-doc-mode t)
|
|
||||||
(setq lsp-ui-peek-mode t)
|
|
||||||
(setq lsp-ui-peek-enable t)
|
|
||||||
(setq lsp-ui-doc-delay 0.25)
|
|
||||||
|
|
||||||
(setq eaf-terminal-font-size 12)
|
|
||||||
(setq lsp-treemacs-sync-mode 1)
|
|
||||||
|
|
||||||
;; (setq lsp-python-ms-auto-install-server t)
|
|
||||||
(add-hook 'python-mode-hook #'lsp) ; or lsp-deferred
|
(add-hook 'python-mode-hook #'lsp) ; or lsp-deferred
|
||||||
|
(add-hook 'sh-mode-hook 'shfmt-on-save-mode 'flycheck-mode)
|
||||||
|
|
||||||
|
(setq lsp-ui-sideline-enable t)
|
||||||
|
(setq lsp-ui-sideline-show-hover t)
|
||||||
|
(setq lsp-ui-sideline-show-diagnostics t)
|
||||||
|
(setq lsp-ui-sideline-show-code-actions t)
|
||||||
|
(setq lsp-ui-sideline-show-code-lenses t)
|
||||||
|
(setq lsp-ui-sideline-ignore-duplicate t)
|
||||||
|
(setq lsp-ui-doc-enable t)
|
||||||
|
(setq lsp-ui-doc-show-with-cursor nil)
|
||||||
|
(setq lsp-ui-doc-show-with-mouse t)
|
||||||
|
(setq lsp-ui-doc-position 'at-point)
|
||||||
|
(setq lsp-ui-doc-header t)
|
||||||
|
(setq lsp-ui-doc-include-signature t)
|
||||||
|
(setq lsp-ui-doc-max-width 150)
|
||||||
|
(setq lsp-ui-doc-max-height 30)
|
||||||
|
(setq lsp-ui-doc-use-childframe t)
|
||||||
|
(setq lsp-ui-doc-use-webkit t)
|
||||||
|
(setq lsp-ui-flycheck-enable t)
|
||||||
|
(setq lsp-ui-imenu-enable t)
|
||||||
|
(setq lsp-ui-imenu-kind-position 'top)
|
||||||
|
(setq lsp-ui-sideline-enable t)
|
||||||
|
(setq lsp-ui-sideline-show-hover t)
|
||||||
|
(setq lsp-ui-sideline-show-diagnostics t)
|
||||||
|
(setq lsp-ui-sideline-show-code-actions t)
|
||||||
|
(setq lsp-ui-sideline-show-code-lenses t)
|
||||||
|
(setq lsp-ui-sideline-ignore-duplicate t)
|
||||||
|
|
||||||
|
;;--------;;
|
||||||
|
;; AFTER ;;
|
||||||
|
;;--------;;
|
||||||
(after! 'treemacs
|
(after! 'treemacs
|
||||||
(define-key treemacs-mode-map [mouse-1] #'treemacs-single-click-expand-action))
|
(define-key treemacs-mode-map [mouse-1] #'treemacs-single-click-expand-action))
|
||||||
|
|
||||||
;;; KEYBINDINGS
|
;;--------------;;
|
||||||
|
;; KEYBINDINGS ;;
|
||||||
|
;;--------------;;
|
||||||
|
(define-key! "<mouse-9>" #'+popup/toggle)
|
||||||
|
|
||||||
(map! :leader
|
(map! :leader
|
||||||
(:prefix ("o" . "+open")
|
(:prefix ("o" . "+open")
|
||||||
:desc "Launch lsp-ui-imenu"
|
:desc "Launch lsp-ui-imenu"
|
||||||
"i" #'lsp-ui-imenu))
|
"i" #'lsp-ui-imenu))
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
:desc "Toggle lsp-ui-doc"
|
||||||
|
"c h" #'lsp-ui-doc-glance)
|
||||||
|
|
||||||
(map! :leader
|
(map! :leader
|
||||||
(:prefix ("c" . "+code")
|
(:prefix ("c" . "+code")
|
||||||
:desc "LSP Peek"
|
:desc "LSP Peek"
|
||||||
@@ -264,6 +267,14 @@
|
|||||||
:desc "Find definitions"
|
:desc "Find definitions"
|
||||||
"d" #'lsp-ui-peek-find-definitions)))
|
"d" #'lsp-ui-peek-find-definitions)))
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
:desc "Toggle vterm"
|
||||||
|
"t t" #'+vterm/toggle)
|
||||||
|
|
||||||
|
(map! :leader
|
||||||
|
:desc "Toggle vterm"
|
||||||
|
"t p" #'+popup/toggle)
|
||||||
|
|
||||||
(map! :leader
|
(map! :leader
|
||||||
:desc "nohls"
|
:desc "nohls"
|
||||||
"s c" #'evil-ex-nohighlight)
|
"s c" #'evil-ex-nohighlight)
|
||||||
|
|||||||
0
doom/config.org
Normal file
0
doom/config.org
Normal file
@@ -3,7 +3,7 @@
|
|||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(package-selected-packages '(wakatime-mode)))
|
'(warning-suppress-types '((doom-init-ui-hook))))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
|||||||
76
doom/init.el
76
doom/init.el
@@ -4,8 +4,8 @@
|
|||||||
;; in. Remember to run 'doom sync' after modifying it!
|
;; in. Remember to run 'doom sync' after modifying it!
|
||||||
|
|
||||||
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
||||||
;; documentation. There you'll find a "Module Index" link where you'll find
|
;; documentation. There you'll find a link to Doom's Module Index where all
|
||||||
;; a comprehensive list of Doom's modules and what flags they support.
|
;; of our modules are listed, including what flags they support.
|
||||||
|
|
||||||
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
||||||
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
||||||
@@ -16,24 +16,25 @@
|
|||||||
|
|
||||||
(doom! :input
|
(doom! :input
|
||||||
;;chinese
|
;;chinese
|
||||||
japanese
|
;;japanese
|
||||||
;;layout ; auie,ctsrnm is the superior home row
|
;;layout ; auie,ctsrnm is the superior home row
|
||||||
|
|
||||||
:completion
|
:completion
|
||||||
|
(company +childframe) ; the ultimate code completion backend
|
||||||
;;helm ; the *other* search engine for love and life
|
;;helm ; the *other* search engine for love and life
|
||||||
;;ido ; the other *other* search engine...
|
;;ido ; the other *other* search engine...
|
||||||
;;ivy ; a search engine for love and life
|
;;ivy ; a search engine for love and life
|
||||||
(vertico +icons) ; the search engine of the future
|
vertico ; the search engine of the future
|
||||||
|
|
||||||
:ui
|
:ui
|
||||||
;; deft ; notational velocity for Emacs
|
;;deft ; notational velocity for Emacs
|
||||||
doom ; what makes DOOM look the way it does
|
doom ; what makes DOOM look the way it does
|
||||||
doom-dashboard ; a nifty splash screen for Emacs
|
doom-dashboard ; a nifty splash screen for Emacs
|
||||||
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||||
(emoji +unicode +github +ascii) ; 🙂
|
(emoji +unicode +ascii +github) ; 🙂
|
||||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||||
;;hydra
|
;;hydra
|
||||||
indent-guides ; highlighted indent columns
|
;;indent-guides ; highlighted indent columns
|
||||||
(ligatures +fira) ; ligatures and symbols to make your code pretty again
|
(ligatures +fira) ; ligatures and symbols to make your code pretty again
|
||||||
minimap ; show a map of the code on the side
|
minimap ; show a map of the code on the side
|
||||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||||
@@ -54,15 +55,15 @@
|
|||||||
(evil +everywhere); come to the dark side, we have cookies
|
(evil +everywhere); come to the dark side, we have cookies
|
||||||
file-templates ; auto-snippets for empty files
|
file-templates ; auto-snippets for empty files
|
||||||
fold ; (nigh) universal code folding
|
fold ; (nigh) universal code folding
|
||||||
(format +onsave) ; automated prettiness
|
;; (format +onsave) ; automated prettiness
|
||||||
;;god ; run Emacs commands without modifier keys
|
;;god ; run Emacs commands without modifier keys
|
||||||
;;lispy ; vim for lisp, for people who don't like vim
|
;;lispy ; vim for lisp, for people who don't like vim
|
||||||
multiple-cursors ; editing in many places at once
|
;;multiple-cursors ; editing in many places at once
|
||||||
;;objed ; text object editing for the innocent
|
;;objed ; text object editing for the innocent
|
||||||
;;parinfer ; turn lisp into python, sort of
|
;;parinfer ; turn lisp into python, sort of
|
||||||
;;rotate-text ; cycle region at point between text candidates
|
;;rotate-text ; cycle region at point between text candidates
|
||||||
snippets ; my elves. They type so I don't have to
|
snippets ; my elves. They type so I don't have to
|
||||||
word-wrap ; soft wrapping with language-aware indent
|
;;word-wrap ; soft wrapping with language-aware indent
|
||||||
|
|
||||||
:emacs
|
:emacs
|
||||||
(dired +icons) ; making dired pretty [functional]
|
(dired +icons) ; making dired pretty [functional]
|
||||||
@@ -78,31 +79,33 @@
|
|||||||
vterm ; the best terminal emulation in Emacs
|
vterm ; the best terminal emulation in Emacs
|
||||||
|
|
||||||
:checkers
|
:checkers
|
||||||
syntax ; tasing you for every semicolon you forget
|
(syntax +childframe) ; tasing you for every semicolon you forget
|
||||||
(spell +flyspell) ; tasing you for misspelling mispelling
|
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||||
;;grammar ; tasing grammar mistake every you make
|
;;grammar ; tasing grammar mistake every you make
|
||||||
|
|
||||||
:tools
|
:tools
|
||||||
;;ansible
|
ansible
|
||||||
debugger ; FIXME stepping through code, to help you add bugs
|
;;biblio ; Writes a PhD for you (citation needed)
|
||||||
|
;;debugger ; FIXME stepping through code, to help you add bugs
|
||||||
direnv
|
direnv
|
||||||
docker
|
(docker +lsp)
|
||||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||||
ein ; tame Jupyter notebooks with emacs
|
ein ; tame Jupyter notebooks with emacs
|
||||||
(eval +overlay) ; run code, run (also, repls)
|
(eval +overlay) ; run code, run (also, repls)
|
||||||
gist ; interacting with github gists
|
gist ; interacting with github gists
|
||||||
lookup ; navigate your code and its documentation
|
lookup ; navigate your code and its documentation
|
||||||
lsp ; M-x vscode
|
(lsp +peek) ; M-x vscode
|
||||||
magit ; a git porcelain for Emacs
|
magit ; a git porcelain for Emacs
|
||||||
make ; run make tasks from Emacs
|
make ; run make tasks from Emacs
|
||||||
(pass +auth) ; password manager for nerds
|
;;pass ; password manager for nerds
|
||||||
pdf ; pdf enhancements
|
pdf ; pdf enhancements
|
||||||
;;prodigy ; FIXME managing external services & code builders
|
;;prodigy ; FIXME managing external services & code builders
|
||||||
rgb ; creating color strings
|
rgb ; creating color strings
|
||||||
;;taskrunner ; taskrunner for all your projects
|
;;taskrunner ; taskrunner for all your projects
|
||||||
;;terraform ; infrastructure as code
|
;;terraform ; infrastructure as code
|
||||||
;;tmux ; an API for interacting with tmux
|
tmux ; an API for interacting with tmux
|
||||||
upload ; map local to remote projects via ssh/ftp
|
;;upload ; map local to remote projects via ssh/ftp
|
||||||
|
tree-sitter
|
||||||
|
|
||||||
:os
|
:os
|
||||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||||
@@ -111,12 +114,12 @@
|
|||||||
:lang
|
:lang
|
||||||
;;agda ; types of types of types of types...
|
;;agda ; types of types of types of types...
|
||||||
;;beancount ; mind the GAAP
|
;;beancount ; mind the GAAP
|
||||||
(cc +lsp) ; C > C++ == 1
|
(cc +lsp) ; C > C++ == 1
|
||||||
;;clojure ; java with a lisp
|
;;clojure ; java with a lisp
|
||||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
common-lisp ; if you've seen one lisp, you've seen them all
|
||||||
;;coq ; proofs-as-programs
|
;;coq ; proofs-as-programs
|
||||||
;;crystal ; ruby at the speed of c
|
;;crystal ; ruby at the speed of c
|
||||||
;;csharp ; unity, .NET, and mono shenanigans
|
(csharp +lsp) ; unity, .NET, and mono shenanigans
|
||||||
data ; config/data formats
|
data ; config/data formats
|
||||||
;;(dart +flutter) ; paint ui and not much else
|
;;(dart +flutter) ; paint ui and not much else
|
||||||
;;dhall
|
;;dhall
|
||||||
@@ -127,22 +130,23 @@
|
|||||||
;;ess ; emacs speaks statistics
|
;;ess ; emacs speaks statistics
|
||||||
;;factor
|
;;factor
|
||||||
;;faust ; dsp, but you get to keep your soul
|
;;faust ; dsp, but you get to keep your soul
|
||||||
|
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||||
;;fsharp ; ML stands for Microsoft's Language
|
;;fsharp ; ML stands for Microsoft's Language
|
||||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||||
;;gdscript ; the language you waited for
|
;;gdscript ; the language you waited for
|
||||||
;;(go +lsp) ; the hipster dialect
|
(go +lsp) ; the hipster dialect
|
||||||
;;(haskell +lsp) ; a language that's lazier than I am
|
(haskell +lsp) ; a language that's lazier than I am
|
||||||
;;hy ; readability of scheme w/ speed of python
|
;;hy ; readability of scheme w/ speed of python
|
||||||
;;idris ; a language you can depend on
|
;;idris ; a language you can depend on
|
||||||
json ; At least it ain't XML
|
(json +lsp) ; At least it ain't XML
|
||||||
(java +meghanada) ; the poster child for carpal tunnel syndrome
|
(java +lsp) ; the poster child for carpal tunnel syndrome
|
||||||
(javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
|
(javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
|
||||||
;;julia ; a better, faster MATLAB
|
;;julia ; a better, faster MATLAB
|
||||||
;;kotlin ; a better, slicker Java(Script)
|
;;kotlin ; a better, slicker Java(Script)
|
||||||
;;latex ; writing papers in Emacs has never been so fun
|
;;latex ; writing papers in Emacs has never been so fun
|
||||||
;;lean ; for folks with too much to prove
|
;;lean ; for folks with too much to prove
|
||||||
;;ledger ; be audit you can be
|
;;ledger ; be audit you can be
|
||||||
;;lua ; one-based indices? one-based indices
|
(lua +lsp) ; one-based indices? one-based indices
|
||||||
(markdown +grip) ; writing docs for people to ignore
|
(markdown +grip) ; writing docs for people to ignore
|
||||||
;;nim ; python + lisp at the speed of c
|
;;nim ; python + lisp at the speed of c
|
||||||
nix ; I hereby declare "nix geht mehr!"
|
nix ; I hereby declare "nix geht mehr!"
|
||||||
@@ -151,38 +155,38 @@
|
|||||||
;;php ; perl's insecure younger brother
|
;;php ; perl's insecure younger brother
|
||||||
;;plantuml ; diagrams for confusing people more
|
;;plantuml ; diagrams for confusing people more
|
||||||
;;purescript ; javascript, but functional
|
;;purescript ; javascript, but functional
|
||||||
(python +lsp +pyenv) ; beautiful is better than ugly
|
(python +lsp +pyright) ; beautiful is better than ugly
|
||||||
;;qt ; the 'cutest' gui framework ever
|
;;qt ; the 'cutest' gui framework ever
|
||||||
;;racket ; a DSL for DSLs
|
;;racket ; a DSL for DSLs
|
||||||
;;raku ; the artist formerly known as perl6
|
;;raku ; the artist formerly known as perl6
|
||||||
;;rest ; Emacs as a REST client
|
;;rest ; Emacs as a REST client
|
||||||
;;rst ; ReST in peace
|
;;rst ; ReST in peace
|
||||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||||
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||||
;;scala ; java, but good
|
;;scala ; java, but good
|
||||||
;;(scheme +guile) ; a fully conniving family of lisps
|
;;(scheme +guile) ; a fully conniving family of lisps
|
||||||
(sh +lsp) ; she sells {ba,z,fi}sh shells on the C xor
|
(sh +lsp +tree-sitter) ; she sells {ba,z,fi}sh shells on the C xor
|
||||||
;;sml
|
;;sml
|
||||||
;;solidity ; do you need a blockchain? No.
|
;;solidity ; do you need a blockchain? No.
|
||||||
;;swift ; who asked for emoji variables?
|
;;swift ; who asked for emoji variables?
|
||||||
;;terra ; Earth and Moon in alignment for performance.
|
;;terra ; Earth and Moon in alignment for performance.
|
||||||
;;web ; the tubes
|
web ; the tubes
|
||||||
;;yaml ; JSON, but readable
|
(yaml +lsp) ; JSON, but readable
|
||||||
;;zig ; C, but simpler
|
;;zig ; C, but simpler
|
||||||
|
|
||||||
:email
|
:email
|
||||||
(mu4e +org +gmail)
|
;;(mu4e +org +gmail)
|
||||||
;;notmuch
|
;;notmuch
|
||||||
;;(wanderlust +gmail)
|
;;(wanderlust +gmail)
|
||||||
|
|
||||||
:app
|
:app
|
||||||
calendar
|
;;calendar
|
||||||
;;emms
|
;;emms
|
||||||
;;everywhere ; *leave* Emacs!? You must be joking
|
;;everywhere ; *leave* Emacs!? You must be joking
|
||||||
;;irc ; how neckbeards socialize
|
;;irc ; how neckbeards socialize
|
||||||
;;(rss +org) ; emacs as an RSS reader
|
;;(rss +org) ; emacs as an RSS reader
|
||||||
twitter ; twitter client https://twitter.com/vnought
|
;;twitter ; twitter client https://twitter.com/vnought
|
||||||
|
|
||||||
:config
|
:config
|
||||||
;;literate
|
;; literate
|
||||||
(default +bindings +smartparens))
|
(default +bindings +smartparens))
|
||||||
|
|||||||
@@ -49,20 +49,15 @@
|
|||||||
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
||||||
;(unpin! t)
|
;(unpin! t)
|
||||||
|
|
||||||
(package! lsp-jedi)
|
|
||||||
(package! flycheck)
|
|
||||||
(package! org-bullets)
|
(package! org-bullets)
|
||||||
(package! wakatime-mode)
|
(package! wakatime-mode)
|
||||||
(package! py-isort)
|
(package! py-isort)
|
||||||
(package! python-pytest)
|
(package! python-pytest)
|
||||||
(package! python-docstring)
|
(package! python-docstring)
|
||||||
(package! py-autopep8)
|
|
||||||
(package! fira-code-mode)
|
(package! fira-code-mode)
|
||||||
(package! lsp-ui)
|
|
||||||
(package! gif-screencast)
|
|
||||||
(package! treemacs-icons-dired)
|
(package! treemacs-icons-dired)
|
||||||
(package! howdoi)
|
(package! flycheck)
|
||||||
(package! persist)
|
(package! shfmt)
|
||||||
(package! pipenv)
|
(package! lsp-jedi)
|
||||||
;; (package! lsp-python-ms)
|
(package! copilot
|
||||||
(package! lsp-pyright)
|
:recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist")))
|
||||||
|
|||||||
51
dotfiles/.environment
Normal file
51
dotfiles/.environment
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
export XDG_CACHE_DIR="$HOME/.cache"
|
||||||
|
export XDG_CACHE_HOME="$HOME/.cache"
|
||||||
|
export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
|
export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
|
export XDG_STATE_HOME="$HOME/.local/state"
|
||||||
|
export ARCHFLAGS="-arch x86_64"
|
||||||
|
export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
|
||||||
|
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
|
||||||
|
export EDITOR=nvim
|
||||||
|
export GNUPGHOME="$HOME"/.gnupg
|
||||||
|
export GOPATH="$XDG_DATA_HOME"/go
|
||||||
|
export GRIPHOME="$XDG_CONFIG_HOME/grip"
|
||||||
|
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
|
||||||
|
export GTK_RC_FILES="$XDG_CONFIG_HOME"/gtk-1.0/gtkrc
|
||||||
|
export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME"/jupyter
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
export MANPAGER='nvim +Man!'
|
||||||
|
export MANPATH="/usr/local/man:$MANPATH"
|
||||||
|
export MINIKUBE_HOME="$XDG_DATA_HOME"/minikube
|
||||||
|
export MPLAYER_HOME="$XDG_CONFIG_HOME"/mplayer
|
||||||
|
export MYSQL_HISTFILE="$XDG_DATA_HOME"/mysql_history
|
||||||
|
export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history
|
||||||
|
export PATH="$HOME/.bin:$PATH"
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
export PATH="$HOME/Projects/Python/Sudasong/src/:$PATH"
|
||||||
|
export PATH="$HOME/Work/rofi/:$PATH"
|
||||||
|
export PATH="$HOME/Work/scripts:$PATH"
|
||||||
|
export PATH="$HOME/scripts:$PATH"
|
||||||
|
export PATH=$PATH:/home/sudacode/.emacs.d/bin
|
||||||
|
export PYTHONSTARTUP="${XDG_CONFIG_HOME}/python/pythonrc"
|
||||||
|
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
|
||||||
|
export SQLITE_HISTORY="$XDG_CACHE_HOME"/sqlite_history
|
||||||
|
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/yubikey-agent/yubikey-agent.sock"
|
||||||
|
export TERM=xterm-256color
|
||||||
|
export TERMINFO="$XDG_DATA_HOME"/terminfo
|
||||||
|
export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo
|
||||||
|
export VISUAL=nvim
|
||||||
|
export WORKON_HOME="$XDG_DATA_HOME/virtualenvs"
|
||||||
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
|
||||||
|
export _Z_DATA="$XDG_DATA_HOME/z"
|
||||||
|
## ibus config
|
||||||
|
# export GTK_IM_MODULE=ibus
|
||||||
|
# # will make libreoffice work
|
||||||
|
export XMODIFIERS=@im=ibus
|
||||||
|
export QT_IM_MODULE=ibus
|
||||||
|
export QT4_IM_MODULE=xim
|
||||||
|
export GLFW_IM_MODULE=ibus
|
||||||
|
ibus-daemon -drx
|
||||||
|
|
||||||
|
# vim: ft=zsh
|
||||||
337
dotfiles/.zshrc
337
dotfiles/.zshrc
@@ -1,180 +1,16 @@
|
|||||||
# ZSH_THEME="spaceship" # set by `omz`
|
[ -f ~/.environment ] && . ~/.environment
|
||||||
|
|
||||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
|
||||||
# Initialization code that may require console input (password prompts, [y/n]
|
|
||||||
# confirmations, etc.) must go above this block, everything else may go below.
|
|
||||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#If you come from bash you might have to change your $PATH.
|
|
||||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
|
||||||
|
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
|
||||||
export PATH="$HOME/scripts:$PATH"
|
|
||||||
export PATH="$HOME/Work/scripts:$PATH"
|
|
||||||
export PATH="$HOME/Work/rofi/:$PATH"
|
|
||||||
export PATH="$HOME/.bin:$PATH"
|
|
||||||
export PATH="$HOME/Projects/Python/Sudasong/src/:$PATH"
|
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
|
||||||
# export EDITOR=vim
|
|
||||||
# export VISUAL=vim
|
|
||||||
export EDITOR=nvim
|
|
||||||
export VISUAL=nvim
|
|
||||||
# export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
|
||||||
export MANPAGER='nvim +Man!'
|
|
||||||
|
|
||||||
# export FZF_DEFAULT_COMMAND='fd --type f'
|
|
||||||
# follow symbolic links and no git
|
|
||||||
# export FZF_DEFAULT_COMMAND='fd --type f --follow --exclude .git'
|
|
||||||
|
|
||||||
if [ -f ~/.bash_aliases ]; then
|
|
||||||
. $HOME/.bash_aliases
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f ~/.aliases ]; then
|
|
||||||
. $HOME/.aliases
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f ~/Work/.aliases ]; then
|
|
||||||
. $HOME/Work/.aliases
|
|
||||||
fi
|
|
||||||
|
|
||||||
source ~/.bash_aliases
|
|
||||||
|
|
||||||
#POWERLEVEL9K_MODE='nerdfont'
|
|
||||||
#POWERLEVEL9K_MODE='awesome-fontconfig'
|
|
||||||
POWERLEVEL9K_MODE='nerdfont-complete'
|
|
||||||
#POWERLEVEL9K_MODE='awesome-patched, nerdfont-complete'
|
|
||||||
|
|
||||||
# Set name of the theme to load --- if set to "random", it will
|
|
||||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
|
||||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
|
||||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
|
||||||
#ZSH_THEME="powerlevel9k/powerlevel9k"
|
|
||||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
|
||||||
# ZSH_THEME="random" # set by `omz`
|
|
||||||
#ZSH_THEME="agnoster"
|
|
||||||
# ZSH_THEMES="spaceship"
|
|
||||||
|
|
||||||
# Set list of themes to pick from when loading at random
|
|
||||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
|
||||||
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
|
|
||||||
# If set to an empty array, this variable will have no effect.
|
|
||||||
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
|
||||||
|
|
||||||
# Uncomment the following line to use case-sensitive completion.
|
|
||||||
# CASE_SENSITIVE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to use hyphen-insensitive completion.
|
|
||||||
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
|
||||||
# HYPHEN_INSENSITIVE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
|
||||||
# DISABLE_AUTO_UPDATE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to automatically update without prompting.
|
|
||||||
# DISABLE_UPDATE_PROMPT="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to change how often to auto-update (in days).
|
|
||||||
# export UPDATE_ZSH_DAYS=13
|
|
||||||
|
|
||||||
# Uncomment the following line if pasting URLs and other text is messed up.
|
|
||||||
# DISABLE_MAGIC_FUNCTIONS=true
|
|
||||||
|
|
||||||
# Uncomment the following line to disable colors in ls.
|
|
||||||
# DISABLE_LS_COLORS="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to disable auto-setting terminal title.
|
|
||||||
# DISABLE_AUTO_TITLE="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to enable command auto-correction.
|
|
||||||
ENABLE_CORRECTION="true"
|
|
||||||
|
|
||||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
|
||||||
COMPLETION_WAITING_DOTS="true"
|
|
||||||
|
|
||||||
# Uncomment the following line if you want to disable marking untracked files
|
|
||||||
# under VCS as dirty. This makes repository status check for large repositories
|
|
||||||
# much, much faster.
|
|
||||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
|
||||||
|
|
||||||
# Uncomment the following line if you want to change the command execution time
|
|
||||||
# stamp shown in the history command output.
|
|
||||||
# You can set one of the optional three formats:
|
|
||||||
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
|
||||||
# or set a custom format using the strftime function format specifications,
|
|
||||||
# see 'man strftime' for details.
|
|
||||||
# HIST_STAMPS="mm/dd/yyyy"
|
|
||||||
HISTSIZE=1000
|
|
||||||
HISTFILESIZE=2000
|
|
||||||
HISTCONTROL=ignoreboth
|
|
||||||
|
|
||||||
# Would you like to use another custom folder than $ZSH/custom?
|
|
||||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
|
||||||
|
|
||||||
|
|
||||||
# Which plugins would you like to load?
|
|
||||||
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
|
|
||||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
|
||||||
plugins=(zsh-autosuggestions zsh-syntax-highlighting vi-mode git zsh-z)
|
|
||||||
# plugins=(zsh-syntax-highlighting vi-mode git zsh-z)
|
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
|
||||||
#source ~/.oh-my-zsh/plugins/git/git.plugin.zsh
|
|
||||||
|
|
||||||
|
|
||||||
# User configuration
|
|
||||||
|
|
||||||
export MANPATH="/usr/local/man:$MANPATH"
|
|
||||||
|
|
||||||
# You may need to manually set your language environment
|
|
||||||
export LANG=en_US.UTF-8
|
|
||||||
|
|
||||||
# Preferred editor for local and remote sessions
|
|
||||||
# if [[ -n $SSH_CONNECTION ]]; then
|
|
||||||
# export EDITOR='vim'
|
|
||||||
# else
|
|
||||||
# export EDITOR='vim'
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# Compilation flags
|
|
||||||
export ARCHFLAGS="-arch x86_64"
|
|
||||||
|
|
||||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
|
||||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
|
||||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
|
||||||
# For a full list of active aliases, run `alias`.
|
|
||||||
#
|
|
||||||
# Example aliases
|
|
||||||
# alias zshconfig="mate ~/.zshrc"
|
|
||||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
|
||||||
|
|
||||||
|
|
||||||
export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin
|
|
||||||
|
|
||||||
# set battery stages and colors
|
|
||||||
POWERLEVEL9K_BATTERY_STAGES=(
|
|
||||||
$'▏ ▏' $'▎ ▏' $'▍ ▏' $'▌ ▏' $'▋ ▏' $'▊ ▏' $'▉ ▏' $'█ ▏'
|
|
||||||
$'█▏ ▏' $'█▎ ▏' $'█▍ ▏' $'█▌ ▏' $'█▋ ▏' $'█▊ ▏' $'█▉ ▏' $'██ ▏'
|
|
||||||
$'██ ▏' $'██▎ ▏' $'██▍ ▏' $'██▌ ▏' $'██▋ ▏' $'██▊ ▏' $'██▉ ▏' $'███ ▏'
|
|
||||||
$'███ ▏' $'███▎ ▏' $'███▍ ▏' $'███▌ ▏' $'███▋ ▏' $'███▊ ▏' $'███▉ ▏' $'████ ▏'
|
|
||||||
$'████ ▏' $'████▎▏' $'████▍▏' $'████▌▏' $'████▋▏' $'████▊▏' $'████▉▏' $'█████▏' )
|
|
||||||
|
|
||||||
POWERLEVEL9K_BATTERY_LEVEL_BACKGROUND=(red3 darkorange3 darkgoldenrod gold3 yellow3 chartreuse2 mediumspringgreen green3 green3 green4 darkgreen)
|
|
||||||
POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND=green3
|
|
||||||
POWERLEVEL9K_BATTERY_LOW_FOREGROUND='226'
|
|
||||||
POWERLEVEL9K_BATTERY_CHARGED_FOREGROUND='021'
|
|
||||||
POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND='021'
|
|
||||||
POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
|
|
||||||
POWERLEVEL9K_BATTERY_VERBOSE=true
|
|
||||||
|
|
||||||
LS_COLORS="di=42;1;90:*.mp3=1;32;41:fi=0;91:*.c=1;96:*.js=1;93:*.h=1;35:ex=1;32:*.html=1;36:*.cpp=1;96:*.txt=1;91:*Makefile=1;95:*.css=1;36:*.as=1;36:ow=1;42;93:*.ttf=0;91:*.png=0;91:*README=4;31:*.jpg=0;91:*.md=4;31:*.json=1;94:*.as=0;35:*.obj=0;35:*.correct=1;94:*.py=1;91:*.ipynb=3;91"
|
LS_COLORS="di=42;1;90:*.mp3=1;32;41:fi=0;91:*.c=1;96:*.js=1;93:*.h=1;35:ex=1;32:*.html=1;36:*.cpp=1;96:*.txt=1;91:*Makefile=1;95:*.css=1;36:*.as=1;36:ow=1;42;93:*.ttf=0;91:*.png=0;91:*README=4;31:*.jpg=0;91:*.md=4;31:*.json=1;94:*.as=0;35:*.obj=0;35:*.correct=1;94:*.py=1;91:*.ipynb=3;91"
|
||||||
|
PS2="===>"
|
||||||
|
|
||||||
# # ex = EXtractor for all kinds of archives
|
bindkey '^ ' autosuggest-accept
|
||||||
# # usage: ex <file>
|
|
||||||
|
# ex = EXtractor for all kinds of archives
|
||||||
|
# usage: ex <file>
|
||||||
ex ()
|
ex ()
|
||||||
{
|
{
|
||||||
if [ -f $1 ] ; then
|
if [ -f $1 ] ; then
|
||||||
@@ -199,109 +35,90 @@ ex ()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Codi
|
|
||||||
# Usage: codi [filetype] [filename]
|
|
||||||
codi() {
|
|
||||||
local syntax="${1:-python}"
|
|
||||||
shift
|
|
||||||
vim -c \
|
|
||||||
"let g:startify_disable_at_vimenter = 1 |\
|
|
||||||
set bt=nofile ls=0 noru nonu nornu |\
|
|
||||||
hi ColorColumn ctermbg=NONE |\
|
|
||||||
hi VertSplit ctermbg=NONE |\
|
|
||||||
Codi $syntax" "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
get_git_commit_hash() {
|
get_git_commit_hash() {
|
||||||
git rev-parse HEAD | cut -c -12
|
git rev-parse HEAD | cut -c -12
|
||||||
}
|
}
|
||||||
|
|
||||||
export SPACESHIP_TIME_SHOW=true
|
if [ -f ~/.bash_aliases ]; then
|
||||||
export SPACESHIP_GCLOUD_SHOW=false
|
. $HOME/.bash_aliases
|
||||||
export SPACESHIP_EXIT_CODE_SHOW=true
|
fi
|
||||||
export SPACESHIP_TIME_COLOR=blue
|
if [ -f ~/.aliases ]; then
|
||||||
export SPACESHIP_VENV_PREFIX=" "
|
. $HOME/.aliases
|
||||||
export SPACESHIP_DIR_TRUNC=0
|
fi
|
||||||
# eval spaceship_vi_mode_enable
|
if [ -f ~/Work/.aliases ]; then
|
||||||
|
. $HOME/Work/.aliases
|
||||||
|
fi
|
||||||
|
|
||||||
### for use with xserver... causes screenfetch and neofetch to not work unless xserver is running
|
[[ "$TERM" == "xterm-kitty" ]] && alias ssh='kitty +kitten ssh'
|
||||||
#export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0
|
|
||||||
#
|
|
||||||
#sudo /etc/init.d/dbus start &> /dev/null
|
|
||||||
|
|
||||||
PS2="===>"
|
#POWERLEVEL9K_MODE='nerdfont'
|
||||||
|
#POWERLEVEL9K_MODE='awesome-fontconfig'
|
||||||
|
POWERLEVEL9K_MODE='nerdfont-complete'
|
||||||
|
#POWERLEVEL9K_MODE='awesome-patched, nerdfont-complete'
|
||||||
|
|
||||||
|
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||||
|
# ZSH_THEME="random"
|
||||||
|
# ZSH_THEMES="spaceship"
|
||||||
|
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
||||||
|
# Uncomment the following line to use case-sensitive completion.
|
||||||
|
# CASE_SENSITIVE="true"
|
||||||
|
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
||||||
|
# HYPHEN_INSENSITIVE="true"
|
||||||
|
# DISABLE_AUTO_UPDATE="true"
|
||||||
|
# DISABLE_UPDATE_PROMPT="true"
|
||||||
|
# export UPDATE_ZSH_DAYS=13
|
||||||
|
# DISABLE_MAGIC_FUNCTIONS=true
|
||||||
|
# DISABLE_LS_COLORS="true"
|
||||||
|
# DISABLE_AUTO_TITLE="true"
|
||||||
|
ENABLE_CORRECTION="false"
|
||||||
|
COMPLETION_WAITING_DOTS="true"
|
||||||
|
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
|
# Uncomment the following line if you want to change the command execution time
|
||||||
|
# stamp shown in the history command output.
|
||||||
|
# You can set one of the optional three formats:
|
||||||
|
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||||
|
# or set a custom format using the strftime function format specifications,
|
||||||
|
# see 'man strftime' for details.
|
||||||
|
# HIST_STAMPS="mm/dd/yyyy"
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# Would you like to use another custom folder than $ZSH/custom?
|
||||||
|
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||||
|
|
||||||
|
# Which plugins would you like to load?
|
||||||
|
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
|
||||||
|
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||||
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
|
plugins=(zsh-autosuggestions zsh-syntax-highlighting vi-mode git zsh-z)
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# set battery stages and colors
|
||||||
|
POWERLEVEL9K_BATTERY_STAGES=(
|
||||||
|
$'▏ ▏' $'▎ ▏' $'▍ ▏' $'▌ ▏' $'▋ ▏' $'▊ ▏' $'▉ ▏' $'█ ▏'
|
||||||
|
$'█▏ ▏' $'█▎ ▏' $'█▍ ▏' $'█▌ ▏' $'█▋ ▏' $'█▊ ▏' $'█▉ ▏' $'██ ▏'
|
||||||
|
$'██ ▏' $'██▎ ▏' $'██▍ ▏' $'██▌ ▏' $'██▋ ▏' $'██▊ ▏' $'██▉ ▏' $'███ ▏'
|
||||||
|
$'███ ▏' $'███▎ ▏' $'███▍ ▏' $'███▌ ▏' $'███▋ ▏' $'███▊ ▏' $'███▉ ▏' $'████ ▏'
|
||||||
|
$'████ ▏' $'████▎▏' $'████▍▏' $'████▌▏' $'████▋▏' $'████▊▏' $'████▉▏' $'█████▏' )
|
||||||
|
|
||||||
|
POWERLEVEL9K_BATTERY_LEVEL_BACKGROUND=(red3 darkorange3 darkgoldenrod gold3 yellow3 chartreuse2 mediumspringgreen green3 green3 green4 darkgreen)
|
||||||
|
POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND=green3
|
||||||
|
POWERLEVEL9K_BATTERY_LOW_FOREGROUND='226'
|
||||||
|
POWERLEVEL9K_BATTERY_CHARGED_FOREGROUND='021'
|
||||||
|
POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND='021'
|
||||||
|
POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
|
||||||
|
POWERLEVEL9K_BATTERY_VERBOSE=true
|
||||||
|
|
||||||
# # Add gem to PATH
|
|
||||||
# export PATH=$PATH:/home/sudacode/.gem/ruby/2.7.0/bin
|
|
||||||
#
|
|
||||||
# # Add go to PATH
|
|
||||||
# export PATH=$PATH:/home/sudacode/go/bin
|
|
||||||
#
|
|
||||||
# alias freud='cd /home/sudacode/'
|
|
||||||
#
|
|
||||||
# # Add yarn to PATH
|
|
||||||
# export PATH="$PATH:`yarn global bin`"
|
|
||||||
#
|
|
||||||
# # set terminal color to 256 color
|
|
||||||
export TERM=xterm-256color
|
|
||||||
#
|
|
||||||
# export PATH=$PATH:/home/sudacode/.local/bin
|
|
||||||
#
|
|
||||||
# add emacs to path
|
|
||||||
export PATH=$PATH:/home/sudacode/.emacs.d/bin
|
|
||||||
#
|
|
||||||
#Enable tab completions for flags in colorls
|
|
||||||
source $(dirname $(gem which colorls))/tab_complete.sh
|
source $(dirname $(gem which colorls))/tab_complete.sh
|
||||||
#
|
|
||||||
# # add pythno to PATH
|
|
||||||
# export PATH="$PATH:/usr/bin/python"
|
|
||||||
#
|
|
||||||
# # add jdk-8 to path
|
|
||||||
# export PATH="$PATH:/usr/lib/jvm/java-8-openjdk/bin"
|
|
||||||
# export CLASSPATH="$CLASSPATH:/usr/share/java/mariadb-jdbc/mariadb-java-client.jar"
|
|
||||||
|
|
||||||
## ibus config
|
|
||||||
# export GTK_IM_MODULE=ibus
|
|
||||||
# # will make libreoffice work
|
|
||||||
export XMODIFIERS=@im=ibus
|
|
||||||
export QT_IM_MODULE=ibus
|
|
||||||
export QT4_IM_MODULE=xim
|
|
||||||
ibus-daemon -drx
|
|
||||||
|
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
|
||||||
export XDG_CACHE_DIR="$HOME/.cache"
|
|
||||||
# export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
|
||||||
|
|
||||||
bindkey '^ ' autosuggest-accept
|
|
||||||
|
|
||||||
|
|
||||||
# source the Xmodmap file to get custom keybindings
|
|
||||||
# [[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
|
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
# ~/scripts/random_starter.sh
|
|
||||||
|
|
||||||
# >>> conda initialize >>>
|
|
||||||
# # !! Contents within this block are managed by 'conda init' !!
|
|
||||||
# __conda_setup="$('/home/sudacode/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
|
||||||
# if [ $? -eq 0 ]; then
|
|
||||||
# eval "$__conda_setup"
|
|
||||||
# else
|
|
||||||
# if [ -f "/home/sudacode/anaconda3/etc/profile.d/conda.sh" ]; then
|
|
||||||
# . "/home/sudacode/anaconda3/etc/profile.d/conda.sh"
|
|
||||||
# else
|
|
||||||
# export PATH="/home/sudacode/anaconda3/bin:$PATH"
|
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
# unset __conda_setup
|
|
||||||
# # <<< conda initialize <<<
|
|
||||||
|
|
||||||
# neofetch
|
|
||||||
|
|
||||||
# added by Snowflake SnowSQL installer
|
# added by Snowflake SnowSQL installer
|
||||||
export PATH=/home/sudacode/.bin:$PATH
|
export PATH=/home/sudacode/.bin:$PATH
|
||||||
|
|
||||||
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/yubikey-agent/yubikey-agent.sock"
|
|
||||||
|
|
||||||
eval $(thefuck --alias)
|
eval $(thefuck --alias)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
origin = top-right
|
origin = top-right
|
||||||
|
|
||||||
# Offset from the origin
|
# Offset from the origin
|
||||||
offset = 9x48
|
offset = 12x54
|
||||||
|
|
||||||
# Scale factor. It is auto-detected if value is 0.
|
# Scale factor. It is auto-detected if value is 0.
|
||||||
scale = 0
|
scale = 0
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
|
|
||||||
### Text ###
|
### Text ###
|
||||||
|
|
||||||
font = "mononoki-Regular Nerd Font Complete" 12
|
font = "JetBrainsMono Nerd Font Complete" 12
|
||||||
|
|
||||||
# The spacing between lines. If the height is smaller than the
|
# The spacing between lines. If the height is smaller than the
|
||||||
# font height, it will get raised to the font height.
|
# font height, it will get raised to the font height.
|
||||||
|
|||||||
2083
kitty/kitty.conf
Normal file
2083
kitty/kitty.conf
Normal file
File diff suppressed because it is too large
Load Diff
49
mime/mimeapps.list
Normal file
49
mime/mimeapps.list
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
[Added Associations]
|
||||||
|
application/xhtml+xml=org.qutebrowser.qutebrowser.desktop;firefox.desktop;qutebrowser.desktop;
|
||||||
|
image/gif=org.gnome.gThumb.desktop;org.qutebrowser.qutebrowser.desktop;gimp.desktop;org.kde.gwenview.desktop;okularApplication_kimgio.desktop;
|
||||||
|
inode/directory=org.kde.dolphin.desktop;thunar.desktop;
|
||||||
|
text/plain=notepadqq.desktop;nvim.desktop;vim.desktop;okularApplication_txt.desktop;xed.desktop;
|
||||||
|
video/mp4=mpv.desktop;vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
|
||||||
|
video/webm=mpv.desktop;vlc.desktop;io.github.celluloid_player.Celluloid.desktop;
|
||||||
|
video/x-matroska=mpv.desktop;vlc.desktop;
|
||||||
|
x-scheme-handler/http=firefox.desktop;org.qutebrowser.qutebrowser.desktop;
|
||||||
|
x-scheme-handler/https=firefox.desktop;org.qutebrowser.qutebrowser.desktop;
|
||||||
|
image/png=org.gnome.gThumb.desktop;feh.desktop;gimp.desktop;org.kde.gwenview.desktop;okularApplication_kimgio.desktop;
|
||||||
|
text/csv=libreoffice-calc.desktop;
|
||||||
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=libreoffice-calc.desktop;ms-office-online.desktop;
|
||||||
|
application/rss+xml=fluent-reader.desktop;
|
||||||
|
application/octet-stream=nvim.desktop;vim.desktop;emacsclient.desktop;
|
||||||
|
application/sql=notepadqq.desktop;nvim.desktop;gvim.desktop;
|
||||||
|
application/x-desktop=nvim.desktop;
|
||||||
|
application/x-ms-dos-executable=wine.desktop;
|
||||||
|
application/x-ms-shortcut=wine.desktop;
|
||||||
|
application/x-yaml=nvim.desktop;
|
||||||
|
text/vnd.trolltech.linguist=mpv.desktop;
|
||||||
|
x-scheme-handler/chrome=org.qutebrowser.qutebrowser.desktop;
|
||||||
|
text/html=org.qutebrowser.qutebrowser.desktop;
|
||||||
|
application/x-extension-htm=org.qutebrowser.qutebrowser.desktop;
|
||||||
|
application/x-extension-html=org.qutebrowser.qutebrowser.desktop;
|
||||||
|
application/x-extension-shtml=org.qutebrowser.qutebrowser.desktop;
|
||||||
|
application/x-extension-xhtml=org.qutebrowser.qutebrowser.desktop;
|
||||||
|
application/x-extension-xht=org.qutebrowser.qutebrowser.desktop;
|
||||||
|
application/pdf=org.qutebrowser.qutebrowser.desktop;org.inkscape.Inkscape.desktop;chromium.desktop;
|
||||||
|
|
||||||
|
[Default Applications]
|
||||||
|
application/xhtml+xml=org.qutebrowser.qutebrowser.desktop
|
||||||
|
inode/directory=thunar.desktop;
|
||||||
|
text/plain=nvim.desktop;
|
||||||
|
video/mp4=mpv.desktop;
|
||||||
|
video/webm=mpv.desktop;
|
||||||
|
x-scheme-handler/eclipse+command=_usr_lib_dbeaver_.desktop
|
||||||
|
x-scheme-handler/http=org.qutebrowser.qutebrowser.desktop
|
||||||
|
x-scheme-handler/https=org.qutebrowser.qutebrowser.desktop
|
||||||
|
x-scheme-handler/msteams=teams.desktop
|
||||||
|
x-scheme-handler/mailto=vivaldi-stable.desktop
|
||||||
|
x-scheme-handler/postman=Postman.desktop
|
||||||
|
x-scheme-handler/chrome=chromium.desktop
|
||||||
|
text/html=org.qutebrowser.qutebrowser.desktop
|
||||||
|
application/x-extension-htm=org.qutebrowser.qutebrowser.desktop
|
||||||
|
application/x-extension-html=org.qutebrowser.qutebrowser.desktop
|
||||||
|
application/x-extension-shtml=org.qutebrowser.qutebrowser.desktop
|
||||||
|
application/x-extension-xhtml=org.qutebrowser.qutebrowser.desktop
|
||||||
|
application/x-extension-xht=org.qutebrowser.qutebrowser.desktop
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
host = localhost
|
host = localhost
|
||||||
port = 6600
|
port = 6600
|
||||||
music-dir = /home/sudacode/Music/
|
music-dir = /jellyfin/music
|
||||||
oneline = false
|
oneline = false
|
||||||
scale = 600
|
scale = 600
|
||||||
timeout = 5
|
timeout = 5
|
||||||
|
|||||||
10
nvim/autocommands.vim
Normal file
10
nvim/autocommands.vim
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
" open at last location if possible
|
||||||
|
if has('autocmd')
|
||||||
|
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" open help and man pages in a vertical split
|
||||||
|
autocmd FileType help wincmd L
|
||||||
|
autocmd FileType man wincmd L
|
||||||
|
" make terminal not have line numbers
|
||||||
|
autocmd TermOpen * setlocal nonumber norelativenumber
|
||||||
333
nvim/init.vim
333
nvim/init.vim
@@ -1,271 +1,98 @@
|
|||||||
syntax enable
|
if has('autocmd')
|
||||||
filetype plugin on
|
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||||
set noshowmode "disable default vim insert text at bottom
|
|
||||||
set laststatus=2
|
|
||||||
set number
|
|
||||||
set colorcolumn=80
|
|
||||||
set tw=80
|
|
||||||
set shiftwidth=4
|
|
||||||
set tabstop=4
|
|
||||||
set autoindent
|
|
||||||
set ignorecase
|
|
||||||
set smartcase
|
|
||||||
set incsearch
|
|
||||||
set smartindent
|
|
||||||
set hlsearch
|
|
||||||
set ignorecase
|
|
||||||
set noerrorbells
|
|
||||||
set title
|
|
||||||
set mouse=a
|
|
||||||
set relativenumber
|
|
||||||
set splitright
|
|
||||||
set cursorline
|
|
||||||
set scrolloff=8
|
|
||||||
set sidescrolloff=8
|
|
||||||
set wildmenu " show candidates for vim commands with tab
|
|
||||||
set wildignore=*.o,*.obj,*.bak,*.exe
|
|
||||||
set background=dark
|
|
||||||
set showmatch
|
|
||||||
" set nocompatible " no more vi
|
|
||||||
set list
|
|
||||||
set listchars=tab:\ ,trail:
|
|
||||||
" set path from current directory and all directories under
|
|
||||||
set path=$PWD/**
|
|
||||||
set encoding=UTF-8
|
|
||||||
set guifont=FiraCode\ Nerd\ Font\ 18
|
|
||||||
set expandtab
|
|
||||||
" coc settings
|
|
||||||
set hidden
|
|
||||||
set nobackup
|
|
||||||
set nowritebackup
|
|
||||||
set cmdheight=2
|
|
||||||
set updatetime=300
|
|
||||||
set timeoutlen=400
|
|
||||||
" Don't pass messages to |ins-completion-menu|.
|
|
||||||
set shortmess+=c
|
|
||||||
|
|
||||||
" Install vim-plug if not found
|
|
||||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
|
||||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
|
||||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Run PlugInstall if there are missing plugins
|
" open help and man pages in a vertical split
|
||||||
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
|
||||||
\| PlugInstall --sync | source $MYVIMRC
|
|
||||||
\| endif
|
|
||||||
|
|
||||||
call plug#begin('~/.vim/plugged')
|
|
||||||
|
|
||||||
Plug 'ap/vim-css-color'
|
|
||||||
Plug 'github/copilot.vim'
|
|
||||||
Plug 'jiangmiao/auto-pairs'
|
|
||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
|
||||||
Plug 'junegunn/fzf.vim'
|
|
||||||
Plug 'pechorin/any-jump.vim'
|
|
||||||
Plug 'tpope/vim-commentary'
|
|
||||||
Plug 'tpope/vim-surround'
|
|
||||||
Plug 'voldikss/vim-floaterm'
|
|
||||||
Plug 'wakatime/vim-wakatime'
|
|
||||||
" Plug 'christoomey/vim-tmux-navigator'
|
|
||||||
|
|
||||||
" Plug 'dense-analysis/ale'
|
|
||||||
" Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
||||||
|
|
||||||
let g:mapleader = "\<Space>"
|
|
||||||
let g:maplocalleader = ','
|
|
||||||
|
|
||||||
if has('nvim')
|
|
||||||
Plug 'nvim-lua/plenary.nvim'
|
|
||||||
Plug 'nvim-lua/popup.nvim'
|
|
||||||
" Plug 'nvim-telescope/telescope.nvim'
|
|
||||||
|
|
||||||
" Plug 'TimUntersberger/neogit'
|
|
||||||
Plug 'akinsho/bufferline.nvim'
|
|
||||||
Plug 'andweeb/presence.nvim'
|
|
||||||
Plug 'f-person/git-blame.nvim'
|
|
||||||
Plug 'folke/which-key.nvim'
|
|
||||||
Plug 'glepnir/dashboard-nvim'
|
|
||||||
Plug 'kyazdani42/nvim-tree.lua'
|
|
||||||
Plug 'kyazdani42/nvim-web-devicons'
|
|
||||||
Plug 'lewis6991/gitsigns.nvim'
|
|
||||||
Plug 'lewis6991/gitsigns.nvim'
|
|
||||||
Plug 'nvim-lualine/lualine.nvim'
|
|
||||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
|
||||||
Plug 'ojroques/nvim-lspfuzzy'
|
|
||||||
|
|
||||||
Plug 'L3MON4D3/LuaSnip'
|
|
||||||
Plug 'folke/trouble.nvim'
|
|
||||||
Plug 'hrsh7th/cmp-buffer'
|
|
||||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
|
||||||
Plug 'hrsh7th/cmp-path'
|
|
||||||
Plug 'hrsh7th/nvim-cmp'
|
|
||||||
Plug 'j-hui/fidget.nvim'
|
|
||||||
Plug 'jose-elias-alvarez/null-ls.nvim'
|
|
||||||
Plug 'ksyasuda/lsp_lines.nvim'
|
|
||||||
Plug 'neovim/nvim-lspconfig'
|
|
||||||
Plug 'onsails/lspkind-nvim'
|
|
||||||
Plug 'ray-x/lsp_signature.nvim'
|
|
||||||
Plug 'rmagatti/goto-preview',
|
|
||||||
Plug 'saadparwaiz1/cmp_luasnip'
|
|
||||||
Plug 'simrat39/symbols-outline.nvim'
|
|
||||||
Plug 'williamboman/nvim-lsp-installer'
|
|
||||||
|
|
||||||
Plug 'Mofiqul/dracula.nvim'
|
|
||||||
Plug 'NTBBloodbath/doom-one.nvim'
|
|
||||||
Plug 'olimorris/onedarkpro.nvim'
|
|
||||||
Plug 'projekt0n/github-nvim-theme'
|
|
||||||
else
|
|
||||||
Plug 'ap/vim-buftabline'
|
|
||||||
Plug 'itchyny/lightline.vim'
|
|
||||||
Plug 'liuchengxu/vim-which-key', { 'on': ['WhichKey', 'WhichKey!'] }
|
|
||||||
Plug 'maximbaz/lightline-ale'
|
|
||||||
Plug 'mhinz/vim-startify'
|
|
||||||
Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin'
|
|
||||||
Plug 'ryanoasis/vim-devicons'
|
|
||||||
Plug 'sheerun/vim-polyglot'
|
|
||||||
Plug 'tpope/vim-fugitive'
|
|
||||||
|
|
||||||
Plug 'joshdick/onedark.vim'
|
|
||||||
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
|
||||||
Plug 'morhetz/gruvbox'
|
|
||||||
Plug 'vv9k/vim-github-dark'
|
|
||||||
endif
|
|
||||||
|
|
||||||
call plug#end()
|
|
||||||
|
|
||||||
if has('nvim')
|
|
||||||
set completeopt=menu,menuone,noselect
|
|
||||||
let g:fzf_command = 'fzf --height 90% --width=85% --layout=reverse --preview "bat --color=always {}"'
|
|
||||||
source ~/.config/nvim/keybindings.vim
|
|
||||||
|
|
||||||
source ~/.config/nvim/plugin-confs/bufferline.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/dashboard-art.vim
|
|
||||||
source ~/.config/nvim/plugin-confs/dashboard-nvim.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/git-blame.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/gitsigns.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/lspfuzzy.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/lualine.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/nvimtree.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/presence.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/treesitter.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/whichkey.lua
|
|
||||||
|
|
||||||
source ~/.config/nvim/plugin-confs/code_actions.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/goto-preview.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/lsp-kind.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/lsp-signature.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/lspconfig.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/lsplines.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/null-ls.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/nvim-cmp.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/fidget.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/symbols-outline.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/trouble.lua
|
|
||||||
|
|
||||||
source ~/.vim/plugin-confs/floaterm.vim
|
|
||||||
source ~/.vim/plugin-confs/fzf.vim
|
|
||||||
source ~/.vim/plugin-confs/lightline.vim
|
|
||||||
source ~/.vim/plugin-confs/vim-closetag.vim
|
|
||||||
source ~/.vim/plugin-confs/wakatime.vim
|
|
||||||
|
|
||||||
source ~/.config/nvim/plugin-confs/doomone.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/dracula.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/github-theme.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/onedarkpro.lua
|
|
||||||
|
|
||||||
" makes fzf match colorscheme (I think)
|
|
||||||
augroup fzf_preview
|
|
||||||
autocmd!
|
|
||||||
autocmd User fzf_preview#rpc#initialized call s:fzf_preview_settings() " fzf_preview#remote#initialized or fzf_preview#coc#initialized
|
|
||||||
augroup END
|
|
||||||
function! s:fzf_preview_settings() abort
|
|
||||||
let g:fzf_preview_command = 'COLORTERM=truecolor ' . g:fzf_preview_command
|
|
||||||
let g:fzf_preview_grep_preview_cmd = 'COLORTERM=truecolor ' . g:fzf_preview_grep_preview_cmd
|
|
||||||
endfunction
|
|
||||||
" make terminal not have line numbers
|
|
||||||
autocmd TermOpen * setlocal nonumber norelativenumber
|
|
||||||
|
|
||||||
else
|
|
||||||
source ~/.vim/keybindings.vim
|
|
||||||
|
|
||||||
source ~/.vim/plugin-confs/nerdtree.vim
|
|
||||||
source ~/.vim/plugin-confs/whichkey.vim
|
|
||||||
source ~/.vim/plugin-confs/ale.vim
|
|
||||||
source ~/.vim/plugin-confs/fzf.vim
|
|
||||||
source ~/.vim/plugin-confs/vim-closetag.vim
|
|
||||||
source ~/.vim/plugin-confs/wakatime.vim
|
|
||||||
source ~/.vim/plugin-confs/prettier.vim
|
|
||||||
source ~/.vim/plugin-confs/lightline.vim
|
|
||||||
source ~/.vim/plugin-confs/coc.vim
|
|
||||||
source ~/.vim/plugin-confs/floaterm.vim
|
|
||||||
if executable('bash-language-server')
|
|
||||||
au User lsp_setup call lsp#register_server({
|
|
||||||
\ 'name': 'bash-language-server',
|
|
||||||
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'bash-language-server start']},
|
|
||||||
\ 'allowlist': ['sh'],
|
|
||||||
\ })
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
"------------------------------------------------------------------------------
|
|
||||||
" Enable :Man <man_page>
|
|
||||||
"------------------------------------------------------------------------------
|
|
||||||
runtime ftplugin/man.vim
|
|
||||||
"------------------------------------------------------------------------------
|
|
||||||
" Force help/man buffers into vertical split
|
|
||||||
"------------------------------------------------------------------------------
|
|
||||||
autocmd FileType help wincmd L
|
autocmd FileType help wincmd L
|
||||||
autocmd FileType man wincmd L
|
autocmd FileType man wincmd L
|
||||||
"------------------------------------------------------------------------------
|
" make terminal not have line numbers
|
||||||
"jump to remembered position in file if available
|
autocmd TermOpen * setlocal nonumber norelativenumber
|
||||||
"------------------------------------------------------------------------------
|
|
||||||
if has("autocmd")
|
|
||||||
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
|
|
||||||
endif
|
|
||||||
"------------------------------------------------------------------------------
|
|
||||||
"COLORSCHEME
|
|
||||||
"------------------------------------------------------------------------------
|
|
||||||
set t_Co=256
|
|
||||||
if has('nvim')
|
|
||||||
set termguicolors
|
|
||||||
colorscheme doom-one
|
|
||||||
" colorscheme dracula
|
|
||||||
" colorscheme github_dark
|
|
||||||
" colorscheme onedark
|
|
||||||
" colorscheme onedarkpro
|
|
||||||
else
|
|
||||||
" let g:onedark_termcolors=256 "enable 256 colors
|
|
||||||
" colorscheme onedark "set colorsheme as onedark
|
|
||||||
|
|
||||||
"material theme
|
" " " gray
|
||||||
" let g:material_theme_style = 'default' | 'palenight' | 'ocean' | 'lighter' | 'darker' | 'default-community' | 'palenight-community' | 'ocean-community' | 'lighter-community' | 'darker-community'
|
" highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080
|
||||||
" let g:material_terminal_italics = 1
|
" " blue
|
||||||
" let g:material_theme_style = 'darker'
|
" highlight! CmpItemAbbrMatch guibg=NONE guifg=#569CD6
|
||||||
" colorscheme material
|
" highlight! link CmpItemAbbrMatchFuzzy CmpItemAbbrMatch
|
||||||
let g:gruvbox_contrast_dark = "medium" "default
|
" " light blue
|
||||||
" let g:gruvbox_contrast_dark = "soft"
|
" highlight! CmpItemKindVariable guibg=NONE guifg=#9CDCFE
|
||||||
let g:gruvbox_improved_strings = 0
|
" highlight! link CmpItemKindInterface CmpItemKindVariable
|
||||||
let g:gruvbox_improved_warnings = 1
|
" highlight! link CmpItemKindText CmpItemKindVariable
|
||||||
colorscheme gruvbox
|
" " pink
|
||||||
endif
|
" highlight! CmpItemKindFunction guibg=NONE guifg=#C586C0
|
||||||
"------------------------------------------------------------------------------
|
" highlight! link CmpItemKindMethod CmpItemKindFunction
|
||||||
" custom commands
|
" " front
|
||||||
"------------------------------------------------------------------------------
|
" highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4
|
||||||
|
" highlight! link CmpItemKindProperty CmpItemKindKeyword
|
||||||
|
" highlight! link CmpItemKindUnit CmpItemKindKeyword
|
||||||
|
" highlight! PmenuSel guibg=#51afef guifg=NONE
|
||||||
|
" highlight! Pmenu guifg=#C5CDD9 guibg=#51afef
|
||||||
|
|
||||||
|
lua require('settings')
|
||||||
|
lua require('plugins')
|
||||||
|
source ~/.config/nvim/keybindings.vim
|
||||||
|
|
||||||
|
" nvim plugins
|
||||||
|
source ~/.config/nvim/plugin-confs/bufferline.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/dashboard-art.vim
|
||||||
|
source ~/.config/nvim/plugin-confs/dashboard-nvim.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/gitsigns.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/lspfuzzy.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/lualine.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/nvimtree.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/presence.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/treesitter.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/whichkey.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/telescope.lua
|
||||||
|
|
||||||
|
source ~/.config/nvim/plugin-confs/code_actions.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/goto-preview.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/lsp-kind.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/lspconfig.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/lsplines.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/null-ls.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/nvim-cmp.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/fidget.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/symbols-outline.lua
|
||||||
|
" source ~/.config/nvim/plugin-confs/copilot.lua
|
||||||
|
" source ~/.config/nvim/plugin-confs/lsp-signature.lua
|
||||||
|
" source ~/.config/nvim/plugin-confs/nvim-docs-view.lua
|
||||||
|
|
||||||
|
" nvim and vim plugins
|
||||||
|
source ~/.vim/plugin-confs/floaterm.vim
|
||||||
|
source ~/.vim/plugin-confs/fzf.vim
|
||||||
|
source ~/.vim/plugin-confs/vim-closetag.vim
|
||||||
|
source ~/.vim/plugin-confs/wakatime.vim
|
||||||
|
|
||||||
|
source ~/.config/nvim/plugin-confs/doomone.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/dracula.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/github-theme.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/onedarkpro.lua
|
||||||
|
|
||||||
|
source ~/.config/nvim/lua/toggle_lsp_diagnostics.lua
|
||||||
|
|
||||||
|
" CUSTOM COMMANDS
|
||||||
command! -bang -nargs=? -complete=dir Files
|
command! -bang -nargs=? -complete=dir Files
|
||||||
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0)
|
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0)
|
||||||
|
|
||||||
command! -bang -nargs=? -complete=dir AllFiles
|
command! -bang -nargs=? -complete=dir AllFiles
|
||||||
\ call fzf#run(fzf#wrap('allfiles', fzf#vim#with_preview({'dir': <q-args>, 'sink': 'e', 'source': 'rg --files --hidden --no-ignore', 'options': ['--layout=reverse', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0))
|
\ call fzf#run(fzf#wrap('allfiles', fzf#vim#with_preview({'dir': <q-args>, 'sink': 'e', 'source': 'rg --files --hidden --no-ignore', 'options': ['--layout=reverse', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0))
|
||||||
|
|
||||||
command! Lines call fzf#vim#lines(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse']}), <bang>0)
|
command! -bang -nargs=? -complete=dir Lines
|
||||||
|
\ call fzf#vim#lines(<q-args>, ({'options': ['--layout=reverse']}), <bang>0)
|
||||||
|
|
||||||
command! -bang -nargs=? -complete=dir Buffers
|
command! -bang -nargs=? -complete=dir Buffers
|
||||||
\ call fzf#vim#buffers(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0)
|
\ call fzf#vim#buffers(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0)
|
||||||
|
|
||||||
command! Reload execute "source ~/.vimrc"
|
command! Reload execute "source ~/.config/nvim/init.vim"
|
||||||
command! Config execute ":e ~/.vimrc"
|
command! Config execute ":e ~/.config/nvim/init.vim"
|
||||||
|
command! Plugins execute ":e ~/.config/nvim/lua/plugins.lua"
|
||||||
|
command! Settings execute ":e ~/.config/nvim/lua/settings.lua"
|
||||||
command! Env execute ":Dotenv .env"
|
command! Env execute ":Dotenv .env"
|
||||||
command! MakeTags !ctags -R .
|
command! MakeTags !ctags -R .
|
||||||
command! Ovewrite execute ":w !sudo tee %"
|
command! Ovewrite execute ":w !sudo tee %"
|
||||||
command! Aniwrapper execute ":FloatermNew aniwrapper -qtdoomone -D 144"
|
command! Aniwrapper execute ":FloatermNew aniwrapper -qtdoomone -D 144"
|
||||||
|
|
||||||
|
set termguicolors
|
||||||
|
" colorscheme doom-one
|
||||||
|
colorscheme onedarkpro
|
||||||
|
" colorscheme github_dark
|
||||||
|
|||||||
273
nvim/init.vim.bak
Normal file
273
nvim/init.vim.bak
Normal file
@@ -0,0 +1,273 @@
|
|||||||
|
syntax enable
|
||||||
|
filetype plugin on
|
||||||
|
set noshowmode "disable default vim insert text at bottom
|
||||||
|
set laststatus=3
|
||||||
|
set number
|
||||||
|
set colorcolumn=80
|
||||||
|
set textwidth=80
|
||||||
|
set shiftwidth=4
|
||||||
|
set tabstop=4
|
||||||
|
set autoindent
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
set incsearch
|
||||||
|
set smartindent
|
||||||
|
set hlsearch
|
||||||
|
set ignorecase
|
||||||
|
set noerrorbells
|
||||||
|
set title
|
||||||
|
set mouse=a
|
||||||
|
set relativenumber
|
||||||
|
set splitright
|
||||||
|
set cursorline
|
||||||
|
set scrolloff=8
|
||||||
|
set sidescrolloff=8
|
||||||
|
set wildmenu " show candidates for vim commands with tab
|
||||||
|
set wildignore=*.o,*.obj,*.bak,*.exe
|
||||||
|
set background=dark
|
||||||
|
set showmatch
|
||||||
|
set list
|
||||||
|
set listchars=tab:\ ,trail:
|
||||||
|
set encoding=UTF-8
|
||||||
|
set guifont=FiraCode\ Nerd\ Font\ 18
|
||||||
|
set expandtab
|
||||||
|
" coc settings
|
||||||
|
set hidden
|
||||||
|
set nobackup
|
||||||
|
set nowritebackup
|
||||||
|
set cmdheight=1
|
||||||
|
set updatetime=300
|
||||||
|
set timeoutlen=400
|
||||||
|
" Don't pass messages to |ins-completion-menu|.
|
||||||
|
set shortmess+=c
|
||||||
|
set pumwidth=35
|
||||||
|
|
||||||
|
" set nocompatible " no more vi
|
||||||
|
" set path from current directory and all directories under
|
||||||
|
" set path=$PWD/**
|
||||||
|
|
||||||
|
" Install vim-plug if not found
|
||||||
|
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||||
|
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||||
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Run PlugInstall if there are missing plugins
|
||||||
|
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||||
|
\| PlugInstall --sync | source $MYVIMRC
|
||||||
|
\| endif
|
||||||
|
|
||||||
|
call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
|
Plug 'ap/vim-css-color'
|
||||||
|
Plug 'github/copilot.vim'
|
||||||
|
Plug 'jiangmiao/auto-pairs'
|
||||||
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||||
|
Plug 'junegunn/fzf.vim'
|
||||||
|
Plug 'pechorin/any-jump.vim'
|
||||||
|
Plug 'tpope/vim-commentary'
|
||||||
|
Plug 'tpope/vim-surround'
|
||||||
|
Plug 'voldikss/vim-floaterm'
|
||||||
|
Plug 'wakatime/vim-wakatime'
|
||||||
|
" Plug 'christoomey/vim-tmux-navigator'
|
||||||
|
|
||||||
|
" Plug 'dense-analysis/ale'
|
||||||
|
" Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
|
|
||||||
|
let g:mapleader = "\<Space>"
|
||||||
|
let g:maplocalleader = ','
|
||||||
|
|
||||||
|
if has('nvim')
|
||||||
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
|
Plug 'nvim-lua/popup.nvim'
|
||||||
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||||
|
|
||||||
|
Plug 'akinsho/bufferline.nvim'
|
||||||
|
Plug 'andweeb/presence.nvim'
|
||||||
|
Plug 'folke/which-key.nvim'
|
||||||
|
Plug 'glepnir/dashboard-nvim'
|
||||||
|
Plug 'kyazdani42/nvim-tree.lua'
|
||||||
|
Plug 'kyazdani42/nvim-web-devicons'
|
||||||
|
Plug 'lewis6991/gitsigns.nvim'
|
||||||
|
Plug 'nvim-lualine/lualine.nvim'
|
||||||
|
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.0' }
|
||||||
|
Plug 'ojroques/nvim-lspfuzzy'
|
||||||
|
|
||||||
|
Plug 'L3MON4D3/LuaSnip'
|
||||||
|
Plug 'amrbashir/nvim-docs-view'
|
||||||
|
Plug 'hrsh7th/cmp-buffer'
|
||||||
|
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||||
|
Plug 'hrsh7th/cmp-path'
|
||||||
|
Plug 'hrsh7th/nvim-cmp'
|
||||||
|
Plug 'j-hui/fidget.nvim'
|
||||||
|
Plug 'jose-elias-alvarez/null-ls.nvim'
|
||||||
|
Plug 'ksyasuda/lsp_lines.nvim'
|
||||||
|
Plug 'neovim/nvim-lspconfig'
|
||||||
|
Plug 'onsails/lspkind-nvim'
|
||||||
|
Plug 'ray-x/lsp_signature.nvim'
|
||||||
|
Plug 'rmagatti/goto-preview',
|
||||||
|
Plug 'saadparwaiz1/cmp_luasnip'
|
||||||
|
Plug 'williamboman/nvim-lsp-installer'
|
||||||
|
|
||||||
|
Plug 'Mofiqul/dracula.nvim'
|
||||||
|
Plug 'NTBBloodbath/doom-one.nvim'
|
||||||
|
Plug 'olimorris/onedarkpro.nvim'
|
||||||
|
Plug 'projekt0n/github-nvim-theme'
|
||||||
|
else
|
||||||
|
Plug 'ap/vim-buftabline'
|
||||||
|
Plug 'itchyny/lightline.vim'
|
||||||
|
Plug 'liuchengxu/vim-which-key', { 'on': ['WhichKey', 'WhichKey!'] }
|
||||||
|
Plug 'maximbaz/lightline-ale'
|
||||||
|
Plug 'mhinz/vim-startify'
|
||||||
|
Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||||
|
Plug 'ryanoasis/vim-devicons'
|
||||||
|
Plug 'sheerun/vim-polyglot'
|
||||||
|
Plug 'tpope/vim-fugitive'
|
||||||
|
|
||||||
|
Plug 'joshdick/onedark.vim'
|
||||||
|
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
||||||
|
Plug 'morhetz/gruvbox'
|
||||||
|
Plug 'vv9k/vim-github-dark'
|
||||||
|
endif
|
||||||
|
|
||||||
|
call plug#end()
|
||||||
|
|
||||||
|
if has('nvim')
|
||||||
|
set completeopt=menu,menuone,noselect
|
||||||
|
let g:fzf_command = 'fzf --height 90% --width=85% --layout=reverse --preview "bat --color=always {}"'
|
||||||
|
source ~/.config/nvim/keybindings.vim
|
||||||
|
|
||||||
|
" nvim plugins
|
||||||
|
source ~/.config/nvim/plugin-confs/bufferline.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/dashboard-art.vim
|
||||||
|
source ~/.config/nvim/plugin-confs/dashboard-nvim.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/gitsigns.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/lspfuzzy.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/lualine.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/nvimtree.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/presence.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/treesitter.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/whichkey.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/telescope.lua
|
||||||
|
|
||||||
|
source ~/.config/nvim/plugin-confs/code_actions.lua
|
||||||
|
" source ~/.config/nvim/plugin-confs/copilot.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/goto-preview.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/lsp-kind.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/lsp-signature.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/lspconfig.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/lsplines.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/null-ls.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/nvim-cmp.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/fidget.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/symbols-outline.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/nvim-docs-view.lua
|
||||||
|
|
||||||
|
" nvim and vim plugins
|
||||||
|
source ~/.vim/plugin-confs/floaterm.vim
|
||||||
|
source ~/.vim/plugin-confs/fzf.vim
|
||||||
|
source ~/.vim/plugin-confs/vim-closetag.vim
|
||||||
|
source ~/.vim/plugin-confs/wakatime.vim
|
||||||
|
|
||||||
|
source ~/.config/nvim/plugin-confs/doomone.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/dracula.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/github-theme.lua
|
||||||
|
source ~/.config/nvim/plugin-confs/onedarkpro.lua
|
||||||
|
|
||||||
|
source ~/.config/nvim/lua/toggle_lsp_diagnostics.lua
|
||||||
|
|
||||||
|
" makes fzf match colorscheme (I think)
|
||||||
|
augroup fzf_preview
|
||||||
|
autocmd!
|
||||||
|
autocmd User fzf_preview#rpc#initialized call s:fzf_preview_settings()
|
||||||
|
augroup END
|
||||||
|
function! s:fzf_preview_settings() abort
|
||||||
|
let g:fzf_preview_command = 'COLORTERM=truecolor ' . g:fzf_preview_command
|
||||||
|
let g:fzf_preview_grep_preview_cmd = 'COLORTERM=truecolor ' . g:fzf_preview_grep_preview_cmd
|
||||||
|
endfunction
|
||||||
|
" make terminal not have line numbers
|
||||||
|
autocmd TermOpen * setlocal nonumber norelativenumber
|
||||||
|
else
|
||||||
|
source ~/.vim/keybindings.vim
|
||||||
|
|
||||||
|
source ~/.vim/plugin-confs/nerdtree.vim
|
||||||
|
source ~/.vim/plugin-confs/whichkey.vim
|
||||||
|
source ~/.vim/plugin-confs/ale.vim
|
||||||
|
source ~/.vim/plugin-confs/fzf.vim
|
||||||
|
source ~/.vim/plugin-confs/vim-closetag.vim
|
||||||
|
source ~/.vim/plugin-confs/wakatime.vim
|
||||||
|
source ~/.vim/plugin-confs/prettier.vim
|
||||||
|
source ~/.vim/plugin-confs/lightline.vim
|
||||||
|
source ~/.vim/plugin-confs/coc.vim
|
||||||
|
source ~/.vim/plugin-confs/floaterm.vim
|
||||||
|
if executable('bash-language-server')
|
||||||
|
au User lsp_setup call lsp#register_server({
|
||||||
|
\ 'name': 'bash-language-server',
|
||||||
|
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'bash-language-server start']},
|
||||||
|
\ 'allowlist': ['sh'],
|
||||||
|
\ })
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
" Enable :Man <man_page>
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
runtime ftplugin/man.vim
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
" Force help/man buffers into vertical split
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
autocmd FileType help wincmd L
|
||||||
|
autocmd FileType man wincmd L
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
"jump to remembered position in file if available
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
if has("autocmd")
|
||||||
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
|
||||||
|
endif
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
"COLORSCHEME
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
set t_Co=256
|
||||||
|
if has('nvim')
|
||||||
|
set termguicolors
|
||||||
|
colorscheme doom-one
|
||||||
|
" colorscheme dracula
|
||||||
|
" colorscheme github_dark
|
||||||
|
" colorscheme onedark
|
||||||
|
" colorscheme onedarkpro
|
||||||
|
else
|
||||||
|
" let g:onedark_termcolors=256 "enable 256 colors
|
||||||
|
" colorscheme onedark "set colorsheme as onedark
|
||||||
|
|
||||||
|
"material theme
|
||||||
|
" let g:material_theme_style = 'default' | 'palenight' | 'ocean' | 'lighter' | 'darker' | 'default-community' | 'palenight-community' | 'ocean-community' | 'lighter-community' | 'darker-community'
|
||||||
|
" let g:material_terminal_italics = 1
|
||||||
|
" let g:material_theme_style = 'darker'
|
||||||
|
" colorscheme material
|
||||||
|
let g:gruvbox_contrast_dark = "medium" "default
|
||||||
|
" let g:gruvbox_contrast_dark = "soft"
|
||||||
|
let g:gruvbox_improved_strings = 0
|
||||||
|
let g:gruvbox_improved_warnings = 1
|
||||||
|
colorscheme gruvbox
|
||||||
|
endif
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
" custom commands
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
command! -bang -nargs=? -complete=dir Files
|
||||||
|
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0)
|
||||||
|
|
||||||
|
command! -bang -nargs=? -complete=dir AllFiles
|
||||||
|
\ call fzf#run(fzf#wrap('allfiles', fzf#vim#with_preview({'dir': <q-args>, 'sink': 'e', 'source': 'rg --files --hidden --no-ignore', 'options': ['--layout=reverse', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0))
|
||||||
|
|
||||||
|
command! -bang -nargs=? -complete=dir Lines
|
||||||
|
\ call fzf#vim#lines(<q-args>, ({'options': ['--layout=reverse']}), <bang>0)
|
||||||
|
|
||||||
|
command! -bang -nargs=? -complete=dir Buffers
|
||||||
|
\ call fzf#vim#buffers(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0)
|
||||||
|
|
||||||
|
command! Reload execute "source ~/.vimrc"
|
||||||
|
command! Config execute ":e ~/.vimrc"
|
||||||
|
command! Env execute ":Dotenv .env"
|
||||||
|
command! MakeTags !ctags -R .
|
||||||
|
command! Ovewrite execute ":w !sudo tee %"
|
||||||
|
command! Aniwrapper execute ":FloatermNew aniwrapper -qtdoomone -D 144"
|
||||||
@@ -5,30 +5,34 @@ nmap <F5> :!
|
|||||||
vnoremap < <gv
|
vnoremap < <gv
|
||||||
vnoremap > >gv
|
vnoremap > >gv
|
||||||
|
|
||||||
" for toggling/hiding the vsplit-term
|
" for toggling/hiding the split-term
|
||||||
tnoremap <C-T> <C-\><C-n>:FloatermToggle floatingterm<CR>
|
tnoremap <C-T> <C-\><C-n>:FloatermToggle floatterm<CR>
|
||||||
tnoremap <Esc> <C-\><C-n>
|
tnoremap <Esc> <C-\><C-n>
|
||||||
tnoremap <leader>tt <C-\><C-N>:FloatermToggle vsplit-term<CR>
|
tnoremap <leader>tt <C-\><C-N>:FloatermToggle split-term<CR>
|
||||||
|
tnoremap <leader>tf <C-\><C-N>:FloatermToggle floatterm<CR>
|
||||||
|
tnoremap <leader>tp <C-\><C-N>:FloatermToggle ipython<CR>
|
||||||
|
tnoremap <leader>tP <C-\><C-N>:FloatermToggle ipython-full<CR>
|
||||||
|
|
||||||
nmap <C-J> :bnext<CR>
|
nmap <C-J> :bnext<CR>
|
||||||
nmap <C-K> :bprev<CR>
|
nmap <C-K> :bprev<CR>
|
||||||
nmap <C-T> :wa<CR>:FloatermToggle floatingterm<CR>
|
nmap <C-T> :wa<CR>:FloatermToggle floatterm<CR>
|
||||||
nmap <C-n> :NvimTreeToggle<CR>
|
|
||||||
|
|
||||||
" open file under cursor, create if necessary
|
" open file under cursor, create if necessary
|
||||||
nnoremap // :Lines<CR>
|
nnoremap // :Telescope current_buffer_fuzzy_find<CR>
|
||||||
nnoremap ?? :BLines<CR>
|
nnoremap ?? :BLines<CR>
|
||||||
|
|
||||||
nmap gA :lua vim.lsp.buf.code_actions()<CR>
|
nmap gA :lua vim.lsp.buf.code_actions()<CR>
|
||||||
nmap gDc :lua vim.lsp.buf.declaration()<CR>
|
nmap gd :Telescope lsp_definitions<CR>
|
||||||
nmap gDf :lua vim.lsp.buf.definition()<CR>
|
nmap gDc :Telescope lsp_implementations<CR>
|
||||||
|
nmap gDf :Telescope lsp_definitions<CR>
|
||||||
nmap gF :edit <cfile><cr>
|
nmap gF :edit <cfile><cr>
|
||||||
nmap gT :lua vim.lsp.buf.type_definition()<CR>
|
nmap gT :Telescope lsp_type_definitions<CR>
|
||||||
nmap gb :lua vim.lsp.buf.document_symbol()<CR>
|
nmap gb :Gitsigns blame_line<CR>
|
||||||
" nmap gd :lua vim.lsp.buf.definition()<CR>
|
" nmap gd :lua vim.lsp.buf.definition()<CR>
|
||||||
nmap gi :lua vim.lsp.buf.implementation()<CR>
|
nmap gi :Telescope lsp_implementations<CR>
|
||||||
|
nmap gj :Telescope jumplist<CR>
|
||||||
nmap gl :lua vim.lsp.buf.code_lens()<CR>
|
nmap gl :lua vim.lsp.buf.code_lens()<CR>
|
||||||
nmap gr :lua vim.lsp.buf.references()<CR>
|
nmap gr :Telescope lsp_references<CR>
|
||||||
nmap gs :lua vim.lsp.buf.signature_help()<CR>
|
nmap gs :lua vim.lsp.buf.signature_help()<CR>
|
||||||
|
|
||||||
nmap Q !!$SHELL<CR>
|
nmap Q !!$SHELL<CR>
|
||||||
@@ -38,83 +42,99 @@ nmap rn :lua vim.lsp.buf.rename()<CR>
|
|||||||
nmap <leader>as :FloatermNew --title=aniwrapper aniwrapper -qtdoomone -D144<CR>
|
nmap <leader>as :FloatermNew --title=aniwrapper aniwrapper -qtdoomone -D144<CR>
|
||||||
nmap <leader>ad :FloatermNew --title=aniwrapper ani-cli -q720p -cd/home/sudacode/Videos/sauce -D144<CR>
|
nmap <leader>ad :FloatermNew --title=aniwrapper ani-cli -q720p -cd/home/sudacode/Videos/sauce -D144<CR>
|
||||||
|
|
||||||
nmap <leader>bb :Buffers<CR>
|
nmap <leader>bb :Telescope buffers<CR>
|
||||||
nmap <leader>bk :bdelete<CR>
|
nmap <leader>bk :bdelete<CR>
|
||||||
nmap <leader>bn :bnext<CR>
|
nmap <leader>bn :bnext<CR>
|
||||||
nmap <leader>bp :bprev<CR>
|
nmap <leader>bp :bprev<CR>
|
||||||
|
|
||||||
nmap <leader>ca :lua vim.lsp.buf.code_action()<CR>
|
nmap <leader>ca :lua vim.lsp.buf.code_action()<CR>
|
||||||
nmap <leader>cd :LspDiagnostics <bufnr><CR>
|
nmap <leader>cc :vert Copilot<CR>
|
||||||
nmap <leader>cl :lua vim.lsp.diagnostic.show_line_diagnostics()<CR>
|
nmap <leader>cd :Telescope diagnostics<CR>
|
||||||
|
" nmap <leader>cl :lua vim.lsp.diagnostic.show_line_diagnostics()<CR>
|
||||||
nnoremap <silent> <Leader>cn :DashboardNewFile<CR>
|
nnoremap <silent> <Leader>cn :DashboardNewFile<CR>
|
||||||
|
|
||||||
nmap <leader>ff :CocCommand fzf-preview.ProjectFiles<CR>
|
nnoremap <leader>ff :Telescope find_files<cr>
|
||||||
|
nnoremap <leader>fg :Telescope live_grep<cr>
|
||||||
|
nnoremap <leader>fb :Telescope buffers<cr>
|
||||||
|
nnoremap <leader>fh :Telescope help_tags<cr>
|
||||||
nmap <silent> <Leader>fa :DashboardFindWord<CR>
|
nmap <silent> <Leader>fa :DashboardFindWord<CR>
|
||||||
nmap <silent> <Leader>fb :DashboardJumpMark<CR>
|
nmap <silent> <Leader>fb :DashboardJumpMark<CR>
|
||||||
nmap <silent> <Leader>fh :DashboardFindHistory<CR>
|
nmap <silent> <Leader>fh :DashboardFindHistory<CR>
|
||||||
|
|
||||||
nmap <leader>gb :GitBlameToggle<CR>
|
nmap <leader>gb :Gitsigns blame_line<CR>
|
||||||
nmap <leader>gc :Commits<CR>
|
nmap <leader>gc :Telescope git_commits<CR>
|
||||||
nmap <leader>gf :GitFiles<CR>
|
nmap <leader>gf :Telescope git_files<CR>
|
||||||
" nmap <leader>gg :Neogit<CR>
|
" nmap <leader>gg :Neogit<CR>
|
||||||
nmap <leader>gg :FloatermNew --title=lazygit --width=1.0 --height=1.0 --opener=vsplit lazygit<CR>
|
nmap <leader>gg :FloatermNew --title=lazygit --width=1.0 --height=1.0 --opener=vsplit lazygit<CR>
|
||||||
nnoremap gP <cmd>lua require('goto-preview').close_all_win()<CR>
|
nnoremap gP <cmd>lua require('goto-preview').close_all_win()<CR>
|
||||||
nnoremap gR <cmd>TroubleToggle lsp_references<cr>
|
nnoremap gR <cmd>Telescope lsp_references<cr>
|
||||||
nnoremap gpc <cmd>lua require('goto-preview').close_all_win()<CR>
|
nnoremap gpc <cmd>lua require('goto-preview').close_all_win()<CR>
|
||||||
nnoremap gpd <cmd>lua require('goto-preview').goto_preview_definition()<CR>
|
nnoremap gpd <cmd>lua require('goto-preview').goto_preview_definition()<CR>
|
||||||
nnoremap gpi <cmd>lua require('goto-preview').goto_preview_implementation()<CR>
|
nnoremap gpi <cmd>lua require('goto-preview').goto_preview_implementation()<CR>
|
||||||
|
|
||||||
nmap <leader>hc :Commands<CR>
|
nmap <leader>hc :Telescope commands<CR>
|
||||||
nmap <leader>hh :Helptags<CR>
|
nmap <leader>hh :Telescope tags<CR>
|
||||||
nmap <leader>hk :Maps<CR>
|
nmap <leader>hk :Telescope keymaps<CR>
|
||||||
|
nmap <leader>hs :Telescope spell_suggest<CR>
|
||||||
|
|
||||||
nmap <leader>isp :-1read $HOME/Templates/python.py<CR>4jw
|
nmap <leader>isp :-1read $HOME/Templates/python.py<CR>4jw
|
||||||
|
|
||||||
nmap <leader>j :AnyJump<CR>
|
nmap <leader>j :AnyJump<CR>
|
||||||
|
|
||||||
|
" nmap K :DocsViewToggle<CR>
|
||||||
nmap K :lua vim.lsp.buf.hover()<CR>
|
nmap K :lua vim.lsp.buf.hover()<CR>
|
||||||
|
|
||||||
nmap <leader>lD :lua vim.lsp.buf.definition()<CR>
|
nmap <leader>ld :Telescope lsp_definitions<CR>
|
||||||
nmap <leader>la :lua vim.lsp.buf.code_action()<CR>
|
nmap <leader>la :lua vim.lsp.buf.code_action()<CR>
|
||||||
nmap <leader>lci :lua vim.lsp.buf.incoming_calls()<CR>
|
nmap <leader>lci :Telescope lsp_incoming_calls<CR>
|
||||||
nmap <leader>lco :lua vim.lsp.buf.outgoing_calls()<CR>
|
nmap <leader>lco :Telescope lsp_outgoing_calls<CR>
|
||||||
nmap <leader>ld :lua vim.lsp.buf.declaration()<CR>
|
|
||||||
nmap <leader>lh :lua vim.lsp.buf.signature_help()<CR>
|
nmap <leader>lh :lua vim.lsp.buf.signature_help()<CR>
|
||||||
nmap <leader>li :lua vim.lsp.buf.implementation()<CR>
|
nmap <leader>li :Telescope lsp_implementations<CR>
|
||||||
nmap <leader>lr :lua vim.lsp.buf.references()<CR>
|
nmap <leader>lr :Telescope lsp_references<CR>
|
||||||
nmap <leader>lR :lua vim.lsp.buf.rename()<CR>
|
nmap <leader>lR :lua vim.lsp.buf.rename()<CR>
|
||||||
nmap <leader>ls :lua vim.lsp.buf.document_symbol()<CR>
|
nmap <leader>ls :Telescope lsp_document_symbols<CR>
|
||||||
nmap <leader>lt :lua vim.lsp.buf.type_definition()<CR>
|
nmap <leader>lt :Telescope lsp_type_definitions<CR>
|
||||||
nmap <leader>lw :lua vim.lsp.buf.workspace_symbol()<CR>
|
nmap <leader>lw :Telescope lsp_dynamic_workspace_symbols<CR>
|
||||||
|
|
||||||
nmap <leader>n :NvimTreeToggle<CR>
|
nmap <leader>n :NvimTreeToggle<CR>
|
||||||
|
|
||||||
nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
|
nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
|
||||||
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
||||||
|
nmap <leader>of :wa<CR>:FloatermToggle floatterm<CR>
|
||||||
|
nmap <leader>oh :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=split --position=botright --height=0.45<CR>
|
||||||
nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
|
nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
|
||||||
|
nmap <leader>op :FloatermNew --title=ipython --name=ipython --opener=split --wintype=vsplit --position=botright --width=0.5 ipython<CR>
|
||||||
|
nmap <leader>oP :FloatermNew --title=ipython-full --name=ipython-full --opener=edit --width=1.0 --height=1.0 ipython<CR>
|
||||||
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
||||||
nmap <leader>ot :FloatermNew --title=floaterm --name=vsplit-term --wintype=vsplit --position=botright --width=0.5<CR>
|
nmap <leader>ot :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR>
|
||||||
|
|
||||||
nmap <leader>r :NvimTreeRefresh<CR>
|
nmap <leader>r :NvimTreeRefresh<CR>
|
||||||
|
|
||||||
nmap <Leader>sl :<C-u>SessionLoad<CR>
|
nmap <Leader>sl :<C-u>SessionLoad<CR>
|
||||||
nmap <Leader>ss :<C-u>SessionSave<CR>
|
nmap <Leader>ss :<C-u>SessionSave<CR>
|
||||||
nmap <leader>sF :AllFiles<Cr>
|
|
||||||
nmap <leader>sc :nohls<Cr>
|
nmap <leader>sc :nohls<Cr>
|
||||||
nmap <leader>sf :Files<Cr>
|
nmap <leader>sC :Telescope commands<Cr>
|
||||||
nmap <leader>sh :History:<CR>
|
nmap <leader>sf :Telescope find_files<Cr>
|
||||||
nmap <leader>s/ :History/<CR>
|
nmap <leader>sh :Telescope command_history<CR>
|
||||||
|
nmap <leader>sm :Telescope man_pages<CR>
|
||||||
|
nmap <leader>s/ :Telescope search_history<CR>
|
||||||
|
|
||||||
nnoremap <silent> <Leader>tc :DashboardChangeColorscheme<CR>
|
nnoremap <silent> <Leader>tc :Telescope colorscheme<CR>
|
||||||
|
nmap <leader>tf :wa<CR>:FloatermToggle floatterm<CR>
|
||||||
nmap <leader>to :SymbolsOutline<CR>
|
nmap <leader>to :SymbolsOutline<CR>
|
||||||
nmap <leader>tt :FloatermToggle vsplit-term<CR>
|
nmap <leader>tp :FloatermToggle ipython<CR>
|
||||||
|
nmap <leader>tP :FloatermToggle ipython-full<CR>
|
||||||
|
nmap <leader>tt :FloatermToggle split-term<CR>
|
||||||
|
|
||||||
nmap <leader>wa :lua vim.lsp.buf.add_workspace_folder()<CR>
|
nmap <leader>wa :lua vim.lsp.buf.add_workspace_folder()<CR>
|
||||||
nmap <leader>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>
|
nmap <leader>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>
|
||||||
nmap <leader>wr :lua vim.lsp.buf.remove_workspace_folder()<CR>
|
nmap <leader>wr :lua vim.lsp.buf.remove_workspace_folder()<CR>
|
||||||
|
|
||||||
nnoremap <leader>xd <cmd>TroubleToggle document_diagnostics<cr>
|
" nnoremap <leader>xd <cmd>TroubleToggle document_diagnostics<cr>
|
||||||
nnoremap <leader>xl <cmd>TroubleToggle loclist<cr>
|
" nnoremap <leader>xl <cmd>TroubleToggle loclist<cr>
|
||||||
nnoremap <leader>xq <cmd>TroubleToggle quickfix<cr>
|
" nnoremap <leader>xq <cmd>TroubleToggle quickfix<cr>
|
||||||
nnoremap <leader>xw <cmd>TroubleToggle workspace_diagnostics<cr>
|
" nnoremap <leader>xw <cmd>TroubleToggle workspace_diagnostics<cr>
|
||||||
nnoremap <leader>xx <cmd>TroubleToggle<cr>
|
" nnoremap <leader>xx <cmd>TroubleToggle<cr>
|
||||||
|
|
||||||
|
nmap <leader>y "+
|
||||||
|
vmap <leader>y "+
|
||||||
|
|||||||
133
nvim/keybindings.vim.old
Normal file
133
nvim/keybindings.vim.old
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
nmap <F4> :set paste!<Bar>set paste?<CR>
|
||||||
|
nmap <F5> :!
|
||||||
|
|
||||||
|
" reselect visual selection after indent
|
||||||
|
vnoremap < <gv
|
||||||
|
vnoremap > >gv
|
||||||
|
|
||||||
|
" for toggling/hiding the split-term
|
||||||
|
tnoremap <C-T> <C-\><C-n>:FloatermToggle floatterm<CR>
|
||||||
|
tnoremap <Esc> <C-\><C-n>
|
||||||
|
tnoremap <leader>tt <C-\><C-N>:FloatermToggle split-term<CR>
|
||||||
|
tnoremap <leader>tf <C-\><C-N>:FloatermToggle floatterm<CR>
|
||||||
|
tnoremap <leader>tp <C-\><C-N>:FloatermToggle ipython<CR>
|
||||||
|
tnoremap <leader>tP <C-\><C-N>:FloatermToggle ipython-full<CR>
|
||||||
|
|
||||||
|
nmap <C-J> :bnext<CR>
|
||||||
|
nmap <C-K> :bprev<CR>
|
||||||
|
nmap <C-T> :wa<CR>:FloatermToggle floatterm<CR>
|
||||||
|
|
||||||
|
" open file under cursor, create if necessary
|
||||||
|
nnoremap // :Lines<CR>
|
||||||
|
nnoremap ?? :BLines<CR>
|
||||||
|
|
||||||
|
nmap gA :lua vim.lsp.buf.code_actions()<CR>
|
||||||
|
nmap gDc :lua vim.lsp.buf.declaration()<CR>
|
||||||
|
nmap gDf :lua vim.lsp.buf.definition()<CR>
|
||||||
|
nmap gF :edit <cfile><cr>
|
||||||
|
nmap gT :lua vim.lsp.buf.type_definition()<CR>
|
||||||
|
nmap gb :Gitsigns blame_line<CR>
|
||||||
|
" nmap gd :lua vim.lsp.buf.definition()<CR>
|
||||||
|
nmap gi :lua vim.lsp.buf.implementation()<CR>
|
||||||
|
nmap gl :lua vim.lsp.buf.code_lens()<CR>
|
||||||
|
nmap gr :lua vim.lsp.buf.references()<CR>
|
||||||
|
nmap gs :lua vim.lsp.buf.signature_help()<CR>
|
||||||
|
|
||||||
|
nmap Q !!$SHELL<CR>
|
||||||
|
|
||||||
|
nmap rn :lua vim.lsp.buf.rename()<CR>
|
||||||
|
|
||||||
|
nmap <leader>as :FloatermNew --title=aniwrapper aniwrapper -qtdoomone -D144<CR>
|
||||||
|
nmap <leader>ad :FloatermNew --title=aniwrapper ani-cli -q720p -cd/home/sudacode/Videos/sauce -D144<CR>
|
||||||
|
|
||||||
|
nmap <leader>bb :Buffers<CR>
|
||||||
|
nmap <leader>bk :bdelete<CR>
|
||||||
|
nmap <leader>bn :bnext<CR>
|
||||||
|
nmap <leader>bp :bprev<CR>
|
||||||
|
|
||||||
|
nmap <leader>ca :lua vim.lsp.buf.code_action()<CR>
|
||||||
|
nmap <leader>cc :vert Copilot<CR>
|
||||||
|
nmap <leader>cd :LspDiagnostics <bufnr><CR>
|
||||||
|
nmap <leader>cl :lua vim.lsp.diagnostic.show_line_diagnostics()<CR>
|
||||||
|
nnoremap <silent> <Leader>cn :DashboardNewFile<CR>
|
||||||
|
|
||||||
|
nmap <leader>ff :CocCommand fzf-preview.ProjectFiles<CR>
|
||||||
|
nmap <silent> <Leader>fa :DashboardFindWord<CR>
|
||||||
|
nmap <silent> <Leader>fb :DashboardJumpMark<CR>
|
||||||
|
nmap <silent> <Leader>fh :DashboardFindHistory<CR>
|
||||||
|
|
||||||
|
nmap <leader>gb :Gitsigns blame_line<CR>
|
||||||
|
nmap <leader>gc :Commits<CR>
|
||||||
|
nmap <leader>gf :GitFiles<CR>
|
||||||
|
" nmap <leader>gg :Neogit<CR>
|
||||||
|
nmap <leader>gg :FloatermNew --title=lazygit --width=1.0 --height=1.0 --opener=vsplit lazygit<CR>
|
||||||
|
nnoremap gP <cmd>lua require('goto-preview').close_all_win()<CR>
|
||||||
|
nnoremap gR <cmd>TroubleToggle lsp_references<cr>
|
||||||
|
nnoremap gpc <cmd>lua require('goto-preview').close_all_win()<CR>
|
||||||
|
nnoremap gpd <cmd>lua require('goto-preview').goto_preview_definition()<CR>
|
||||||
|
nnoremap gpi <cmd>lua require('goto-preview').goto_preview_implementation()<CR>
|
||||||
|
|
||||||
|
nmap <leader>hc :Commands<CR>
|
||||||
|
nmap <leader>hh :Helptags<CR>
|
||||||
|
nmap <leader>hk :Maps<CR>
|
||||||
|
|
||||||
|
nmap <leader>isp :-1read $HOME/Templates/python.py<CR>4jw
|
||||||
|
|
||||||
|
nmap <leader>j :AnyJump<CR>
|
||||||
|
|
||||||
|
nmap K :lua vim.lsp.buf.hover()<CR>
|
||||||
|
|
||||||
|
nmap <leader>lD :lua vim.lsp.buf.definition()<CR>
|
||||||
|
nmap <leader>la :lua vim.lsp.buf.code_action()<CR>
|
||||||
|
nmap <leader>lci :lua vim.lsp.buf.incoming_calls()<CR>
|
||||||
|
nmap <leader>lco :lua vim.lsp.buf.outgoing_calls()<CR>
|
||||||
|
nmap <leader>ld :lua vim.lsp.buf.declaration()<CR>
|
||||||
|
nmap <leader>lh :lua vim.lsp.buf.signature_help()<CR>
|
||||||
|
nmap <leader>li :lua vim.lsp.buf.implementation()<CR>
|
||||||
|
nmap <leader>lr :lua vim.lsp.buf.references()<CR>
|
||||||
|
nmap <leader>lR :lua vim.lsp.buf.rename()<CR>
|
||||||
|
nmap <leader>ls :lua vim.lsp.buf.document_symbol()<CR>
|
||||||
|
nmap <leader>lt :lua vim.lsp.buf.type_definition()<CR>
|
||||||
|
nmap <leader>lw :lua vim.lsp.buf.workspace_symbol()<CR>
|
||||||
|
|
||||||
|
nmap <leader>n :NvimTreeToggle<CR>
|
||||||
|
|
||||||
|
nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
|
||||||
|
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
||||||
|
nmap <leader>of :wa<CR>:FloatermToggle floatterm<CR>
|
||||||
|
nmap <leader>oh :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=split --position=botright --height=0.45<CR>
|
||||||
|
nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
|
||||||
|
nmap <leader>op :FloatermNew --title=ipython --name=ipython --opener=split --wintype=vsplit --position=botright --width=0.5 ipython<CR>
|
||||||
|
nmap <leader>oP :FloatermNew --title=ipython-full --name=ipython-full --opener=edit --width=1.0 --height=1.0 ipython<CR>
|
||||||
|
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
||||||
|
nmap <leader>ot :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR>
|
||||||
|
|
||||||
|
nmap <leader>r :NvimTreeRefresh<CR>
|
||||||
|
|
||||||
|
nmap <Leader>sl :<C-u>SessionLoad<CR>
|
||||||
|
nmap <Leader>ss :<C-u>SessionSave<CR>
|
||||||
|
nmap <leader>sF :AllFiles<Cr>
|
||||||
|
nmap <leader>sc :nohls<Cr>
|
||||||
|
nmap <leader>sf :Files<Cr>
|
||||||
|
nmap <leader>sh :History:<CR>
|
||||||
|
nmap <leader>s/ :History/<CR>
|
||||||
|
|
||||||
|
nnoremap <silent> <Leader>tc :Colors<CR>
|
||||||
|
nmap <leader>tf :wa<CR>:FloatermToggle floatterm<CR>
|
||||||
|
nmap <leader>to :SymbolsOutline<CR>
|
||||||
|
nmap <leader>tp :FloatermToggle ipython<CR>
|
||||||
|
nmap <leader>tP :FloatermToggle ipython-full<CR>
|
||||||
|
nmap <leader>tt :FloatermToggle split-term<CR>
|
||||||
|
|
||||||
|
nmap <leader>wa :lua vim.lsp.buf.add_workspace_folder()<CR>
|
||||||
|
nmap <leader>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>
|
||||||
|
nmap <leader>wr :lua vim.lsp.buf.remove_workspace_folder()<CR>
|
||||||
|
|
||||||
|
" nnoremap <leader>xd <cmd>TroubleToggle document_diagnostics<cr>
|
||||||
|
" nnoremap <leader>xl <cmd>TroubleToggle loclist<cr>
|
||||||
|
" nnoremap <leader>xq <cmd>TroubleToggle quickfix<cr>
|
||||||
|
" nnoremap <leader>xw <cmd>TroubleToggle workspace_diagnostics<cr>
|
||||||
|
" nnoremap <leader>xx <cmd>TroubleToggle<cr>
|
||||||
|
|
||||||
|
nmap <leader>y "+
|
||||||
|
vmap <leader>y "+
|
||||||
3
nvim/lua/keybindings.lua
Normal file
3
nvim/lua/keybindings.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
local function map(m, k, v)
|
||||||
|
vim.keymap.set(m, k, v, {silent = true, noremap = true})
|
||||||
|
end
|
||||||
207
nvim/lua/plugins.lua
Normal file
207
nvim/lua/plugins.lua
Normal file
@@ -0,0 +1,207 @@
|
|||||||
|
vim.cmd [[packadd packer.nvim]]
|
||||||
|
require('packer').startup(function(use)
|
||||||
|
use 'wbthomason/packer.nvim'
|
||||||
|
use 'nvim-lua/plenary.nvim'
|
||||||
|
use {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
run = function() require('nvim-treesitter.install').update({ with_sync = true }) end,
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'nvim-lualine/lualine.nvim',
|
||||||
|
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
use {
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
after = "lualine.nvim",
|
||||||
|
config = function ()
|
||||||
|
vim.defer_fn(function()
|
||||||
|
require('copilot').setup({
|
||||||
|
panel = {
|
||||||
|
enabled = true,
|
||||||
|
auto_refresh = false,
|
||||||
|
keymap = {
|
||||||
|
jump_prev = "[[",
|
||||||
|
jump_next = "]]",
|
||||||
|
accept = "<CR>",
|
||||||
|
refresh = "gr",
|
||||||
|
open = "<M-CR>"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
suggestion = {
|
||||||
|
enabled = true,
|
||||||
|
auto_trigger = true,
|
||||||
|
debounce = 75,
|
||||||
|
keymap = {
|
||||||
|
accept = "<Tab>",
|
||||||
|
next = "<M-]>",
|
||||||
|
prev = "<M-[>",
|
||||||
|
dismiss = "<C-]>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- filetypes = {
|
||||||
|
-- yaml = false,
|
||||||
|
-- markdown = false,
|
||||||
|
-- help = false,
|
||||||
|
-- gitcommit = false,
|
||||||
|
-- gitrebase = false,
|
||||||
|
-- hgcommit = false,
|
||||||
|
-- svn = false,
|
||||||
|
-- cvs = false,
|
||||||
|
-- ["."] = false,
|
||||||
|
-- },
|
||||||
|
copilot_node_command = 'node', -- Node version must be < 18
|
||||||
|
plugin_manager_path = vim.fn.stdpath("data") .. "/site/pack/packer",
|
||||||
|
server_opts_overrides = {},
|
||||||
|
})
|
||||||
|
end, 100)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
after = { "copilot.lua" },
|
||||||
|
config = function ()
|
||||||
|
require("copilot_cmp").setup({
|
||||||
|
-- method = "getCompletionsCycling",
|
||||||
|
-- formatters = {
|
||||||
|
-- insert_text = require("copilot_cmp.format").remove_existing
|
||||||
|
-- }
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'junegunn/fzf',
|
||||||
|
run = function() vim.fn['fzf#install']() end
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
"lewis6991/hover.nvim",
|
||||||
|
config = function()
|
||||||
|
require("hover").setup {
|
||||||
|
init = function()
|
||||||
|
-- Require providers
|
||||||
|
require("hover.providers.lsp")
|
||||||
|
-- require('hover.providers.gh')
|
||||||
|
-- require('hover.providers.jira')
|
||||||
|
require('hover.providers.man')
|
||||||
|
require('hover.providers.dictionary')
|
||||||
|
end,
|
||||||
|
preview_opts = {
|
||||||
|
border = "rounded"
|
||||||
|
-- border = {
|
||||||
|
-- { "╭", "FloatBorder" },
|
||||||
|
-- { "─", "FloatBorder" },
|
||||||
|
-- { "╮", "FloatBorder" },
|
||||||
|
-- { "│", "FloatBorder" },
|
||||||
|
-- { "╯", "FloatBorder" },
|
||||||
|
-- { "─", "FloatBorder" },
|
||||||
|
-- { "╰", "FloatBorder" },
|
||||||
|
-- { "│", "FloatBorder" },
|
||||||
|
-- }
|
||||||
|
},
|
||||||
|
-- Whether the contents of a currently open hover window should be moved
|
||||||
|
-- to a :h preview-window when pressing the hover keymap.
|
||||||
|
preview_window = false,
|
||||||
|
title = true
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Setup keymaps
|
||||||
|
vim.keymap.set("n", "K", require("hover").hover, {desc = "hover.nvim"})
|
||||||
|
vim.keymap.set("n", "gK", require("hover").hover_select, {desc = "hover.nvim (select)"})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
use 'ap/vim-css-color'
|
||||||
|
use 'jiangmiao/auto-pairs'
|
||||||
|
use 'junegunn/fzf.vim'
|
||||||
|
use 'pechorin/any-jump.vim'
|
||||||
|
use 'tpope/vim-commentary'
|
||||||
|
use 'tpope/vim-surround'
|
||||||
|
use 'voldikss/vim-floaterm'
|
||||||
|
use 'wakatime/vim-wakatime'
|
||||||
|
|
||||||
|
use {
|
||||||
|
'akinsho/nvim-bufferline.lua'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'andweeb/presence.nvim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'folke/which-key.nvim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'glepnir/dashboard-nvim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'kyazdani42/nvim-tree.lua'
|
||||||
|
}
|
||||||
|
use 'kyazdani42/nvim-web-devicons'
|
||||||
|
use {
|
||||||
|
'lewis6991/gitsigns.nvim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'nvim-telescope/telescope.nvim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'ojroques/nvim-lspfuzzy'
|
||||||
|
}
|
||||||
|
|
||||||
|
use 'L3MON4D3/LuaSnip'
|
||||||
|
-- use 'amrbashir/nvim-docs-view'
|
||||||
|
use {
|
||||||
|
'hrsh7th/nvim-cmp'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'hrsh7th/cmp-nvim-lsp'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'hrsh7th/cmp-nvim-lua'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'hrsh7th/cmp-nvim-lsp-signature-help'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'hrsh7th/cmp-path'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'hrsh7th/cmp-buffer'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'j-hui/fidget.nvim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'jose-elias-alvarez/null-ls.nvim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'ksyasuda/lsp_lines.nvim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'neovim/nvim-lspconfig'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'onsails/lspkind-nvim'
|
||||||
|
}
|
||||||
|
-- use 'ray-x/lsp_signature.nvim'
|
||||||
|
use {
|
||||||
|
'rmagatti/goto-preview'
|
||||||
|
}
|
||||||
|
use 'saadparwaiz1/cmp_luasnip'
|
||||||
|
use 'williamboman/nvim-lsp-installer'
|
||||||
|
|
||||||
|
use {
|
||||||
|
'Mofiqul/dracula.nvim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'NTBBloodbath/doom-one.nvim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'olimorris/onedarkpro.nvim'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'projekt0n/github-nvim-theme'
|
||||||
|
}
|
||||||
|
end)
|
||||||
43
nvim/lua/settings.lua
Normal file
43
nvim/lua/settings.lua
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
local g = vim.g
|
||||||
|
local o = vim.o
|
||||||
|
local A = vim.api
|
||||||
|
|
||||||
|
g.mapleader = " "
|
||||||
|
g.maplocalleader = ','
|
||||||
|
g.fzf_command = 'fzf --height 90% --width=85% --layout=reverse --preview "bat --color=always {}"'
|
||||||
|
o.completeopt="menu,menuone,noselect"
|
||||||
|
o.showmode = false
|
||||||
|
o.termguicolors = true
|
||||||
|
o.background = 'dark'
|
||||||
|
o.mouse = 'a'
|
||||||
|
o.syntax = 'on'
|
||||||
|
o.laststatus = 3
|
||||||
|
o.number = true
|
||||||
|
o.relativenumber = true
|
||||||
|
o.colorcolumn = '80'
|
||||||
|
o.textwidth = 80
|
||||||
|
o.shiftwidth = 4
|
||||||
|
o.tabstop = 4
|
||||||
|
o.autoindent = true
|
||||||
|
o.ignorecase = true
|
||||||
|
o.smartcase = true
|
||||||
|
o.incsearch = true
|
||||||
|
o.hlsearch = true
|
||||||
|
o.title = true
|
||||||
|
o.splitright = true
|
||||||
|
o.cursorline = true
|
||||||
|
o.scrolloff = 8
|
||||||
|
o.sidescrolloff = 8
|
||||||
|
o.wildmenu = true
|
||||||
|
o.wildignore= '.git,.hg,.svn,CVS,.DS_Store,.idea,.vscode,.vscode-test,node_modules'
|
||||||
|
o.showmatch = true
|
||||||
|
o.list = true
|
||||||
|
o.listchars = 'tab:»·,trail:·,nbsp:·,extends:>,precedes:<'
|
||||||
|
o.encoding = 'utf-8'
|
||||||
|
o.guifont = 'JetBrainsMono Nerd Font 14'
|
||||||
|
o.expandtab = true
|
||||||
|
o.hidden = true
|
||||||
|
o.cmdheight = 1
|
||||||
|
o.updatetime = 300
|
||||||
|
o.timeoutlen = 500
|
||||||
|
o.pumwidth=35
|
||||||
11
nvim/lua/toggle_lsp_diagnostics.lua
Normal file
11
nvim/lua/toggle_lsp_diagnostics.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
local diagnostics_active = true
|
||||||
|
local toggle_diagnostics = function()
|
||||||
|
diagnostics_active = not diagnostics_active
|
||||||
|
if diagnostics_active then
|
||||||
|
vim.diagnostic.show()
|
||||||
|
else
|
||||||
|
vim.diagnostic.hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>td', toggle_diagnostics)
|
||||||
@@ -15,7 +15,7 @@ require('bufferline').setup {
|
|||||||
-- NOTE: this plugin is designed with this icon in mind,
|
-- NOTE: this plugin is designed with this icon in mind,
|
||||||
-- and so changing this is NOT recommended, this is intended
|
-- and so changing this is NOT recommended, this is intended
|
||||||
-- as an escape hatch for people who cannot bear it for whatever reason
|
-- as an escape hatch for people who cannot bear it for whatever reason
|
||||||
indicator_icon = '▎',
|
indicator_style = '▎',
|
||||||
buffer_close_icon = '',
|
buffer_close_icon = '',
|
||||||
modified_icon = '●',
|
modified_icon = '●',
|
||||||
close_icon = '',
|
close_icon = '',
|
||||||
@@ -35,7 +35,7 @@ require('bufferline').setup {
|
|||||||
max_prefix_length = 15, -- prefix used when a buffer is de-duplicated
|
max_prefix_length = 15, -- prefix used when a buffer is de-duplicated
|
||||||
tab_size = 18,
|
tab_size = 18,
|
||||||
-- diagnostics = false | "nvim_lsp" | "coc",
|
-- diagnostics = false | "nvim_lsp" | "coc",
|
||||||
diagnostics = "coc",
|
diagnostics = "nvim_lsp",
|
||||||
diagnostics_update_in_insert = false,
|
diagnostics_update_in_insert = false,
|
||||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||||
local s = " "
|
local s = " "
|
||||||
|
|||||||
38
nvim/plugin-confs/copilot.lua
Normal file
38
nvim/plugin-confs/copilot.lua
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
require('copilot').setup({
|
||||||
|
panel = {
|
||||||
|
enabled = true,
|
||||||
|
auto_refresh = false,
|
||||||
|
keymap = {
|
||||||
|
jump_prev = "[[",
|
||||||
|
jump_next = "]]",
|
||||||
|
accept = "<CR>",
|
||||||
|
refresh = "gr",
|
||||||
|
open = "<S-CR>"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
suggestion = {
|
||||||
|
enabled = true,
|
||||||
|
auto_trigger = false,
|
||||||
|
debounce = 75,
|
||||||
|
keymap = {
|
||||||
|
accept = "<M-l>",
|
||||||
|
next = "<M-]>",
|
||||||
|
prev = "<M-[>",
|
||||||
|
dismiss = "<C-]>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filetypes = {
|
||||||
|
yaml = false,
|
||||||
|
markdown = false,
|
||||||
|
help = false,
|
||||||
|
gitcommit = false,
|
||||||
|
gitrebase = false,
|
||||||
|
hgcommit = false,
|
||||||
|
svn = false,
|
||||||
|
cvs = false,
|
||||||
|
["."] = false,
|
||||||
|
},
|
||||||
|
copilot_node_command = 'node', -- Node version must be < 18
|
||||||
|
plugin_manager_path = vim.fn.stdpath("data") .. "/site/pack/packer",
|
||||||
|
server_opts_overrides = {},
|
||||||
|
})
|
||||||
@@ -1,27 +1,57 @@
|
|||||||
require('doom-one').setup({
|
-- require('doom-one').setup({
|
||||||
cursor_coloring = false,
|
-- cursor_coloring = false,
|
||||||
terminal_colors = false,
|
-- terminal_colors = false,
|
||||||
italic_comments = false,
|
-- italic_comments = false,
|
||||||
enable_treesitter = true,
|
-- enable_treesitter = true,
|
||||||
transparent_background = false,
|
-- transparent_background = false,
|
||||||
pumblend = {
|
-- pumblend = {
|
||||||
enable = true,
|
-- enable = true,
|
||||||
transparency_amount = 20,
|
-- transparency_amount = 20,
|
||||||
},
|
-- },
|
||||||
plugins_integrations = {
|
-- plugins_integrations = {
|
||||||
neorg = true,
|
-- neorg = true,
|
||||||
barbar = true,
|
-- barbar = true,
|
||||||
bufferline = false,
|
-- bufferline = false,
|
||||||
gitgutter = false,
|
-- gitgutter = false,
|
||||||
gitsigns = true,
|
-- gitsigns = true,
|
||||||
telescope = false,
|
-- telescope = false,
|
||||||
neogit = true,
|
-- neogit = true,
|
||||||
nvim_tree = true,
|
-- nvim_tree = true,
|
||||||
dashboard = true,
|
-- dashboard = true,
|
||||||
startify = true,
|
-- startify = true,
|
||||||
whichkey = true,
|
-- whichkey = true,
|
||||||
indent_blankline = true,
|
-- indent_blankline = true,
|
||||||
vim_illuminate = true,
|
-- vim_illuminate = true,
|
||||||
lspsaga = false,
|
-- lspsaga = false,
|
||||||
},
|
-- },
|
||||||
})
|
-- })
|
||||||
|
|
||||||
|
|
||||||
|
vim.g.doom_one_cursor_coloring = true
|
||||||
|
-- Set :terminal colors
|
||||||
|
vim.g.doom_one_terminal_colors = true
|
||||||
|
-- Enable italic comments
|
||||||
|
vim.g.doom_one_italic_comments = false
|
||||||
|
-- Enable TS support
|
||||||
|
vim.g.doom_one_enable_treesitter = true
|
||||||
|
-- Color whole diagnostic text or only underline
|
||||||
|
vim.g.doom_one_diagnostics_text_color = true
|
||||||
|
-- Enable transparent background
|
||||||
|
vim.g.doom_one_transparent_background = false
|
||||||
|
|
||||||
|
-- Pumblend transparency
|
||||||
|
vim.g.doom_one_pumblend_enable = false
|
||||||
|
vim.g.doom_one_pumblend_transparency = 20
|
||||||
|
|
||||||
|
-- Plugins integration
|
||||||
|
vim.g.doom_one_plugin_neorg = true
|
||||||
|
vim.g.doom_one_plugin_barbar = false
|
||||||
|
vim.g.doom_one_plugin_telescope = false
|
||||||
|
vim.g.doom_one_plugin_neogit = true
|
||||||
|
vim.g.doom_one_plugin_nvim_tree = true
|
||||||
|
vim.g.doom_one_plugin_dashboard = true
|
||||||
|
vim.g.doom_one_plugin_startify = true
|
||||||
|
vim.g.doom_one_plugin_whichkey = true
|
||||||
|
vim.g.doom_one_plugin_indent_blankline = true
|
||||||
|
vim.g.doom_one_plugin_vim_illuminate = true
|
||||||
|
vim.g.doom_one_plugin_lspsaga = false
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
-- lspkind.lua
|
||||||
|
local lspkind = require("lspkind")
|
||||||
|
lspkind.init({
|
||||||
|
symbol_map = {
|
||||||
|
Copilot = ""
|
||||||
|
},
|
||||||
|
})
|
||||||
|
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", {fg ="#6CC644"})
|
||||||
|
|||||||
@@ -1,55 +1,53 @@
|
|||||||
cfg = {
|
cfg = {
|
||||||
debug = false, -- set to true to enable debug logging
|
debug = false, -- set to true to enable debug logging
|
||||||
log_path = vim.fn.stdpath("cache") .. "/lsp_signature.log", -- log dir when debug is on
|
log_path = vim.fn.stdpath("cache") .. "/lsp_signature.log", -- log dir when debug is on
|
||||||
-- default is ~/.cache/nvim/lsp_signature.log
|
-- default is ~/.cache/nvim/lsp_signature.log
|
||||||
verbose = false, -- show debug line number
|
verbose = false, -- show debug line number
|
||||||
|
|
||||||
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
||||||
-- If you want to hook lspsaga or other signature handler, pls set to false
|
-- If you want to hook lspsaga or other signature handler, pls set to false
|
||||||
doc_lines = 10, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated);
|
doc_lines = 12, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated);
|
||||||
-- set to 0 if you DO NOT want any API comments be shown
|
-- set to 0 if you DO NOT want any API comments be shown
|
||||||
-- This setting only take effect in insert mode, it does not affect signature help in normal
|
-- This setting only take effect in insert mode, it does not affect signature help in normal
|
||||||
-- mode, 10 by default
|
-- mode, 10 by default
|
||||||
|
|
||||||
floating_window = true, -- show hint in a floating window, set to false for virtual text only mode
|
floating_window = true, -- show hint in a floating window, set to false for virtual text only mode
|
||||||
|
floating_window_above_cur_line = true, -- try to place the floating above the current line when possible Note:
|
||||||
|
-- will set to true when fully tested, set to false will use whichever side has more space
|
||||||
|
-- this setting will be helpful if you do not want the PUM and floating win overlap
|
||||||
|
|
||||||
floating_window_above_cur_line = true, -- try to place the floating above the current line when possible Note:
|
floating_window_off_x = 1, -- adjust float windows x position.
|
||||||
-- will set to true when fully tested, set to false will use whichever side has more space
|
floating_window_off_y = -1, -- adjust float windows y position.
|
||||||
-- this setting will be helpful if you do not want the PUM and floating win overlap
|
|
||||||
|
|
||||||
floating_window_off_x = 1, -- adjust float windows x position.
|
fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters
|
||||||
floating_window_off_y = 1, -- adjust float windows y position.
|
hint_enable = true, -- virtual hint enable
|
||||||
|
hint_prefix = " ", -- Panda for parameter
|
||||||
|
hint_scheme = "String",
|
||||||
|
hi_parameter = "LspSignatureActiveParameter", -- how your parameter will be highlight
|
||||||
|
max_height = 15, -- max height of signature floating_window, if content is more than max_height, you can scroll down
|
||||||
|
-- to view the hiding contents
|
||||||
|
max_width = 85, -- max_width of signature floating_window, line will be wrapped if exceed max_width
|
||||||
|
handler_opts = {
|
||||||
|
border = "rounded" -- double, rounded, single, shadow, none
|
||||||
|
},
|
||||||
|
|
||||||
|
always_trigger = false, -- sometime show signature on new line or in middle of parameter can be confusing, set it to false for #58
|
||||||
|
|
||||||
fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters
|
auto_close_after = nil, -- autoclose signature float win after x sec, disabled if nil.
|
||||||
hint_enable = true, -- virtual hint enable
|
extra_trigger_chars = {}, -- Array of extra characters that will trigger signature completion, e.g., {"(", ","}
|
||||||
hint_prefix = " ", -- Panda for parameter
|
zindex = 200, -- by default it will be on top of all floating windows, set to <= 50 send it to bottom
|
||||||
hint_scheme = "String",
|
|
||||||
hi_parameter = "LspSignatureActiveParameter", -- how your parameter will be highlight
|
|
||||||
max_height = 12, -- max height of signature floating_window, if content is more than max_height, you can scroll down
|
|
||||||
-- to view the hiding contents
|
|
||||||
max_width = 80, -- max_width of signature floating_window, line will be wrapped if exceed max_width
|
|
||||||
handler_opts = {
|
|
||||||
border = "rounded" -- double, rounded, single, shadow, none
|
|
||||||
},
|
|
||||||
|
|
||||||
always_trigger = false, -- sometime show signature on new line or in middle of parameter can be confusing, set it to false for #58
|
padding = '', -- character to pad on left and right of signature can be ' ', or '|' etc
|
||||||
|
|
||||||
auto_close_after = nil, -- autoclose signature float win after x sec, disabled if nil.
|
transparency = nil, -- disabled by default, allow floating win transparent value 1~100
|
||||||
extra_trigger_chars = {}, -- Array of extra characters that will trigger signature completion, e.g., {"(", ","}
|
shadow_blend = 36, -- if you using shadow as border use this set the opacity
|
||||||
zindex = 200, -- by default it will be on top of all floating windows, set to <= 50 send it to bottom
|
shadow_guibg = 'Black', -- if you using shadow as border use this set the color e.g. 'Green' or '#121315'
|
||||||
|
timer_interval = 200, -- default timer check interval set to lower value if you want to reduce latency
|
||||||
padding = '', -- character to pad on left and right of signature can be ' ', or '|' etc
|
toggle_key = nil -- toggle signature on and off in insert mode, e.g. toggle_key = '<M-x>'
|
||||||
|
|
||||||
transparency = nil, -- disabled by default, allow floating win transparent value 1~100
|
|
||||||
shadow_blend = 36, -- if you using shadow as border use this set the opacity
|
|
||||||
shadow_guibg = 'Black', -- if you using shadow as border use this set the color e.g. 'Green' or '#121315'
|
|
||||||
timer_interval = 200, -- default timer check interval set to lower value if you want to reduce latency
|
|
||||||
toggle_key = nil -- toggle signature on and off in insert mode, e.g. toggle_key = '<M-x>'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- recommended:
|
-- recommended:
|
||||||
require'lsp_signature'.setup(cfg) -- no need to specify bufnr if you don't use toggle_key
|
require 'lsp_signature'.setup(cfg) -- no need to specify bufnr if you don't use toggle_key
|
||||||
|
|
||||||
-- You can also do this inside lsp on_attach
|
-- You can also do this inside lsp on_attach
|
||||||
-- note: on_attach deprecated
|
-- note: on_attach deprecated
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local opts = { noremap=true, silent=true }
|
local opts = { noremap = true, silent = true }
|
||||||
vim.api.nvim_set_keymap('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
|
vim.api.nvim_set_keymap('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
|
||||||
vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
|
vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
|
||||||
vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
|
vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
|
||||||
@@ -7,38 +7,38 @@ vim.api.nvim_set_keymap('n', '<space>q', '<cmd>lua vim.diagnostic.setloclist()<C
|
|||||||
-- Use an on_attach function to only map the following keys
|
-- Use an on_attach function to only map the following keys
|
||||||
-- after the language server attaches to the current buffer
|
-- after the language server attaches to the current buffer
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
-- Enable completion triggered by <c-x><c-o>
|
-- Enable completion triggered by <c-x><c-o>
|
||||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
|
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||||
-- set in ~/.config/nvim/keybindings.vim
|
-- set in ~/.config/nvim/keybindings.vim
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-s>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-s>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||||
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||||
-- highlighting things under cursor
|
-- highlighting things under cursor
|
||||||
-- if client.resolved_capabilities.document_highlight then
|
-- if client.resolved_capabilities.document_highlight then
|
||||||
-- vim.cmd [[
|
-- vim.cmd [[
|
||||||
-- hi! LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow
|
-- hi! LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow
|
||||||
-- hi! LspReferenceText cterm=bold ctermbg=red guibg=LightYellow
|
-- hi! LspReferenceText cterm=bold ctermbg=red guibg=LightYellow
|
||||||
-- hi! LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow
|
-- hi! LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow
|
||||||
-- augroup lsp_document_highlight
|
-- augroup lsp_document_highlight
|
||||||
-- autocmd! * <buffer>
|
-- autocmd! * <buffer>
|
||||||
-- autocmd! CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
-- autocmd! CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
||||||
-- autocmd! CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
-- autocmd! CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
||||||
-- augroup END
|
-- augroup END
|
||||||
-- ]]
|
-- ]]
|
||||||
-- end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.cmd [[autocmd! ColorScheme * highlight NormalFloat guibg=#1f2335]]
|
vim.cmd [[autocmd! ColorScheme * highlight NormalFloat guibg=#1f2335]]
|
||||||
@@ -60,21 +60,31 @@ vim.cmd [[autocmd! ColorScheme * highlight FloatBorder guifg=white guibg=#1f2335
|
|||||||
-- rounded
|
-- rounded
|
||||||
|
|
||||||
local border = {
|
local border = {
|
||||||
{"╭", "FloatBorder"},
|
{ "╭", "FloatBorder" },
|
||||||
{"─", "FloatBorder"},
|
{ "─", "FloatBorder" },
|
||||||
{"╮", "FloatBorder"},
|
{ "╮", "FloatBorder" },
|
||||||
{"│", "FloatBorder"},
|
{ "│", "FloatBorder" },
|
||||||
{"╯", "FloatBorder"},
|
{ "╯", "FloatBorder" },
|
||||||
{"─", "FloatBorder"},
|
{ "─", "FloatBorder" },
|
||||||
{"╰", "FloatBorder"},
|
{ "╰", "FloatBorder" },
|
||||||
{"│", "FloatBorder"},
|
{ "│", "FloatBorder" },
|
||||||
}
|
}
|
||||||
|
|
||||||
local handlers = {
|
|
||||||
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border}),
|
local handlers = {
|
||||||
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {border = border }),
|
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border }),
|
||||||
|
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border }),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
|
||||||
|
-- function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
|
||||||
|
-- opts = {
|
||||||
|
-- { "border", border },
|
||||||
|
-- }
|
||||||
|
-- opts.border = opts.border or border
|
||||||
|
-- return orig_util_open_floating_preview(contents, syntax, opts, ...)
|
||||||
|
-- end
|
||||||
|
|
||||||
local DEFAULT_SETTINGS = {
|
local DEFAULT_SETTINGS = {
|
||||||
ui = {
|
ui = {
|
||||||
icons = {
|
icons = {
|
||||||
@@ -110,7 +120,7 @@ local DEFAULT_SETTINGS = {
|
|||||||
install_args = {},
|
install_args = {},
|
||||||
},
|
},
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
handlers=handlers,
|
handlers = handlers,
|
||||||
|
|
||||||
-- Controls to which degree logs are written to the log file. It's useful to set this to vim.log.levels.DEBUG when
|
-- Controls to which degree logs are written to the log file. It's useful to set this to vim.log.levels.DEBUG when
|
||||||
-- debugging issues with server installations.
|
-- debugging issues with server installations.
|
||||||
@@ -122,36 +132,36 @@ local DEFAULT_SETTINGS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = true,
|
virtual_text = true,
|
||||||
signs = true,
|
signs = true,
|
||||||
underline = false,
|
underline = false,
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||||
for type, icon in pairs(signs) do
|
for type, icon in pairs(signs) do
|
||||||
local hl = "DiagnosticSign" .. type
|
local hl = "DiagnosticSign" .. type
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||||
end
|
end
|
||||||
|
|
||||||
function PrintDiagnostics(opts, bufnr, line_nr, client_id)
|
function PrintDiagnostics(opts, bufnr, line_nr, client_id)
|
||||||
bufnr = bufnr or 0
|
bufnr = bufnr or 0
|
||||||
line_nr = line_nr or (vim.api.nvim_win_get_cursor(0)[1] - 1)
|
line_nr = line_nr or (vim.api.nvim_win_get_cursor(0)[1] - 1)
|
||||||
opts = opts or {['lnum'] = line_nr}
|
opts = opts or { ['lnum'] = line_nr }
|
||||||
|
|
||||||
local line_diagnostics = vim.diagnostic.get(bufnr, opts)
|
local line_diagnostics = vim.diagnostic.get(bufnr, opts)
|
||||||
if vim.tbl_isempty(line_diagnostics) then return end
|
if vim.tbl_isempty(line_diagnostics) then return end
|
||||||
|
|
||||||
local diagnostic_message = ""
|
local diagnostic_message = ""
|
||||||
for i, diagnostic in ipairs(line_diagnostics) do
|
for i, diagnostic in ipairs(line_diagnostics) do
|
||||||
diagnostic_message = diagnostic_message .. string.format("%d: %s", i, diagnostic.message or "")
|
diagnostic_message = diagnostic_message .. string.format("%d: %s", i, diagnostic.message or "")
|
||||||
print(diagnostic_message)
|
print(diagnostic_message)
|
||||||
if i ~= #line_diagnostics then
|
if i ~= #line_diagnostics then
|
||||||
diagnostic_message = diagnostic_message .. "\n"
|
diagnostic_message = diagnostic_message .. "\n"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
vim.api.nvim_echo({ { diagnostic_message, "Normal" } }, false, {})
|
||||||
vim.api.nvim_echo({{diagnostic_message, "Normal"}}, false, {})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- vim.cmd [[ autocmd! CursorHold * lua PrintDiagnostics() ]]
|
-- vim.cmd [[ autocmd! CursorHold * lua PrintDiagnostics() ]]
|
||||||
@@ -174,15 +184,34 @@ lsp_installer.on_server_ready(function(server)
|
|||||||
server:setup(DEFAULT_SETTINGS)
|
server:setup(DEFAULT_SETTINGS)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- local servers = { 'jedi_language_server', 'bashls', 'vimls', 'yamlls', 'dockerls', 'rust_analyzer', 'clangd', 'ansiblels' }
|
||||||
local servers = { 'pyright', 'bashls', 'sqls', 'vimls', 'yamlls', 'dockerls', 'html', 'sumneko_lua', 'jsonls', 'dotls', 'rust_analyzer', 'clangd' }
|
-- for _, lsp in pairs(servers) do
|
||||||
for _, lsp in pairs(servers) do
|
-- require('lspconfig')[lsp].setup {
|
||||||
require('lspconfig')[lsp].setup {
|
-- on_attach = on_attach,
|
||||||
on_attach = on_attach,
|
-- handlers = handlers,
|
||||||
flags = {
|
-- flags = {
|
||||||
-- This will be the default in neovim 0.7+
|
-- -- This will be the default in neovim 0.7+
|
||||||
debounce_text_changes = 150,
|
-- debounce_text_changes = 150,
|
||||||
}
|
-- }
|
||||||
}
|
-- }
|
||||||
end
|
-- end
|
||||||
|
|
||||||
|
-- local plugins_path = vim.fn.stdpath("data") .. "site/autoload/plug.vim"
|
||||||
|
-- local dir_list = vim.fn.glob(plugins_path .. "/*", true, true)
|
||||||
|
-- local library_table = {}
|
||||||
|
-- for _, v in ipairs(dir_list) do
|
||||||
|
-- library_table[v .. "/lua"] = true
|
||||||
|
-- end
|
||||||
|
-- library_table[vim.fn.expand("$VIMRUNTIME/lua")] = true
|
||||||
|
-- library_table[vim.fn.stdpath("config") .. "/lua"] = true
|
||||||
|
-- require('lspconfig').sumneko_lua.setup({
|
||||||
|
-- settings = {
|
||||||
|
-- Lua = {
|
||||||
|
-- diagnostics = { globals = { "vim" } },
|
||||||
|
-- workspace = { library = library_table },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- })
|
||||||
|
|
||||||
|
-- -- require 'lspconfig'.bashls.setup {}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
require("lsp_lines").register_lsp_virtual_lines()
|
require("lsp_lines").setup()
|
||||||
-- Disable virtual_text since it's redundant due to lsp_lines.
|
-- Disable virtual_text since it's redundant due to lsp_lines.
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = false,
|
virtual_text = false,
|
||||||
|
|||||||
@@ -1,52 +1,52 @@
|
|||||||
require('lualine').setup {
|
require('lualine').setup {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = 'codedark',
|
theme = 'codedark',
|
||||||
-- theme = 'dracula',
|
-- theme = 'dracula',
|
||||||
-- theme = 'horizon',
|
-- theme = 'horizon',
|
||||||
-- theme = 'onedark',
|
-- theme = 'onedark',
|
||||||
component_separators = { left = '', right = ''},
|
component_separators = { left = '', right = '' },
|
||||||
section_separators = { left = '', right = ''},
|
section_separators = { left = '', right = ''},
|
||||||
disabled_filetypes = {},
|
disabled_filetypes = {},
|
||||||
always_divide_middle = true,
|
always_divide_middle = true,
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { 'mode' },
|
lualine_a = { 'mode' },
|
||||||
lualine_b = {'branch', 'diff'},
|
lualine_b = { 'branch', 'diff' },
|
||||||
lualine_c = {'filename'},
|
lualine_c = { 'filename' },
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{
|
{
|
||||||
'diagnostics',
|
'diagnostics',
|
||||||
'fileformat',
|
'fileformat',
|
||||||
symbols = {
|
symbols = {
|
||||||
unix = '', -- e712
|
unix = '', -- e712
|
||||||
dos = '', -- e70f
|
dos = '', -- e70f
|
||||||
mac = '', -- e711
|
mac = '', -- e711
|
||||||
}
|
}
|
||||||
}, 'encoding', 'fileformat', {'filetype', colored=true, icon_only=false}},
|
}, 'encoding', 'fileformat', { 'filetype', colored = true, icon_only = false } },
|
||||||
lualine_y = {'progress'},
|
lualine_y = { 'progress' },
|
||||||
lualine_z = {'location'}
|
lualine_z = { 'location' }
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = {},
|
lualine_a = {},
|
||||||
lualine_b = {},
|
lualine_b = {},
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{
|
{
|
||||||
'filename',
|
'filename',
|
||||||
file_status = true, -- Displays file status (readonly status, modified status)
|
file_status = true, -- Displays file status (readonly status, modified status)
|
||||||
path = 0, -- 0: Just the filename
|
path = 0, -- 0: Just the filename
|
||||||
shorting_target = 40, -- Shortens path to leave 40 spaces in the window
|
shorting_target = 40, -- Shortens path to leave 40 spaces in the window
|
||||||
symbols = {
|
symbols = {
|
||||||
modified = '[+]', -- Text to show when the file is modified.
|
modified = '[+]', -- Text to show when the file is modified.
|
||||||
readonly = '[-]', -- Text to show when the file is non-modifiable or readonly.
|
readonly = '[-]', -- Text to show when the file is non-modifiable or readonly.
|
||||||
unnamed = '[No Name]', -- Text to show for unnamed buffers.
|
unnamed = '[No Name]', -- Text to show for unnamed buffers.
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_x = {'location'},
|
lualine_x = { 'location' },
|
||||||
lualine_y = {},
|
lualine_y = {},
|
||||||
lualine_z = {}
|
lualine_z = {}
|
||||||
},
|
},
|
||||||
tabline = {},
|
tabline = {},
|
||||||
extensions = {'quickfix', 'fzf', 'nvim-tree', 'symbols-outline', 'fugitive'}
|
extensions = { 'quickfix', 'fzf', 'nvim-tree', 'symbols-outline', 'fugitive' }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local helpers = require("null-ls.helpers")
|
|||||||
|
|
||||||
require("null-ls").setup({
|
require("null-ls").setup({
|
||||||
on_attach = function(client)
|
on_attach = function(client)
|
||||||
if client.resolved_capabilities.document_formatting then
|
if client.supports_method "textDocument/formatting" then
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
augroup LspFormatting
|
augroup LspFormatting
|
||||||
autocmd! * <buffer>
|
autocmd! * <buffer>
|
||||||
@@ -13,34 +13,37 @@ require("null-ls").setup({
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
sources = {
|
sources = {
|
||||||
require("null-ls").builtins.completion.spell,
|
null_ls.builtins.completion.spell,
|
||||||
require("null-ls").builtins.completion.luasnip,
|
null_ls.builtins.completion.luasnip,
|
||||||
require("null-ls").builtins.code_actions.gitsigns,
|
null_ls.builtins.code_actions.gitsigns,
|
||||||
require("null-ls").builtins.code_actions.shellcheck,
|
null_ls.builtins.code_actions.shellcheck,
|
||||||
require("null-ls").builtins.diagnostics.cppcheck,
|
null_ls.builtins.diagnostics.cppcheck,
|
||||||
require("null-ls").builtins.diagnostics.gitlint,
|
null_ls.builtins.diagnostics.gitlint,
|
||||||
require("null-ls").builtins.diagnostics.jsonlint,
|
null_ls.builtins.diagnostics.jsonlint,
|
||||||
require("null-ls").builtins.diagnostics.luacheck,
|
-- require("null-ls").builtins.diagnostics.luacheck,
|
||||||
require("null-ls").builtins.diagnostics.markdownlint,
|
null_ls.builtins.diagnostics.markdownlint,
|
||||||
require("null-ls").builtins.diagnostics.pylint,
|
null_ls.builtins.diagnostics.pylint,
|
||||||
require("null-ls").builtins.diagnostics.pydocstyle.with({
|
null_ls.builtins.diagnostics.pydocstyle.with({
|
||||||
extra_args = { "--config=$ROOT/setup.cfg" }
|
extra_args = { "--config=$ROOT/setup.cfg" }
|
||||||
}),
|
}),
|
||||||
require("null-ls").builtins.diagnostics.vint,
|
null_ls.builtins.diagnostics.vint,
|
||||||
require("null-ls").builtins.formatting.json_tool,
|
null_ls.builtins.diagnostics.shellcheck.with({
|
||||||
require("null-ls").builtins.formatting.lua_format,
|
extra_args = { "-s", "bash", "-o", "add-default-case, check-set-e-suppressed, check-unassigned-uppercase, deprecate-which, quote-safe-variables" }
|
||||||
require("null-ls").builtins.formatting.markdownlint,
|
|
||||||
require("null-ls").builtins.formatting.prettier,
|
|
||||||
require("null-ls").builtins.formatting.rustfmt,
|
|
||||||
require("null-ls").builtins.formatting.shfmt.with({
|
|
||||||
filetypes = {"sh", "bash"},
|
|
||||||
extra_args = { "-i", "4", "-ci", "-sr" }
|
|
||||||
}),
|
}),
|
||||||
require("null-ls").builtins.diagnostics.shellcheck.with({
|
null_ls.builtins.diagnostics.ansiblelint,
|
||||||
extra_args = { "-s", "bash", "-o", "check-extra-masked-returns, check-set-e-suppressed, check-unassigned-uppercase, deprecate-which, quote-safe-variables" }
|
null_ls.builtins.formatting.json_tool,
|
||||||
|
-- require("null-ls").builtins.formatting.lua_format,
|
||||||
|
null_ls.builtins.formatting.markdownlint,
|
||||||
|
null_ls.builtins.formatting.prettier,
|
||||||
|
-- handled by lsp server
|
||||||
|
-- require("null-ls").builtins.formatting.rustfmt,
|
||||||
|
null_ls.builtins.formatting.shfmt.with({
|
||||||
|
filetypes = { "sh", "bash" },
|
||||||
|
extra_args = { "-i", "0", "-ci", "-sr" }
|
||||||
}),
|
}),
|
||||||
require("null-ls").builtins.formatting.black,
|
null_ls.builtins.formatting.black,
|
||||||
require("null-ls").builtins.formatting.isort,
|
null_ls.builtins.formatting.isort,
|
||||||
|
-- null_ls.builtins.formatting.tidy
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,101 +1,192 @@
|
|||||||
-- Setup nvim-cmp.
|
-- Setup nvim-cmp.
|
||||||
local cmp = require'cmp'
|
local cmp = require 'cmp'
|
||||||
local lspkind = require('lspkind')
|
local lspkind = require('lspkind')
|
||||||
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local lspconfig = require('lspconfig')
|
||||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
|
||||||
|
|
||||||
-- luasnip setup
|
-- luasnip setup
|
||||||
local luasnip = require 'luasnip'
|
local luasnip = require 'luasnip'
|
||||||
|
local highlight = require('cmp.utils.highlight')
|
||||||
|
|
||||||
|
local has_words_before = function()
|
||||||
|
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then return false end
|
||||||
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
return col ~= 0 and vim.api.nvim_buf_get_text(0, line-1, 0, line-1, col, {})[1]:match("^%s*$") == nil
|
||||||
|
end
|
||||||
|
|
||||||
|
lspkind.init({
|
||||||
|
symbol_map = {
|
||||||
|
Copilot = "",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", {fg ="#6CC644"})
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||||
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
-- mapping = {
|
|
||||||
-- ['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
|
||||||
-- ['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
|
|
||||||
-- ['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
|
||||||
-- ['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
|
||||||
-- ['<C-e>'] = cmp.mapping({
|
|
||||||
-- i = cmp.mapping.abort(),
|
|
||||||
-- c = cmp.mapping.close(),
|
|
||||||
-- }),
|
|
||||||
-- ['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
-- },
|
|
||||||
mapping = {
|
mapping = {
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
['<C-p>'] = cmp.mapping(function(fallback)
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
if cmp.visible() then
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
cmp.select_prev_item()
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
elseif luasnip.expand_or_jumpable() then
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
luasnip.expand_or_jump()
|
||||||
['<C-e>'] = cmp.mapping.close(),
|
elseif has_words_before() then
|
||||||
['<CR>'] = cmp.mapping.confirm {
|
cmp.complete()
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
else
|
||||||
select = true,
|
fallback()
|
||||||
},
|
end
|
||||||
-- ['<Tab>'] = function(fallback)
|
end, { 'i', 's' }),
|
||||||
-- if cmp.visible() then
|
['<C-n>'] = cmp.mapping(function(fallback)
|
||||||
-- cmp.select_next_item()
|
if cmp.visible() then
|
||||||
-- elseif luasnip.expand_or_jumpable() then
|
cmp.select_next_item()
|
||||||
-- luasnip.expand_or_jump()
|
elseif luasnip.expand_or_jumpable() then
|
||||||
-- else
|
luasnip.expand_or_jump()
|
||||||
-- fallback()
|
elseif has_words_before() then
|
||||||
-- end
|
cmp.complete()
|
||||||
-- end,
|
else
|
||||||
-- ['<S-Tab>'] = function(fallback)
|
fallback()
|
||||||
-- if cmp.visible() then
|
end
|
||||||
-- cmp.select_prev_item()
|
end, { 'i', 's' }),
|
||||||
-- elseif luasnip.jumpable(-1) then
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
-- luasnip.jump(-1)
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
-- else
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
-- fallback()
|
['<C-e>'] = cmp.mapping.close(),
|
||||||
-- end
|
['<CR>'] = cmp.mapping.confirm {
|
||||||
-- end,
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
|
select = true,
|
||||||
|
},
|
||||||
|
-- ["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
-- if cmp.visible() then
|
||||||
|
-- cmp.select_next_item()
|
||||||
|
-- elseif luasnip.expand_or_jumpable() then
|
||||||
|
-- luasnip.expand_or_jump()
|
||||||
|
-- else
|
||||||
|
-- fallback()
|
||||||
|
-- end
|
||||||
|
-- end, { "i", "s" }),
|
||||||
|
["<Tab>"] = vim.schedule_wrap(function(fallback)
|
||||||
|
if cmp.visible() and has_words_before() then
|
||||||
|
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
['<S-Tab>'] = cmp.mapping(function()
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
end
|
||||||
|
end, { "i", "s"}),
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
completion = {
|
||||||
|
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
|
||||||
|
col_offset = -3,
|
||||||
|
side_padding = 0,
|
||||||
|
border = "rounded",
|
||||||
|
borderchars = {
|
||||||
|
"─",
|
||||||
|
"│",
|
||||||
|
"─",
|
||||||
|
"│",
|
||||||
|
"╭",
|
||||||
|
"╮",
|
||||||
|
"╯",
|
||||||
|
"╰",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
documentation = {
|
||||||
|
border = "rounded",
|
||||||
|
borderchars = {
|
||||||
|
"─",
|
||||||
|
"│",
|
||||||
|
"─",
|
||||||
|
"│",
|
||||||
|
"╭",
|
||||||
|
"╮",
|
||||||
|
"╯",
|
||||||
|
"╰",
|
||||||
|
},
|
||||||
|
-- padding = 15,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
formatting = {
|
formatting = {
|
||||||
format = lspkind.cmp_format({
|
fields = { "kind", "abbr", "menu" },
|
||||||
mode = 'symbol', -- show only symbol annotations
|
format = function(entry, vim_item)
|
||||||
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 75 })(entry, vim_item)
|
||||||
|
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
||||||
|
kind.kind = " " .. strings[1] .. " "
|
||||||
|
kind.menu = " (" .. strings[2] .. ")"
|
||||||
|
|
||||||
-- The function below will be called before any actual modifications from lspkind
|
return kind
|
||||||
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
|
end,
|
||||||
-- before = function (entry, vim_item)
|
-- format = lspkind.cmp_format({
|
||||||
-- ...
|
-- mode = 'symbol_text', -- show only symbol annotations
|
||||||
-- return vim_item
|
-- menu = ({
|
||||||
-- end
|
-- buffer = "[Buffer]",
|
||||||
})
|
-- nvim_lsp = "[LSP]",
|
||||||
|
-- luasnip = "[LuaSnip]",
|
||||||
|
-- nvim_lua = "[Lua]",
|
||||||
|
-- latex_symbols = "[Latex]",
|
||||||
|
-- })
|
||||||
|
-- })
|
||||||
},
|
},
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = "copilot", group_index = 2 },
|
||||||
-- { name = 'vsnip' }, -- For vsnip users.
|
{ name = 'nvim_lsp', group_index = 2 },
|
||||||
{ name = 'luasnip' }, -- For luasnip users.
|
{ name = 'nvim_lsp_signature_help', group_index = 2 },
|
||||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
{ name = "path", group_index = 2 },
|
||||||
-- { name = 'snippy' }, -- For snippy users.
|
{ name = 'luasnip', group_index = 2 }, -- For luasnip users.
|
||||||
|
{
|
||||||
|
name = 'buffer',
|
||||||
|
option = {
|
||||||
|
get_bufnrs = function()
|
||||||
|
local bufs = {}
|
||||||
|
for _, win in ipairs(vim.api.nvim_list_wins()) do
|
||||||
|
bufs[vim.api.nvim_win_get_buf(win)] = true
|
||||||
|
end
|
||||||
|
return vim.tbl_keys(bufs)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-- { name = 'ultisnips' }, -- For ultisnips users.
|
||||||
|
-- { name = 'snippy' }, -- For snippy users.
|
||||||
}, {
|
}, {
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
})
|
}),
|
||||||
})
|
sorting = {
|
||||||
|
priority_weight = 2,
|
||||||
|
comparators = {
|
||||||
-- Setup lspconfig.
|
cmp.config.compare.offset,
|
||||||
-- local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
cmp.config.compare.exact,
|
||||||
-- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
|
cmp.config.compare.score,
|
||||||
-- require('lspconfig')['bashls'].setup {
|
cmp.config.compare.kind,
|
||||||
-- capabilities = capabilities
|
cmp.config.compare.sort_text,
|
||||||
-- }
|
cmp.config.compare.length,
|
||||||
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
|
cmp.config.compare.order,
|
||||||
local lspconfig = require('lspconfig')
|
},
|
||||||
local servers = { 'bashls', 'pyright', 'sqlls', 'jsonls', 'yamlls', 'vimls', 'dotls', 'dockerls' }
|
|
||||||
for _, lsp in ipairs(servers) do
|
|
||||||
lspconfig[lsp].setup {
|
|
||||||
-- on_attach = my_custom_on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
}
|
||||||
end
|
})
|
||||||
|
|
||||||
|
|
||||||
|
local servers = { 'bashls', 'jedi_language_server', 'sqlls', 'jsonls', 'yamlls', 'vimls', 'dotls', 'dockerls' }
|
||||||
|
for _, lsp in ipairs(servers) do
|
||||||
|
lspconfig[lsp].setup {
|
||||||
|
-- on_attach = my_custom_on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
cmp.event:on("menu_opened", function()
|
||||||
|
vim.b.copilot_suggestion_hidden = true
|
||||||
|
end)
|
||||||
|
cmp.event:on("menu_closed", function()
|
||||||
|
vim.b.copilot_suggestion_hidden = false
|
||||||
|
end)
|
||||||
|
|||||||
6
nvim/plugin-confs/nvim-docs-view.lua
Normal file
6
nvim/plugin-confs/nvim-docs-view.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
require("docs-view").setup {
|
||||||
|
-- position = "right",
|
||||||
|
-- width = 90,
|
||||||
|
position = "bottom",
|
||||||
|
height = 20,
|
||||||
|
}
|
||||||
@@ -1,106 +1,106 @@
|
|||||||
require'nvim-tree'.setup {
|
require 'nvim-tree'.setup {
|
||||||
disable_netrw = false,
|
disable_netrw = false,
|
||||||
hijack_netrw = false,
|
hijack_netrw = false,
|
||||||
open_on_setup = false,
|
open_on_setup = false,
|
||||||
ignore_ft_on_setup = {},
|
ignore_ft_on_setup = {},
|
||||||
auto_close = false,
|
-- auto_close = false,
|
||||||
open_on_tab = false,
|
open_on_tab = false,
|
||||||
hijack_cursor = false,
|
hijack_cursor = false,
|
||||||
update_cwd = false,
|
update_cwd = false,
|
||||||
update_to_buf_dir = {
|
-- update_to_buf_dir = {
|
||||||
enable = true,
|
-- enable = true,
|
||||||
auto_open = true,
|
-- auto_open = true,
|
||||||
},
|
-- },
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
enable = true,
|
enable = true,
|
||||||
icons = {
|
icons = {
|
||||||
hint = "",
|
hint = "",
|
||||||
info = "",
|
info = "",
|
||||||
warning = "",
|
warning = "",
|
||||||
error = "",
|
error = "",
|
||||||
}
|
}
|
||||||
},
|
|
||||||
update_focused_file = {
|
|
||||||
enable = false,
|
|
||||||
update_cwd = false,
|
|
||||||
ignore_list = {}
|
|
||||||
},
|
|
||||||
system_open = {
|
|
||||||
cmd = nil,
|
|
||||||
args = {}
|
|
||||||
},
|
|
||||||
filters = {
|
|
||||||
dotfiles = false,
|
|
||||||
custom = {}
|
|
||||||
},
|
|
||||||
git = {
|
|
||||||
enable = true,
|
|
||||||
ignore = true,
|
|
||||||
timeout = 500,
|
|
||||||
},
|
|
||||||
view = {
|
|
||||||
width = 35,
|
|
||||||
height = 35,
|
|
||||||
hide_root_folder = false,
|
|
||||||
side = 'left',
|
|
||||||
auto_resize = false,
|
|
||||||
mappings = {
|
|
||||||
custom_only = false,
|
|
||||||
list = {}
|
|
||||||
},
|
},
|
||||||
number = false,
|
update_focused_file = {
|
||||||
relativenumber = false,
|
enable = false,
|
||||||
signcolumn = "yes"
|
update_cwd = false,
|
||||||
},
|
ignore_list = {}
|
||||||
trash = {
|
|
||||||
cmd = "trash",
|
|
||||||
require_confirm = true
|
|
||||||
},
|
|
||||||
actions = {
|
|
||||||
change_dir = {
|
|
||||||
global = false,
|
|
||||||
},
|
},
|
||||||
open_file = {
|
system_open = {
|
||||||
quit_on_open = false,
|
cmd = nil,
|
||||||
|
args = {}
|
||||||
|
},
|
||||||
|
filters = {
|
||||||
|
dotfiles = false,
|
||||||
|
custom = {}
|
||||||
|
},
|
||||||
|
git = {
|
||||||
|
enable = true,
|
||||||
|
ignore = true,
|
||||||
|
timeout = 500,
|
||||||
|
},
|
||||||
|
view = {
|
||||||
|
width = 35,
|
||||||
|
-- height = 35,
|
||||||
|
hide_root_folder = false,
|
||||||
|
side = 'left',
|
||||||
|
-- auto_resize = false,
|
||||||
|
mappings = {
|
||||||
|
custom_only = false,
|
||||||
|
list = {}
|
||||||
|
},
|
||||||
|
number = false,
|
||||||
|
relativenumber = false,
|
||||||
|
signcolumn = "yes"
|
||||||
|
},
|
||||||
|
trash = {
|
||||||
|
cmd = "trash",
|
||||||
|
require_confirm = true
|
||||||
|
},
|
||||||
|
actions = {
|
||||||
|
change_dir = {
|
||||||
|
global = false,
|
||||||
|
},
|
||||||
|
open_file = {
|
||||||
|
quit_on_open = false,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- local tree_cb = require'nvim-tree.config'.nvim_tree_callback
|
-- local tree_cb = require'nvim-tree.config'.nvim_tree_callback
|
||||||
|
|
||||||
-- default mappings
|
-- default mappings
|
||||||
local list = {
|
local list = {
|
||||||
{ key = {"<CR>", "o", "<2-LeftMouse>"}, action = "edit" },
|
{ key = { "<CR>", "o", "<2-LeftMouse>" }, action = "edit" },
|
||||||
{ key = {"O"}, action = "edit_no_picker" },
|
{ key = { "O" }, action = "edit_no_picker" },
|
||||||
{ key = {"<2-RightMouse>", "<C-]>"}, action = "cd" },
|
{ key = { "<2-RightMouse>", "<C-]>" }, action = "cd" },
|
||||||
{ key = "<C-v>", action = "vsplit" },
|
{ key = "<C-v>", action = "vsplit" },
|
||||||
{ key = "<C-x>", action = "split" },
|
{ key = "<C-x>", action = "split" },
|
||||||
{ key = "<C-t>", action = "tabnew" },
|
{ key = "<C-t>", action = "tabnew" },
|
||||||
{ key = "<", action = "prev_sibling" },
|
{ key = "<", action = "prev_sibling" },
|
||||||
{ key = ">", action = "next_sibling" },
|
{ key = ">", action = "next_sibling" },
|
||||||
{ key = "P", action = "parent_node" },
|
{ key = "P", action = "parent_node" },
|
||||||
{ key = "<BS>", action = "close_node" },
|
{ key = "<BS>", action = "close_node" },
|
||||||
{ key = "<Tab>", action = "preview" },
|
{ key = "<Tab>", action = "preview" },
|
||||||
{ key = "K", action = "first_sibling" },
|
{ key = "K", action = "first_sibling" },
|
||||||
{ key = "J", action = "last_sibling" },
|
{ key = "J", action = "last_sibling" },
|
||||||
{ key = "I", action = "toggle_ignored" },
|
{ key = "I", action = "toggle_ignored" },
|
||||||
{ key = "H", action = "toggle_dotfiles" },
|
{ key = "H", action = "toggle_dotfiles" },
|
||||||
{ key = "R", action = "refresh" },
|
{ key = "R", action = "refresh" },
|
||||||
{ key = "a", action = "create" },
|
{ key = "a", action = "create" },
|
||||||
{ key = "d", action = "remove" },
|
{ key = "d", action = "remove" },
|
||||||
{ key = "D", action = "trash" },
|
{ key = "D", action = "trash" },
|
||||||
{ key = "r", action = "rename" },
|
{ key = "r", action = "rename" },
|
||||||
{ key = "<C-r>", action = "full_rename" },
|
{ key = "<C-r>", action = "full_rename" },
|
||||||
{ key = "x", action = "cut" },
|
{ key = "x", action = "cut" },
|
||||||
{ key = "c", action = "copy" },
|
{ key = "c", action = "copy" },
|
||||||
{ key = "p", action = "paste" },
|
{ key = "p", action = "paste" },
|
||||||
{ key = "y", action = "copy_name" },
|
{ key = "y", action = "copy_name" },
|
||||||
{ key = "Y", action = "copy_path" },
|
{ key = "Y", action = "copy_path" },
|
||||||
{ key = "gy", action = "copy_absolute_path" },
|
{ key = "gy", action = "copy_absolute_path" },
|
||||||
{ key = "[c", action = "prev_git_item" },
|
{ key = "[c", action = "prev_git_item" },
|
||||||
{ key = "]c", action = "next_git_item" },
|
{ key = "]c", action = "next_git_item" },
|
||||||
{ key = "-", action = "dir_up" },
|
{ key = "-", action = "dir_up" },
|
||||||
{ key = "s", action = "system_open" },
|
{ key = "s", action = "system_open" },
|
||||||
{ key = "q", action = "close" },
|
{ key = "q", action = "close" },
|
||||||
{ key = "g?", action = "toggle_help" },
|
{ key = "g?", action = "toggle_help" },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +1,28 @@
|
|||||||
local onedarkpro = require("onedarkpro")
|
local onedarkpro = require("onedarkpro")
|
||||||
onedarkpro.setup({
|
onedarkpro.setup({
|
||||||
-- Theme can be overwritten with 'onedark' or 'onelight' as a string!
|
|
||||||
-- theme = function()
|
|
||||||
-- if vim.o.background == "dark" then
|
|
||||||
-- return "onedark"
|
|
||||||
-- else
|
|
||||||
-- return "onelight"
|
|
||||||
-- end
|
|
||||||
-- end,
|
|
||||||
theme = "onedark",
|
theme = "onedark",
|
||||||
colors = {}, -- Override default colors. Can specify colors for "onelight" or "onedark" themes by passing in a table
|
-- colors = {}, -- Override default colors. Can specify colors for "onelight" or "onedark" themes by passing in a table
|
||||||
hlgroups = {}, -- Override default highlight groups
|
-- hlgroups = {}, -- Override default highlight groups
|
||||||
plugins = { -- Override which plugins highlight groups are loaded
|
plugins = { -- Override which plugins highlight groups are loaded
|
||||||
native_lsp = true,
|
native_lsp = true,
|
||||||
polygot = true,
|
polygot = true,
|
||||||
treesitter = true,
|
treesitter = true,
|
||||||
-- Others omitted for brevity
|
|
||||||
},
|
},
|
||||||
styles = {
|
styles = {
|
||||||
comments = "italic",
|
comments = "italic",
|
||||||
functions = "bold",
|
functions = "italic,bold",
|
||||||
keywords = "bold,italic",
|
keywords = "italic,bold",
|
||||||
strings = "italic",
|
strings = "NONE",
|
||||||
variables = "bold"
|
variables = "bold"
|
||||||
},
|
},
|
||||||
options = {
|
options = {
|
||||||
bold = true, -- Use the themes opinionated bold styles?
|
bold = true, -- Use the themes opinionated bold styles?
|
||||||
italic = true, -- Use the themes opinionated italic styles?
|
italic = true, -- Use the themes opinionated italic styles?
|
||||||
underline = false, -- Use the themes opinionated underline styles?
|
underline = true, -- Use the themes opinionated underline styles?
|
||||||
undercurl = false, -- Use the themes opinionated undercurl styles?
|
undercurl = false, -- Use the themes opinionated undercurl styles?
|
||||||
cursorline = false, -- Use cursorline highlighting?
|
cursorline = true, -- Use cursorline highlighting?
|
||||||
transparency = false, -- Use a transparent background?
|
transparency = false, -- Use a transparent background?
|
||||||
terminal_colors = true, -- Use the theme's colors for Neovim's :terminal?
|
terminal_colors = false, -- Use the theme's colors for Neovim's :terminal?
|
||||||
window_unfocussed_color = false, -- When the window is out of focus, change the normal background?
|
window_unfocussed_color = false, -- When the window is out of focus, change the normal background?
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
43
nvim/plugin-confs/telescope.lua
Normal file
43
nvim/plugin-confs/telescope.lua
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
require('telescope').setup{
|
||||||
|
defaults = {
|
||||||
|
-- Default configuration for telescope goes here:
|
||||||
|
-- config_key = value,
|
||||||
|
layout_strategy = 'flex',
|
||||||
|
width = 0.9,
|
||||||
|
wrap_results = true,
|
||||||
|
preview = {
|
||||||
|
border = true,
|
||||||
|
borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' },
|
||||||
|
title = true,
|
||||||
|
dynamic_preview_title = true,
|
||||||
|
treesitter = true,
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
-- map actions.which_key to <C-h> (default: <C-/>)
|
||||||
|
-- actions.which_key shows the mappings for your picker,
|
||||||
|
-- e.g. git_{create, delete, ...}_branch for the git_branches picker
|
||||||
|
["<C-h>"] = "which_key"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
-- Default configuration for builtin pickers goes here:
|
||||||
|
-- picker_name = {
|
||||||
|
-- picker_config_key = value,
|
||||||
|
-- ...
|
||||||
|
-- }
|
||||||
|
-- Now the picker_config_key will be applied every time you call this
|
||||||
|
-- builtin picker
|
||||||
|
find_files = {
|
||||||
|
-- theme = "dropdown"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
-- Your extension configuration goes here:
|
||||||
|
-- extension_name = {
|
||||||
|
-- extension_config_key = value,
|
||||||
|
-- }
|
||||||
|
-- please take a look at the readme of the extension you want to configure
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,24 +1,34 @@
|
|||||||
require'nvim-treesitter.configs'.setup {
|
require 'nvim-treesitter.configs'.setup {
|
||||||
-- One of "all", "maintained" (parsers with maintainers), or a list of languages
|
-- One of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||||
ensure_installed = "maintained",
|
-- ensure_installed = "maintained",
|
||||||
|
|
||||||
-- Install languages synchronously (only applied to `ensure_installed`)
|
-- Install languages synchronously (only applied to `ensure_installed`)
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
|
|
||||||
-- List of parsers to ignore installing
|
-- List of parsers to ignore installing
|
||||||
-- ignore_install = { "javascript" },
|
-- ignore_install = { "javascript" },
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
-- `false` will disable the whole extension
|
-- `false` will disable the whole extension
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|
||||||
-- list of language that will be disabled
|
-- list of language that will be disabled
|
||||||
-- disable = { "c", "rust" },
|
-- disable = { "c", "rust" },
|
||||||
|
|
||||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||||
-- Instead of true it can also be a list of languages
|
-- Instead of true it can also be a list of languages
|
||||||
additional_vim_regex_highlighting = false,
|
additional_vim_regex_highlighting = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
incremental_selection = {
|
||||||
|
enable = true,
|
||||||
|
keymaps = {
|
||||||
|
init_selection = "gnn",
|
||||||
|
node_incremental = "grn",
|
||||||
|
scope_incremental = "grc",
|
||||||
|
node_decremental = "grm",
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require("which-key").setup {
|
|||||||
marks = true, -- shows a list of your marks on ' and `
|
marks = true, -- shows a list of your marks on ' and `
|
||||||
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
|
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
|
||||||
spelling = {
|
spelling = {
|
||||||
enabled = false, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
|
enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
|
||||||
suggestions = 20, -- how many suggestions should be shown in the list?
|
suggestions = 20, -- how many suggestions should be shown in the list?
|
||||||
},
|
},
|
||||||
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
||||||
@@ -53,8 +53,9 @@ require("which-key").setup {
|
|||||||
ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label
|
ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label
|
||||||
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
|
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
|
||||||
show_help = true, -- show help message on the command line when the popup is visible
|
show_help = true, -- show help message on the command line when the popup is visible
|
||||||
|
show_keys = true, -- show the key strokes for your commands
|
||||||
triggers = "auto", -- automatically setup triggers
|
triggers = "auto", -- automatically setup triggers
|
||||||
-- triggers = {"<leader>"} -- or specify a list manually
|
-- triggers = {"<leader>"}, -- or specify a list manually
|
||||||
triggers_blacklist = {
|
triggers_blacklist = {
|
||||||
-- list of mode / prefixes that should never be hooked by WhichKey
|
-- list of mode / prefixes that should never be hooked by WhichKey
|
||||||
-- this is mostly relevant for key maps that start with a native binding
|
-- this is mostly relevant for key maps that start with a native binding
|
||||||
@@ -62,4 +63,8 @@ require("which-key").setup {
|
|||||||
i = { "j", "k" },
|
i = { "j", "k" },
|
||||||
v = { "j", "k" },
|
v = { "j", "k" },
|
||||||
},
|
},
|
||||||
|
disable = {
|
||||||
|
buftypes = {},
|
||||||
|
filetypes = { "TelescopePrompt" },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
340
nvim/plugin/packer_compiled.lua
Normal file
340
nvim/plugin/packer_compiled.lua
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
-- Automatically generated packer.nvim plugin loader code
|
||||||
|
|
||||||
|
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
|
||||||
|
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_command('packadd packer.nvim')
|
||||||
|
|
||||||
|
local no_errors, error_msg = pcall(function()
|
||||||
|
|
||||||
|
_G._packer = _G._packer or {}
|
||||||
|
_G._packer.inside_compile = true
|
||||||
|
|
||||||
|
local time
|
||||||
|
local profile_info
|
||||||
|
local should_profile = false
|
||||||
|
if should_profile then
|
||||||
|
local hrtime = vim.loop.hrtime
|
||||||
|
profile_info = {}
|
||||||
|
time = function(chunk, start)
|
||||||
|
if start then
|
||||||
|
profile_info[chunk] = hrtime()
|
||||||
|
else
|
||||||
|
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
time = function(chunk, start) end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function save_profiles(threshold)
|
||||||
|
local sorted_times = {}
|
||||||
|
for chunk_name, time_taken in pairs(profile_info) do
|
||||||
|
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
||||||
|
end
|
||||||
|
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
||||||
|
local results = {}
|
||||||
|
for i, elem in ipairs(sorted_times) do
|
||||||
|
if not threshold or threshold and elem[2] > threshold then
|
||||||
|
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if threshold then
|
||||||
|
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
|
||||||
|
end
|
||||||
|
|
||||||
|
_G._packer.profile_output = results
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[Luarocks path setup]], true)
|
||||||
|
local package_path_str = "/home/sudacode/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/sudacode/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/sudacode/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/sudacode/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
||||||
|
local install_cpath_pattern = "/home/sudacode/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
||||||
|
if not string.find(package.path, package_path_str, 1, true) then
|
||||||
|
package.path = package.path .. ';' .. package_path_str
|
||||||
|
end
|
||||||
|
|
||||||
|
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
|
||||||
|
package.cpath = package.cpath .. ';' .. install_cpath_pattern
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[Luarocks path setup]], false)
|
||||||
|
time([[try_loadstring definition]], true)
|
||||||
|
local function try_loadstring(s, component, name)
|
||||||
|
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||||
|
if not success then
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[try_loadstring definition]], false)
|
||||||
|
time([[Defining packer_plugins]], true)
|
||||||
|
_G.packer_plugins = {
|
||||||
|
LuaSnip = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||||
|
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||||
|
},
|
||||||
|
["any-jump.vim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/any-jump.vim",
|
||||||
|
url = "https://github.com/pechorin/any-jump.vim"
|
||||||
|
},
|
||||||
|
["auto-pairs"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/auto-pairs",
|
||||||
|
url = "https://github.com/jiangmiao/auto-pairs"
|
||||||
|
},
|
||||||
|
["cmp-buffer"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/cmp-buffer",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-buffer"
|
||||||
|
},
|
||||||
|
["cmp-nvim-lsp"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||||
|
},
|
||||||
|
["cmp-nvim-lsp-signature-help"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help"
|
||||||
|
},
|
||||||
|
["cmp-nvim-lua"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-nvim-lua"
|
||||||
|
},
|
||||||
|
["cmp-path"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/cmp-path",
|
||||||
|
url = "https://github.com/hrsh7th/cmp-path"
|
||||||
|
},
|
||||||
|
cmp_luasnip = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
|
||||||
|
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||||
|
},
|
||||||
|
["copilot-cmp"] = {
|
||||||
|
config = { "\27LJ\2\n=\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\16copilot_cmp\frequire\0" },
|
||||||
|
load_after = {},
|
||||||
|
loaded = true,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/opt/copilot-cmp",
|
||||||
|
url = "https://github.com/zbirenbaum/copilot-cmp"
|
||||||
|
},
|
||||||
|
["copilot.lua"] = {
|
||||||
|
after = { "copilot-cmp" },
|
||||||
|
config = { "\27LJ\2\n¹\3\0\0\6\0\18\0\0256\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\6\0005\3\3\0005\4\4\0=\4\5\3=\3\a\0025\3\b\0005\4\t\0=\4\5\3=\3\n\0026\3\v\0009\3\f\0039\3\r\3'\5\14\0B\3\2\2'\4\15\0&\3\4\3=\3\16\0024\3\0\0=\3\17\2B\0\2\1K\0\1\0\26server_opts_overrides\24plugin_manager_path\22/site/pack/packer\tdata\fstdpath\afn\bvim\15suggestion\1\0\4\tnext\n<M-]>\vaccept\n<Tab>\fdismiss\n<C-]>\tprev\n<M-[>\1\0\3\rdebounce\3K\fenabled\2\17auto_trigger\2\npanel\1\0\1\25copilot_node_command\tnode\vkeymap\1\0\5\14jump_prev\a[[\frefresh\agr\topen\v<M-CR>\vaccept\t<CR>\14jump_next\a]]\1\0\2\17auto_refresh\1\fenabled\2\nsetup\fcopilot\frequire-\1\0\4\0\3\0\0066\0\0\0009\0\1\0003\2\2\0)\3d\0B\0\3\1K\0\1\0\0\rdefer_fn\bvim\0" },
|
||||||
|
load_after = {},
|
||||||
|
loaded = true,
|
||||||
|
needs_bufread = false,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/opt/copilot.lua",
|
||||||
|
url = "https://github.com/zbirenbaum/copilot.lua"
|
||||||
|
},
|
||||||
|
["dashboard-nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/dashboard-nvim",
|
||||||
|
url = "https://github.com/glepnir/dashboard-nvim"
|
||||||
|
},
|
||||||
|
["doom-one.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/doom-one.nvim",
|
||||||
|
url = "https://github.com/NTBBloodbath/doom-one.nvim"
|
||||||
|
},
|
||||||
|
["dracula.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/dracula.nvim",
|
||||||
|
url = "https://github.com/Mofiqul/dracula.nvim"
|
||||||
|
},
|
||||||
|
["fidget.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/fidget.nvim",
|
||||||
|
url = "https://github.com/j-hui/fidget.nvim"
|
||||||
|
},
|
||||||
|
fzf = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/fzf",
|
||||||
|
url = "https://github.com/junegunn/fzf"
|
||||||
|
},
|
||||||
|
["fzf.vim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/fzf.vim",
|
||||||
|
url = "https://github.com/junegunn/fzf.vim"
|
||||||
|
},
|
||||||
|
["github-nvim-theme"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/github-nvim-theme",
|
||||||
|
url = "https://github.com/projekt0n/github-nvim-theme"
|
||||||
|
},
|
||||||
|
["gitsigns.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
|
||||||
|
url = "https://github.com/lewis6991/gitsigns.nvim"
|
||||||
|
},
|
||||||
|
["goto-preview"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/goto-preview",
|
||||||
|
url = "https://github.com/rmagatti/goto-preview"
|
||||||
|
},
|
||||||
|
["hover.nvim"] = {
|
||||||
|
config = { "\27LJ\2\nz\0\0\3\0\4\0\n6\0\0\0'\2\1\0B\0\2\0016\0\0\0'\2\2\0B\0\2\0016\0\0\0'\2\3\0B\0\2\1K\0\1\0\31hover.providers.dictionary\24hover.providers.man\24hover.providers.lsp\frequire°\2\1\0\a\0\17\0!6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0003\3\3\0=\3\5\0025\3\6\0=\3\a\2B\0\2\0016\0\b\0009\0\t\0009\0\n\0'\2\v\0'\3\f\0006\4\0\0'\6\1\0B\4\2\0029\4\1\0045\5\r\0B\0\5\0016\0\b\0009\0\t\0009\0\n\0'\2\v\0'\3\14\0006\4\0\0'\6\1\0B\4\2\0029\4\15\0045\5\16\0B\0\5\1K\0\1\0\1\0\1\tdesc\24hover.nvim (select)\17hover_select\agK\1\0\1\tdesc\15hover.nvim\6K\6n\bset\vkeymap\bvim\17preview_opts\1\0\1\vborder\frounded\tinit\1\0\2\19preview_window\1\ntitle\2\0\nsetup\nhover\frequire\0" },
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/hover.nvim",
|
||||||
|
url = "https://github.com/lewis6991/hover.nvim"
|
||||||
|
},
|
||||||
|
["lsp_lines.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/lsp_lines.nvim",
|
||||||
|
url = "https://github.com/ksyasuda/lsp_lines.nvim"
|
||||||
|
},
|
||||||
|
["lspkind-nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/lspkind-nvim",
|
||||||
|
url = "https://github.com/onsails/lspkind-nvim"
|
||||||
|
},
|
||||||
|
["lualine.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
||||||
|
url = "https://github.com/nvim-lualine/lualine.nvim"
|
||||||
|
},
|
||||||
|
["null-ls.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
|
||||||
|
url = "https://github.com/jose-elias-alvarez/null-ls.nvim"
|
||||||
|
},
|
||||||
|
["nvim-bufferline.lua"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/nvim-bufferline.lua",
|
||||||
|
url = "https://github.com/akinsho/nvim-bufferline.lua"
|
||||||
|
},
|
||||||
|
["nvim-cmp"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||||
|
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||||
|
},
|
||||||
|
["nvim-lsp-installer"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer",
|
||||||
|
url = "https://github.com/williamboman/nvim-lsp-installer"
|
||||||
|
},
|
||||||
|
["nvim-lspconfig"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||||
|
url = "https://github.com/neovim/nvim-lspconfig"
|
||||||
|
},
|
||||||
|
["nvim-lspfuzzy"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/nvim-lspfuzzy",
|
||||||
|
url = "https://github.com/ojroques/nvim-lspfuzzy"
|
||||||
|
},
|
||||||
|
["nvim-tree.lua"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
|
||||||
|
url = "https://github.com/kyazdani42/nvim-tree.lua"
|
||||||
|
},
|
||||||
|
["nvim-treesitter"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||||
|
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
|
},
|
||||||
|
["nvim-web-devicons"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||||
|
url = "https://github.com/kyazdani42/nvim-web-devicons"
|
||||||
|
},
|
||||||
|
["onedarkpro.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/onedarkpro.nvim",
|
||||||
|
url = "https://github.com/olimorris/onedarkpro.nvim"
|
||||||
|
},
|
||||||
|
["packer.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||||
|
url = "https://github.com/wbthomason/packer.nvim"
|
||||||
|
},
|
||||||
|
["plenary.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
||||||
|
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||||
|
},
|
||||||
|
["presence.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/presence.nvim",
|
||||||
|
url = "https://github.com/andweeb/presence.nvim"
|
||||||
|
},
|
||||||
|
["telescope.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||||
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
|
},
|
||||||
|
["vim-commentary"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/vim-commentary",
|
||||||
|
url = "https://github.com/tpope/vim-commentary"
|
||||||
|
},
|
||||||
|
["vim-css-color"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/vim-css-color",
|
||||||
|
url = "https://github.com/ap/vim-css-color"
|
||||||
|
},
|
||||||
|
["vim-floaterm"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/vim-floaterm",
|
||||||
|
url = "https://github.com/voldikss/vim-floaterm"
|
||||||
|
},
|
||||||
|
["vim-surround"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/vim-surround",
|
||||||
|
url = "https://github.com/tpope/vim-surround"
|
||||||
|
},
|
||||||
|
["vim-wakatime"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/vim-wakatime",
|
||||||
|
url = "https://github.com/wakatime/vim-wakatime"
|
||||||
|
},
|
||||||
|
["which-key.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/sudacode/.local/share/nvim/site/pack/packer/start/which-key.nvim",
|
||||||
|
url = "https://github.com/folke/which-key.nvim"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
time([[Defining packer_plugins]], false)
|
||||||
|
-- Config for: hover.nvim
|
||||||
|
time([[Config for hover.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\nz\0\0\3\0\4\0\n6\0\0\0'\2\1\0B\0\2\0016\0\0\0'\2\2\0B\0\2\0016\0\0\0'\2\3\0B\0\2\1K\0\1\0\31hover.providers.dictionary\24hover.providers.man\24hover.providers.lsp\frequire°\2\1\0\a\0\17\0!6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0003\3\3\0=\3\5\0025\3\6\0=\3\a\2B\0\2\0016\0\b\0009\0\t\0009\0\n\0'\2\v\0'\3\f\0006\4\0\0'\6\1\0B\4\2\0029\4\1\0045\5\r\0B\0\5\0016\0\b\0009\0\t\0009\0\n\0'\2\v\0'\3\14\0006\4\0\0'\6\1\0B\4\2\0029\4\15\0045\5\16\0B\0\5\1K\0\1\0\1\0\1\tdesc\24hover.nvim (select)\17hover_select\agK\1\0\1\tdesc\15hover.nvim\6K\6n\bset\vkeymap\bvim\17preview_opts\1\0\1\vborder\frounded\tinit\1\0\2\19preview_window\1\ntitle\2\0\nsetup\nhover\frequire\0", "config", "hover.nvim")
|
||||||
|
time([[Config for hover.nvim]], false)
|
||||||
|
-- Load plugins in order defined by `after`
|
||||||
|
time([[Sequenced loading]], true)
|
||||||
|
vim.cmd [[ packadd lualine.nvim ]]
|
||||||
|
vim.cmd [[ packadd copilot.lua ]]
|
||||||
|
|
||||||
|
-- Config for: copilot.lua
|
||||||
|
try_loadstring("\27LJ\2\n¹\3\0\0\6\0\18\0\0256\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\6\0005\3\3\0005\4\4\0=\4\5\3=\3\a\0025\3\b\0005\4\t\0=\4\5\3=\3\n\0026\3\v\0009\3\f\0039\3\r\3'\5\14\0B\3\2\2'\4\15\0&\3\4\3=\3\16\0024\3\0\0=\3\17\2B\0\2\1K\0\1\0\26server_opts_overrides\24plugin_manager_path\22/site/pack/packer\tdata\fstdpath\afn\bvim\15suggestion\1\0\4\tnext\n<M-]>\vaccept\n<Tab>\fdismiss\n<C-]>\tprev\n<M-[>\1\0\3\rdebounce\3K\fenabled\2\17auto_trigger\2\npanel\1\0\1\25copilot_node_command\tnode\vkeymap\1\0\5\14jump_prev\a[[\frefresh\agr\topen\v<M-CR>\vaccept\t<CR>\14jump_next\a]]\1\0\2\17auto_refresh\1\fenabled\2\nsetup\fcopilot\frequire-\1\0\4\0\3\0\0066\0\0\0009\0\1\0003\2\2\0)\3d\0B\0\3\1K\0\1\0\0\rdefer_fn\bvim\0", "config", "copilot.lua")
|
||||||
|
|
||||||
|
vim.cmd [[ packadd copilot-cmp ]]
|
||||||
|
|
||||||
|
-- Config for: copilot-cmp
|
||||||
|
try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\16copilot_cmp\frequire\0", "config", "copilot-cmp")
|
||||||
|
|
||||||
|
time([[Sequenced loading]], false)
|
||||||
|
|
||||||
|
_G._packer.inside_compile = false
|
||||||
|
if _G._packer.needs_bufread == true then
|
||||||
|
vim.cmd("doautocmd BufRead")
|
||||||
|
end
|
||||||
|
_G._packer.needs_bufread = false
|
||||||
|
|
||||||
|
if should_profile then save_profiles() end
|
||||||
|
|
||||||
|
end)
|
||||||
|
|
||||||
|
if not no_errors then
|
||||||
|
error_msg = error_msg:gsub('"', '\\"')
|
||||||
|
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
||||||
|
end
|
||||||
1
nvim/spell/en.utf-8.add
Normal file
1
nvim/spell/en.utf-8.add
Normal file
@@ -0,0 +1 @@
|
|||||||
|
dt
|
||||||
BIN
nvim/spell/en.utf-8.add.spl
Normal file
BIN
nvim/spell/en.utf-8.add.spl
Normal file
Binary file not shown.
@@ -7,12 +7,12 @@
|
|||||||
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
|
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
|
||||||
# unless explicitly requested using the wintypes option.
|
# unless explicitly requested using the wintypes option.
|
||||||
#
|
#
|
||||||
# shadow = false
|
shadow = true
|
||||||
shadow = true;
|
# shadow = true;
|
||||||
|
|
||||||
# The blur radius for shadows, in pixels. (defaults to 12)
|
# The blur radius for shadows, in pixels. (defaults to 12)
|
||||||
# shadow-radius = 12
|
shadow-radius = 12
|
||||||
shadow-radius = 24;
|
# shadow-radius = 24;
|
||||||
|
|
||||||
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
|
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
|
||||||
# shadow-opacity = .75
|
# shadow-opacity = .75
|
||||||
@@ -163,23 +163,31 @@ opacity-rule = [
|
|||||||
"100:class_g = 'mpv'",
|
"100:class_g = 'mpv'",
|
||||||
|
|
||||||
"95:class_g = 'firefoxdeveloperedition' && focused",
|
"95:class_g = 'firefoxdeveloperedition' && focused",
|
||||||
|
"95:class_g = 'xfreerdp' && focused",
|
||||||
|
|
||||||
"90:class_g = 'Alacritty' && focused",
|
"90:class_g = 'Alacritty' && focused",
|
||||||
|
"90:class_g = 'discord' && focused",
|
||||||
"90:class_g = 'Emacs' && focused",
|
"90:class_g = 'Emacs' && focused",
|
||||||
|
"90:class_g = 'Jellyfin Media Player' && focused",
|
||||||
|
"90:class_g = 'Steam' && focused",
|
||||||
"90:class_g = 'Thunar' && focused",
|
"90:class_g = 'Thunar' && focused",
|
||||||
"90:class_g = 'Thunderbird' && focused",
|
"90:class_g = 'Thunderbird' && focused",
|
||||||
"90:class_g = 'qutebrowser' && focused",
|
"90:class_g = 'qutebrowser' && focused",
|
||||||
|
|
||||||
"90:class_g = 'DBeaver' && !focused",
|
"90:class_g = 'DBeaver' && !focused",
|
||||||
"90:class_g = 'firefoxdeveloperedition' && !focused",
|
"90:class_g = 'firefoxdeveloperedition' && !focused",
|
||||||
|
"90:class_g = 'xfreerdp' && !focused",
|
||||||
|
|
||||||
"85:class_g = 'Alacritty' && !focused",
|
"85:class_g = 'Alacritty' && !focused",
|
||||||
"85:class_g = 'Bitwarden' && !focused",
|
"85:class_g = 'Bitwarden' && !focused",
|
||||||
|
"85:class_g = 'discord' && !focused",
|
||||||
"85:class_g = 'Emacs' && !focused",
|
"85:class_g = 'Emacs' && !focused",
|
||||||
|
"85:class_g = 'Jellyfin Media Player' && !focused",
|
||||||
"85:class_g = 'Joplin' && !focused",
|
"85:class_g = 'Joplin' && !focused",
|
||||||
"85:class_g = 'Microsoft Teams - Preview' && !focused",
|
"85:class_g = 'Microsoft Teams - Preview' && !focused",
|
||||||
"85:class_g = 'Notepadqq' && !focused",
|
"85:class_g = 'Notepadqq' && !focused",
|
||||||
"85:class_g = 'Polybar' && !focused",
|
"85:class_g = 'Polybar' && !focused",
|
||||||
|
"85:class_g = 'Steam' && !focused",
|
||||||
"85:class_g = 'Thunar' && !focused",
|
"85:class_g = 'Thunar' && !focused",
|
||||||
"85:class_g = 'Thunderbird' && !focused",
|
"85:class_g = 'Thunderbird' && !focused",
|
||||||
"85:class_g = 'qutebrowser' && !focused",
|
"85:class_g = 'qutebrowser' && !focused",
|
||||||
@@ -233,7 +241,8 @@ blur-background-exclude = [
|
|||||||
"window_type = 'desktop'",
|
"window_type = 'desktop'",
|
||||||
"_GTK_FRAME_EXTENTS@:c",
|
"_GTK_FRAME_EXTENTS@:c",
|
||||||
"name *= 'rect-overlay'",
|
"name *= 'rect-overlay'",
|
||||||
"name *= 'mpv'"
|
"name *= 'mpv'",
|
||||||
|
"name *= 'Peek'"
|
||||||
];
|
];
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
@@ -270,7 +279,7 @@ mark-ovredir-focused = true;
|
|||||||
# shaped windows. The accuracy is not very high, unfortunately.
|
# shaped windows. The accuracy is not very high, unfortunately.
|
||||||
#
|
#
|
||||||
# detect-rounded-corners = false
|
# detect-rounded-corners = false
|
||||||
detect-rounded-corners = false;
|
detect-rounded-corners = true;
|
||||||
|
|
||||||
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
|
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
|
||||||
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
|
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
|
||||||
@@ -346,14 +355,14 @@ detect-client-leader = true
|
|||||||
# practically happened) and may not work with blur-background.
|
# practically happened) and may not work with blur-background.
|
||||||
# My tests show a 15% performance boost. Recommended.
|
# My tests show a 15% performance boost. Recommended.
|
||||||
#
|
#
|
||||||
glx-no-stencil = false
|
glx-no-stencil = true
|
||||||
|
|
||||||
# GLX backend: Avoid rebinding pixmap on window damage.
|
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||||
# Probably could improve performance on rapid window content changes,
|
# Probably could improve performance on rapid window content changes,
|
||||||
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
|
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
|
||||||
# Recommended if it works.
|
# Recommended if it works.
|
||||||
#
|
#
|
||||||
glx-no-rebind-pixmap = false
|
glx-no-rebind-pixmap = true
|
||||||
|
|
||||||
# Disable the use of damage information.
|
# Disable the use of damage information.
|
||||||
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
|
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
|
||||||
@@ -367,7 +376,7 @@ glx-no-rebind-pixmap = false
|
|||||||
# calls are finished before picom starts drawing. Needed on nvidia-drivers
|
# calls are finished before picom starts drawing. Needed on nvidia-drivers
|
||||||
# with GLX backend for some users.
|
# with GLX backend for some users.
|
||||||
#
|
#
|
||||||
xrender-sync-fence = false
|
xrender-sync-fence = true
|
||||||
|
|
||||||
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
|
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
|
||||||
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
|
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
|
||||||
@@ -454,7 +463,6 @@ log-level = "warn";
|
|||||||
#stop tearing on fullscreen windows
|
#stop tearing on fullscreen windows
|
||||||
unredir-if-possible = false;
|
unredir-if-possible = false;
|
||||||
|
|
||||||
|
|
||||||
wintypes:
|
wintypes:
|
||||||
{
|
{
|
||||||
tooltip = { fade = true; shadow = true; opacity = 0.95; focus = true; full-shadow = false; };
|
tooltip = { fade = true; shadow = true; opacity = 0.95; focus = true; full-shadow = false; };
|
||||||
@@ -487,7 +495,8 @@ rounded-corners-exclude = [
|
|||||||
blur: {
|
blur: {
|
||||||
method = "dual_kawase";
|
method = "dual_kawase";
|
||||||
# method = "kawase";
|
# method = "kawase";
|
||||||
strength = 2;
|
# strength = 4;
|
||||||
|
# strength = 12;
|
||||||
background = true;
|
background = true;
|
||||||
background-frame = false;
|
background-frame = false;
|
||||||
background-fixed = false;
|
background-fixed = false;
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ locale = en_US.UTF-8
|
|||||||
; right
|
; right
|
||||||
; none
|
; none
|
||||||
; tray-position = center
|
; tray-position = center
|
||||||
tray-position = none
|
tray-position = center
|
||||||
|
|
||||||
; If true, the bar will not shift its
|
; If true, the bar will not shift its
|
||||||
; contents when the tray changes
|
; contents when the tray changes
|
||||||
|
|||||||
@@ -3,28 +3,41 @@ import dracula.draw
|
|||||||
# Load existing settings made via :set
|
# Load existing settings made via :set
|
||||||
config.load_autoconfig(True)
|
config.load_autoconfig(True)
|
||||||
|
|
||||||
|
config.set("colors.webpage.darkmode.enabled", True)
|
||||||
|
|
||||||
c.content.blocking.method = "both"
|
c.content.blocking.method = "both"
|
||||||
c.content.default_encoding = "utf-8"
|
c.content.default_encoding = "utf-8"
|
||||||
c.content.pdfjs = True # display pdfs
|
c.content.pdfjs = True # display pdfs
|
||||||
c.zoom.default = "125%"
|
c.zoom.default = "125%"
|
||||||
|
|
||||||
c.url.default_page = "https://dash.sudacode.com"
|
# c.url.default_page = "https://dash.suda.codes"
|
||||||
c.editor.command = ["alacritty", "-e", "vim", "{}"]
|
c.url.start_pages = ["https://dash.suda.codes", "https://links.suda.codes"]
|
||||||
|
c.editor.command = ["kitty", "-e", "nvim", "{}"]
|
||||||
c.url.searchengines["a"] = "https://wiki.archlinux.org/?search={}"
|
c.url.searchengines["a"] = "https://wiki.archlinux.org/?search={}"
|
||||||
c.url.searchengines["ap"] = "https://www.archlinux.org/packages/?sort=&q={}"
|
c.url.searchengines["ap"] = "https://www.archlinux.org/packages/?sort=&q={}"
|
||||||
c.url.searchengines["aur"] = "https://aur.archlinux.org/packages/?K={}"
|
c.url.searchengines["aur"] = "https://aur.archlinux.org/packages/?K={}"
|
||||||
c.url.searchengines["gh"] = "https://github.com/search?q={}&type=Code"
|
|
||||||
c.url.searchengines["r"] = "https://www.reddit.com/r/{}"
|
c.url.searchengines["r"] = "https://www.reddit.com/r/{}"
|
||||||
|
c.url.searchengines["p"] = "https://docs.python.org/3/library/{}"
|
||||||
|
c.url.searchengines["yt"] = "https://www.youtube.com/results?search_query={}"
|
||||||
|
c.url.searchengines["ytc"] = "https://www.youtube.com/c/{}"
|
||||||
|
|
||||||
c.aliases["gd"] = "open -t http://192.168.4.77:4000"
|
c.aliases["gd"] = "open -t http://192.168.4.77:4000"
|
||||||
|
|
||||||
|
|
||||||
config.bind(
|
config.bind(
|
||||||
"<Ctrl-Shift-m>",
|
"<Ctrl-Shift-m>",
|
||||||
"hint links spawn --detach mpv {hint-url}",
|
"hint links spawn --detach mpv {hint-url}",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
config.bind(
|
||||||
|
"M",
|
||||||
|
"hint links spawn --detach mpv {hint-url}",
|
||||||
|
)
|
||||||
|
|
||||||
|
config.bind("Y", "hint links spawn kitty -e youtube-dlp {hint-url}")
|
||||||
config.bind(
|
config.bind(
|
||||||
"<Ctrl-Shift-d>",
|
"<Ctrl-Shift-d>",
|
||||||
"hint links spawn --detach alacritty -e yt-dlp {hint-url}",
|
"hint links spawn --detach kitty -e yt-dlp {hint-url}",
|
||||||
)
|
)
|
||||||
|
|
||||||
config.bind("<Ctrl-=>'", "zoom-in")
|
config.bind("<Ctrl-=>'", "zoom-in")
|
||||||
@@ -34,5 +47,8 @@ config.bind("<j>", "scroll-px 0 150")
|
|||||||
|
|
||||||
config.bind("<k>", "scroll-px 0 -150")
|
config.bind("<k>", "scroll-px 0 -150")
|
||||||
|
|
||||||
|
config.bind("ts", "config-cycle statusbar.show always never")
|
||||||
|
config.bind("tt", "config-cycle tabs.show always never")
|
||||||
|
|
||||||
|
|
||||||
dracula.draw.blood(c, {"spacing": {"vertical": 6, "horizontal": 8}})
|
dracula.draw.blood(c, {"spacing": {"vertical": 6, "horizontal": 8}})
|
||||||
|
|||||||
0
ranger/plugins/__init__.py
Normal file
0
ranger/plugins/__init__.py
Normal file
1
ranger/plugins/ranger_devicons
Submodule
1
ranger/plugins/ranger_devicons
Submodule
Submodule ranger/plugins/ranger_devicons added at 11941619b8
@@ -448,21 +448,25 @@ map } traverse
|
|||||||
map { traverse_backwards
|
map { traverse_backwards
|
||||||
map ) jump_non
|
map ) jump_non
|
||||||
|
|
||||||
|
map ga cd ~/Projects/Scripts/aniwrapper
|
||||||
|
map gb cd /boxshare
|
||||||
|
map g. cd ~/.config
|
||||||
map gh cd ~
|
map gh cd ~
|
||||||
map ge cd /etc
|
map ge cd /etc
|
||||||
map gu cd /usr
|
map gu cd /usr
|
||||||
map gd cd /dev
|
map gd cd /dev
|
||||||
|
map gj cd /jellyfin
|
||||||
map gl cd -r .
|
map gl cd -r .
|
||||||
map gL cd -r %f
|
map gL cd -r %f
|
||||||
map go cd /opt
|
map go cd /opt
|
||||||
map gv cd /var
|
map gv edit ~/.config/nvim/init.vim
|
||||||
map gm cd /media
|
map gm cd /jellyfin/music
|
||||||
map gi eval fm.cd('/run/media/' + os.getenv('USER'))
|
map gi eval fm.cd('/run/media/' + os.getenv('USER'))
|
||||||
map gM cd /mnt
|
map gM cd /mnt
|
||||||
map gs cd /srv
|
map gs cd /srv
|
||||||
map gp cd /tmp
|
map gP cd ~/Pictures
|
||||||
map gr cd /
|
map gp cd ~/Projects
|
||||||
map gR eval fm.cd(ranger.RANGERDIR)
|
map gr eval fm.cd(os.getenv('XDG_CONFIG_HOME') + '/ranger')
|
||||||
map g/ cd /
|
map g/ cd /
|
||||||
map g? cd /usr/share/doc/ranger
|
map g? cd /usr/share/doc/ranger
|
||||||
|
|
||||||
|
|||||||
@@ -85,10 +85,11 @@ ext x?html?, has w3m, terminal = w3m "$@"
|
|||||||
# Misc
|
# Misc
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
# Define the "editor" for text files as first action
|
# Define the "editor" for text files as first action
|
||||||
mime ^text, label editor = vim "$@"
|
# mime ^text, label editor = vim "$@"
|
||||||
|
mime ^text, label editor = nvim "$@"
|
||||||
mime ^text, label pager = "$PAGER" -- "$@"
|
mime ^text, label pager = "$PAGER" -- "$@"
|
||||||
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php|sql = ${VISUAL:-$EDITOR} -- "$@"
|
||||||
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php|sql = "$PAGER" -- "$@"
|
||||||
|
|
||||||
ext 1 = man "$1"
|
ext 1 = man "$1"
|
||||||
ext s[wmf]c, has zsnes, X = zsnes "$1"
|
ext s[wmf]c, has zsnes, X = zsnes "$1"
|
||||||
@@ -140,7 +141,7 @@ mime ^video, terminal, !X, has mplayer = mplayer -- "$@"
|
|||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
# Documents
|
# Documents
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
ext pdf, has llpp, X, flag f = llpp "$@"
|
ext pdf, has llpp, X, flag f = okular "$@"
|
||||||
ext pdf, has zathura, X, flag f = zathura -- "$@"
|
ext pdf, has zathura, X, flag f = zathura -- "$@"
|
||||||
ext pdf, has mupdf, X, flag f = mupdf "$@"
|
ext pdf, has mupdf, X, flag f = mupdf "$@"
|
||||||
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
|
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
|
||||||
@@ -183,6 +184,7 @@ mime ^image/svg, has display, X, flag f = display -- "$@"
|
|||||||
mime ^image, has imv, X, flag f = imv -- "$@"
|
mime ^image, has imv, X, flag f = imv -- "$@"
|
||||||
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
|
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
|
||||||
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
|
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
|
||||||
|
mime ^image, has gthumb, X, flag f = gthumb -- "$@"
|
||||||
mime ^image, has feh, X, flag f = feh -- "$@"
|
mime ^image, has feh, X, flag f = feh -- "$@"
|
||||||
mime ^image, has mirage, X, flag f = mirage -- "$@"
|
mime ^image, has mirage, X, flag f = mirage -- "$@"
|
||||||
mime ^image, has ristretto, X, flag f = ristretto "$@"
|
mime ^image, has ristretto, X, flag f = ristretto "$@"
|
||||||
|
|||||||
45
rofi/scripts/rofi-run.sh
Executable file
45
rofi/scripts/rofi-run.sh
Executable file
@@ -0,0 +1,45 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
# Script to run a bash command from a rofi prompt
|
||||||
|
|
||||||
|
THEME_STR="
|
||||||
|
window {
|
||||||
|
width: 35%;
|
||||||
|
height: 10%;
|
||||||
|
anchor: north;
|
||||||
|
location: north;
|
||||||
|
}"
|
||||||
|
|
||||||
|
# generates a span mesg for rofi given
|
||||||
|
# input: message: str
|
||||||
|
generate_span() {
|
||||||
|
msg1="$1"
|
||||||
|
msg2="$2"
|
||||||
|
span="<span foreground='#ecbe7b' style='normal' size='small'>$msg1</span>"
|
||||||
|
span2="<span foreground='dodgerblue' style='italic' size='small'>$msg2</span>"
|
||||||
|
printf "%s: %s\n" "$span" "$span2"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get the command to run
|
||||||
|
cmd="$(rofi -dmenu -l 0 -p 'Run:' -theme-str "$THEME_STR")"
|
||||||
|
|
||||||
|
# Check if command is sudo
|
||||||
|
if [[ "$cmd" == "sudo"* ]]; then
|
||||||
|
# Prompt for confirmation
|
||||||
|
confirm="$(rofi -dmenu -l 0 -p 'Confirm (Y/N)' \
|
||||||
|
-theme-str "$THEME_STR" -mesg "$(generate_span "CMD" "$cmd")" || true)"
|
||||||
|
# If not confirmed, exit
|
||||||
|
if ! [[ "$confirm" == "Y" || "$confirm" == "y" ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$#" -gt 0 ]] && [[ "$1" == "-v" || "$1" == "--verbose" ]]; then
|
||||||
|
# Send command to dunstify
|
||||||
|
dunstify "Running command: $cmd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run the command
|
||||||
|
eval "$cmd"
|
||||||
@@ -51,7 +51,6 @@ nmap <leader>n :NvimTreeToggle<CR>
|
|||||||
nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
|
nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
|
||||||
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
||||||
nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
|
nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
|
||||||
nmap <leader>oo :OverCommandLine<CR>
|
|
||||||
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
||||||
" nmap <leader>ot :vertical botright ter ++kill=terminal ++close<CR>
|
" nmap <leader>ot :vertical botright ter ++kill=terminal ++close<CR>
|
||||||
nmap <leader>ot :FloatermNew --title=floaterm --name=vsplit-term --wintype=vsplit --position=botright --width=0.5<CR>
|
nmap <leader>ot :FloatermNew --title=floaterm --name=vsplit-term --wintype=vsplit --position=botright --width=0.5<CR>
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ let g:fzf_tags_command = 'ctags -R'
|
|||||||
" - CTRL-/ will toggle preview window.
|
" - CTRL-/ will toggle preview window.
|
||||||
" - Note that this array is passed as arguments to fzf#vim#with_preview function.
|
" - Note that this array is passed as arguments to fzf#vim#with_preview function.
|
||||||
" - To learn more about preview window options, see `--preview-window` section of `man fzf`.
|
" - To learn more about preview window options, see `--preview-window` section of `man fzf`.
|
||||||
let g:fzf_preview_window = ['right:50%', 'ctrl-/']
|
let g:fzf_preview_window = ['right:45%', 'ctrl-/']
|
||||||
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.75 } }
|
let g:fzf_layout = { 'window': { 'width': 0.95, 'height': 0.85 } }
|
||||||
|
|
||||||
let g:fzf_action = {
|
let g:fzf_action = {
|
||||||
\ 'ctrl-t': 'tab split',
|
\ 'ctrl-t': 'tab split',
|
||||||
|
|||||||
Reference in New Issue
Block a user