removing clunky editors and replacing neovim with kickstart
This commit is contained in:
9
Makefile
9
Makefile
@@ -5,12 +5,3 @@ laptop:
|
|||||||
|
|
||||||
work:
|
work:
|
||||||
stow shared work
|
stow shared work
|
||||||
|
|
||||||
clean:
|
|
||||||
stow -D shared laptop work 2>/dev/null; \
|
|
||||||
find $(HOME)/.config/nvim $(HOME)/.config/emacs $(HOME)/.config/tmux \
|
|
||||||
$(HOME)/.config/ghostty $(HOME)/.config/ranger \
|
|
||||||
-maxdepth 4 -type l -delete 2>/dev/null; \
|
|
||||||
find $(HOME) -maxdepth 1 -type l \( -name '.zshrc' -o -name '.zshenv' \) \
|
|
||||||
-delete 2>/dev/null; \
|
|
||||||
true
|
|
||||||
|
|||||||
@@ -1,87 +0,0 @@
|
|||||||
;;; dev-settings.el --- Laptop development environment
|
|
||||||
|
|
||||||
;;; DAP Mode
|
|
||||||
|
|
||||||
(use-package dap-mode
|
|
||||||
:defer t
|
|
||||||
:commands (dap-mode dap-debug)
|
|
||||||
:config
|
|
||||||
(require 'dap-gdb-lldb)
|
|
||||||
(require 'dap-cpptools))
|
|
||||||
|
|
||||||
;;; C / C++
|
|
||||||
|
|
||||||
(use-package c-ts-mode
|
|
||||||
:ensure nil
|
|
||||||
:mode (("\\.c\\'" . c-ts-mode)
|
|
||||||
("\\.h\\'" . c-ts-mode)
|
|
||||||
("\\.cpp\\'" . c++-ts-mode)
|
|
||||||
("\\.hpp\\'" . c++-ts-mode)
|
|
||||||
("\\.cc\\'" . c++-ts-mode)
|
|
||||||
("\\.cxx\\'" . c++-ts-mode))
|
|
||||||
:hook ((c-ts-mode . eglot-ensure)
|
|
||||||
(c++-ts-mode . eglot-ensure))
|
|
||||||
:config
|
|
||||||
(setq c-ts-mode-indent-offset 4))
|
|
||||||
|
|
||||||
;;; Go
|
|
||||||
|
|
||||||
(use-package go-ts-mode
|
|
||||||
:ensure nil
|
|
||||||
:mode "\\.go\\'"
|
|
||||||
:hook (go-ts-mode . eglot-ensure)
|
|
||||||
:config
|
|
||||||
(setq go-ts-mode-indent-offset 4))
|
|
||||||
|
|
||||||
(with-eval-after-load 'dap-mode
|
|
||||||
(require 'dap-dlv-go))
|
|
||||||
|
|
||||||
;;; Rust
|
|
||||||
|
|
||||||
(use-package rust-ts-mode
|
|
||||||
:ensure nil
|
|
||||||
:mode "\\.rs\\'"
|
|
||||||
:hook (rust-ts-mode . eglot-ensure)
|
|
||||||
:config
|
|
||||||
(setq rust-ts-mode-indent-offset 4))
|
|
||||||
|
|
||||||
;; rust-analyzer is installed via: rustup component add rust-analyzer
|
|
||||||
(with-eval-after-load 'eglot
|
|
||||||
(add-to-list 'eglot-server-programs
|
|
||||||
'(rust-ts-mode . ("rust-analyzer"))))
|
|
||||||
|
|
||||||
;;; Common Lisp
|
|
||||||
|
|
||||||
(use-package slime
|
|
||||||
:defer t
|
|
||||||
:commands slime
|
|
||||||
:config
|
|
||||||
(setq inferior-lisp-program "sbcl")
|
|
||||||
(setq slime-contribs '(slime-fancy slime-company))
|
|
||||||
(setq slime-lisp-implementations
|
|
||||||
'((sbcl ("sbcl") :coding-system utf-8-unix)
|
|
||||||
(ccl ("ccl") :coding-system utf-8-unix))))
|
|
||||||
|
|
||||||
(use-package slime-company
|
|
||||||
:defer t
|
|
||||||
:after (slime company)
|
|
||||||
:config
|
|
||||||
(setq slime-company-completion 'fuzzy))
|
|
||||||
|
|
||||||
;;; DAP Keybindings
|
|
||||||
|
|
||||||
(with-eval-after-load 'dap-mode
|
|
||||||
(keymap-set dap-mode-map "C-c d d" #'dap-debug)
|
|
||||||
(keymap-set dap-mode-map "C-c d b" #'dap-breakpoint-toggle)
|
|
||||||
(keymap-set dap-mode-map "C-c d c" #'dap-continue)
|
|
||||||
(keymap-set dap-mode-map "C-c d n" #'dap-next)
|
|
||||||
(keymap-set dap-mode-map "C-c d i" #'dap-step-in)
|
|
||||||
(keymap-set dap-mode-map "C-c d o" #'dap-step-out)
|
|
||||||
(keymap-set dap-mode-map "C-c d r" #'dap-restart-frame)
|
|
||||||
(keymap-set dap-mode-map "C-c d q" #'dap-disconnect)
|
|
||||||
(keymap-set dap-mode-map "C-c d e" #'dap-eval)
|
|
||||||
(keymap-set dap-mode-map "C-c d l" #'dap-ui-locals)
|
|
||||||
(keymap-set dap-mode-map "C-c d s" #'dap-ui-sessions))
|
|
||||||
|
|
||||||
(provide 'dev-settings)
|
|
||||||
;;; dev-settings.el ends here
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
;;; latex-settings.el --- AUCTeX / LaTeX configuration
|
|
||||||
|
|
||||||
(use-package auctex
|
|
||||||
:defer t
|
|
||||||
:init
|
|
||||||
(setq TeX-auto-save t ; cache style info in auto/ for faster opens
|
|
||||||
TeX-parse-self t ; parse document on open for completions
|
|
||||||
TeX-PDF-mode t ; compile to PDF by default
|
|
||||||
TeX-source-correlate-mode t ; SyncTeX: link editor positions to PDF
|
|
||||||
TeX-source-correlate-start-server t)
|
|
||||||
:hook
|
|
||||||
((LaTeX-mode . LaTeX-math-mode)
|
|
||||||
(LaTeX-mode . flyspell-mode)
|
|
||||||
(LaTeX-mode . reftex-mode))
|
|
||||||
:config
|
|
||||||
(setq reftex-plug-into-AUCTeX t)
|
|
||||||
;; Use zathura as the PDF viewer (SyncTeX: click in PDF jumps to source line)
|
|
||||||
(add-to-list 'TeX-view-program-selection '(output-pdf "Zathura"))
|
|
||||||
;; LatexMk handles multiple pdflatex passes, bibliography, index automatically
|
|
||||||
(add-to-list 'TeX-command-list
|
|
||||||
'("LatexMk" "latexmk -pdf -interaction=nonstopmode %s"
|
|
||||||
TeX-run-TeX nil t :help "Run latexmk"))
|
|
||||||
(setq TeX-command-default "LatexMk")
|
|
||||||
|
|
||||||
(defun rh/latex-build-pdf ()
|
|
||||||
"Compile the current LaTeX buffer to PDF using latexmk."
|
|
||||||
(interactive)
|
|
||||||
(TeX-command "LatexMk" #'TeX-master-file))
|
|
||||||
|
|
||||||
(with-eval-after-load 'latex
|
|
||||||
(define-key LaTeX-mode-map (kbd "C-c C-b") #'rh/latex-build-pdf)))
|
|
||||||
|
|
||||||
(provide 'latex-settings)
|
|
||||||
;;; latex-settings.el ends here
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
-- Laptop language pack: C/C++, Go, Rust, LaTeX, DAP.
|
|
||||||
-- Loaded by shared/init.lua via require('languages').
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
|
||||||
servers = {
|
|
||||||
clangd = {},
|
|
||||||
gopls = {},
|
|
||||||
rust_analyzer = {},
|
|
||||||
},
|
|
||||||
parsers = { 'c', 'cpp', 'go', 'latex', 'rust' },
|
|
||||||
formatters = {
|
|
||||||
go = { 'goimports', 'gofmt' },
|
|
||||||
rust = { 'rustfmt' },
|
|
||||||
c = { 'clang_format' },
|
|
||||||
cpp = { 'clang_format' },
|
|
||||||
},
|
|
||||||
tools = { 'clang-format', 'codelldb' },
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
;;; common-dev-settings.el --- Dev tooling shared across all hosts
|
|
||||||
|
|
||||||
;;; Completion
|
|
||||||
|
|
||||||
(use-package company
|
|
||||||
:defer 1
|
|
||||||
:config
|
|
||||||
(global-company-mode)
|
|
||||||
(setq company-idle-delay 0.2
|
|
||||||
company-minimum-prefix-length 2
|
|
||||||
company-show-numbers t
|
|
||||||
company-tooltip-align-annotations t))
|
|
||||||
|
|
||||||
;;; LSP
|
|
||||||
|
|
||||||
(use-package eglot
|
|
||||||
:ensure nil
|
|
||||||
:defer t
|
|
||||||
:commands (eglot eglot-ensure)
|
|
||||||
:config
|
|
||||||
(setq eglot-autoshutdown t
|
|
||||||
eglot-send-changes-idle-time 0.5)
|
|
||||||
(setq eldoc-echo-area-use-multiline-p nil)
|
|
||||||
(add-to-list 'eglot-stay-out-of 'eldoc))
|
|
||||||
|
|
||||||
;;; Tree-sitter mode management
|
|
||||||
;; Grammar sources and installation are host-specific; see dev-settings.el.
|
|
||||||
|
|
||||||
(use-package treesit-auto
|
|
||||||
:custom
|
|
||||||
(treesit-auto-install 'prompt)
|
|
||||||
:config
|
|
||||||
(treesit-auto-add-to-auto-mode-alist 'all)
|
|
||||||
(global-treesit-auto-mode))
|
|
||||||
|
|
||||||
;;; Utilities
|
|
||||||
|
|
||||||
(use-package helpful
|
|
||||||
:defer t
|
|
||||||
:commands (helpful-callable helpful-variable helpful-key))
|
|
||||||
|
|
||||||
(use-package smartparens
|
|
||||||
:defer 1
|
|
||||||
:hook (prog-mode . smartparens-mode)
|
|
||||||
:config
|
|
||||||
(require 'smartparens-config))
|
|
||||||
|
|
||||||
(use-package yasnippet
|
|
||||||
:defer 2
|
|
||||||
:config
|
|
||||||
(yas-global-mode 1))
|
|
||||||
|
|
||||||
(use-package yasnippet-snippets
|
|
||||||
:defer t
|
|
||||||
:after yasnippet)
|
|
||||||
|
|
||||||
;;; Emacs Lisp
|
|
||||||
|
|
||||||
(add-hook 'emacs-lisp-mode-hook #'eldoc-mode)
|
|
||||||
(add-hook 'emacs-lisp-mode-hook #'company-mode)
|
|
||||||
|
|
||||||
;;; LSP Keybindings
|
|
||||||
|
|
||||||
(with-eval-after-load 'eglot
|
|
||||||
(keymap-set eglot-mode-map "C-c l d" #'xref-find-definitions)
|
|
||||||
(keymap-set eglot-mode-map "C-c l r" #'xref-find-references)
|
|
||||||
(keymap-set eglot-mode-map "C-c l i" #'eglot-find-implementation)
|
|
||||||
(keymap-set eglot-mode-map "C-c l t" #'eglot-find-typeDefinition)
|
|
||||||
(keymap-set eglot-mode-map "C-c l h" #'eldoc-doc-buffer)
|
|
||||||
(keymap-set eglot-mode-map "C-c l s" #'eldoc)
|
|
||||||
(keymap-set eglot-mode-map "C-c l a" #'eglot-code-actions)
|
|
||||||
(keymap-set eglot-mode-map "C-c l n" #'eglot-rename)
|
|
||||||
(keymap-set eglot-mode-map "C-c l e" #'flymake-show-buffer-diagnostics)
|
|
||||||
(keymap-set eglot-mode-map "C-c l f" #'eglot-format-buffer))
|
|
||||||
|
|
||||||
(provide 'common-dev-settings)
|
|
||||||
;;; common-dev-settings.el ends here
|
|
||||||
@@ -1,159 +0,0 @@
|
|||||||
;; init.el
|
|
||||||
|
|
||||||
(defun rh/load-user-file (file)
|
|
||||||
"Load FILE from `user-emacs-directory' when it exists."
|
|
||||||
(let ((path (expand-file-name file user-emacs-directory)))
|
|
||||||
(when (file-exists-p path)
|
|
||||||
(load path nil 'nomessage))))
|
|
||||||
|
|
||||||
;;; Startup/UI ---------------------------------------------------------------
|
|
||||||
|
|
||||||
(setq inhibit-startup-message t
|
|
||||||
visible-bell t)
|
|
||||||
|
|
||||||
(scroll-bar-mode -1)
|
|
||||||
(tool-bar-mode -1)
|
|
||||||
(tooltip-mode -1)
|
|
||||||
(menu-bar-mode -1)
|
|
||||||
|
|
||||||
;;; Editing Defaults ---------------------------------------------------------
|
|
||||||
|
|
||||||
(global-display-line-numbers-mode 1)
|
|
||||||
(setq display-line-numbers-type 'relative)
|
|
||||||
|
|
||||||
(setq make-backup-files nil
|
|
||||||
auto-save-default nil
|
|
||||||
create-lockfiles nil)
|
|
||||||
|
|
||||||
(setq vc-follow-symlinks t
|
|
||||||
find-file-visit-truename t)
|
|
||||||
|
|
||||||
;;; Package Manager ----------------------------------------------------------
|
|
||||||
|
|
||||||
(require 'package)
|
|
||||||
|
|
||||||
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
|
||||||
("elpa" . "https://elpa.gnu.org/packages/")))
|
|
||||||
|
|
||||||
(package-initialize)
|
|
||||||
(unless package-archive-contents
|
|
||||||
(package-refresh-contents))
|
|
||||||
|
|
||||||
(unless (package-installed-p 'use-package)
|
|
||||||
(package-install 'use-package))
|
|
||||||
|
|
||||||
(require 'use-package)
|
|
||||||
(setq use-package-always-ensure t)
|
|
||||||
|
|
||||||
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
|
|
||||||
|
|
||||||
;;; Style/Theme --------------------------------------------------------------
|
|
||||||
|
|
||||||
(use-package catppuccin-theme
|
|
||||||
:init
|
|
||||||
(setq catppuccin-flavor 'mocha)
|
|
||||||
:config
|
|
||||||
(load-theme 'catppuccin t))
|
|
||||||
|
|
||||||
;; Icons are only useful in GUI Emacs.
|
|
||||||
(use-package all-the-icons
|
|
||||||
:if (display-graphic-p))
|
|
||||||
|
|
||||||
;; Color nested delimiters in programming buffers.
|
|
||||||
(use-package rainbow-delimiters
|
|
||||||
:hook (prog-mode . rainbow-delimiters-mode))
|
|
||||||
|
|
||||||
(use-package doom-modeline
|
|
||||||
:init
|
|
||||||
(doom-modeline-mode 1)
|
|
||||||
:config
|
|
||||||
(setq doom-modeline-height 15))
|
|
||||||
|
|
||||||
;;; Completion/Search/Navigation ---------------------------------------------
|
|
||||||
|
|
||||||
(use-package vertico
|
|
||||||
:init
|
|
||||||
(vertico-mode))
|
|
||||||
|
|
||||||
(use-package consult
|
|
||||||
:bind (("C-x b" . consult-buffer)
|
|
||||||
("C-s" . consult-line)
|
|
||||||
("M-y" . consult-yank-pop)))
|
|
||||||
|
|
||||||
(use-package orderless
|
|
||||||
:config
|
|
||||||
(setq completion-styles '(orderless basic)
|
|
||||||
completion-category-defaults nil))
|
|
||||||
|
|
||||||
(use-package marginalia
|
|
||||||
:init
|
|
||||||
(marginalia-mode))
|
|
||||||
|
|
||||||
(use-package embark
|
|
||||||
:bind (("C-." . embark-act)
|
|
||||||
("M-." . embark-dwim)))
|
|
||||||
|
|
||||||
(use-package embark-consult
|
|
||||||
:after (embark consult))
|
|
||||||
|
|
||||||
(use-package which-key
|
|
||||||
:init
|
|
||||||
(which-key-mode)
|
|
||||||
:config
|
|
||||||
(setq which-key-idle-delay 1))
|
|
||||||
|
|
||||||
;;; Key Bindings -------------------------------------------------------------
|
|
||||||
|
|
||||||
;; Make ESC quit prompts.
|
|
||||||
(global-set-key (kbd "<escape>") #'keyboard-escape-quit)
|
|
||||||
|
|
||||||
;; windmove: S-Arrow to move between windows (built-in since Emacs 27).
|
|
||||||
(windmove-default-keybindings)
|
|
||||||
|
|
||||||
;;; Projects -----------------------------------------------------------------
|
|
||||||
|
|
||||||
(use-package projectile
|
|
||||||
:init
|
|
||||||
(when (file-directory-p "~/src")
|
|
||||||
(setq projectile-project-search-path '("~/src")))
|
|
||||||
(setq projectile-switch-project-action #'projectile-dired)
|
|
||||||
:config
|
|
||||||
(projectile-mode 1)
|
|
||||||
:bind-keymap
|
|
||||||
("C-c p" . projectile-command-map))
|
|
||||||
|
|
||||||
(use-package consult-projectile
|
|
||||||
:bind (("C-c h" . consult-projectile)))
|
|
||||||
|
|
||||||
;;; Git ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
(use-package magit
|
|
||||||
:commands (magit-status magit-get-current-branch)
|
|
||||||
:bind (("C-x g" . magit-status)
|
|
||||||
("C-x M-g" . magit-dispatch)
|
|
||||||
("C-c M-g" . magit-file-dispatch))
|
|
||||||
:custom
|
|
||||||
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
|
|
||||||
(magit-diff-refine-hunk t)
|
|
||||||
(magit-auto-revert-mode nil)
|
|
||||||
(magit-process-find-password-functions '(magit-process-password-auth-source)))
|
|
||||||
|
|
||||||
;;; Org ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
(defun rh/org-mode-setup ()
|
|
||||||
(org-indent-mode)
|
|
||||||
(visual-line-mode 1))
|
|
||||||
|
|
||||||
(use-package org
|
|
||||||
:hook (org-mode . rh/org-mode-setup)
|
|
||||||
:config
|
|
||||||
(setq org-agenda-files
|
|
||||||
(if (file-directory-p "~/org")
|
|
||||||
(directory-files-recursively "~/org" "\\.org$")
|
|
||||||
nil)))
|
|
||||||
|
|
||||||
(rh/load-user-file "org-bindings.el")
|
|
||||||
(rh/load-user-file "common-dev-settings.el")
|
|
||||||
(rh/load-user-file "dev-settings.el")
|
|
||||||
(rh/load-user-file "latex-settings.el")
|
|
||||||
(rh/load-user-file "custom.el")
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
;;; org-bindings.el --- Standard Emacs keybindings for Org mode
|
|
||||||
|
|
||||||
(with-eval-after-load 'org
|
|
||||||
;; Org agenda and capture
|
|
||||||
(global-set-key (kbd "C-c o a") 'org-agenda)
|
|
||||||
(global-set-key (kbd "C-c o c") 'org-capture)
|
|
||||||
|
|
||||||
;; Link commands
|
|
||||||
(define-key org-mode-map (kbd "C-c o l") 'org-store-link)
|
|
||||||
(define-key org-mode-map (kbd "C-c o i") 'org-insert-link)
|
|
||||||
|
|
||||||
;; TODO and scheduling
|
|
||||||
(define-key org-mode-map (kbd "C-c o t") 'org-todo)
|
|
||||||
(define-key org-mode-map (kbd "C-c o s") 'org-schedule)
|
|
||||||
(define-key org-mode-map (kbd "C-c o d") 'org-deadline)
|
|
||||||
(define-key org-mode-map (kbd "C-c o T") 'org-time-stamp)
|
|
||||||
(define-key org-mode-map (kbd "C-c o p") 'org-priority)
|
|
||||||
|
|
||||||
;; Checkboxes and lists
|
|
||||||
(define-key org-mode-map (kbd "C-c o x") 'org-toggle-checkbox)
|
|
||||||
(define-key org-mode-map (kbd "C-c o -") 'org-ctrl-c-minus)
|
|
||||||
|
|
||||||
;; Refile
|
|
||||||
(define-key org-mode-map (kbd "C-c o r") 'org-refile))
|
|
||||||
|
|
||||||
;; Theme selection
|
|
||||||
(global-set-key (kbd "C-c t t") 'consult-theme)
|
|
||||||
|
|
||||||
;; Text scaling with standard Emacs bindings
|
|
||||||
(global-set-key (kbd "C-x C-=") 'text-scale-increase)
|
|
||||||
(global-set-key (kbd "C-x C--") 'text-scale-decrease)
|
|
||||||
(global-set-key (kbd "C-x C-0") 'text-scale-adjust)
|
|
||||||
|
|
||||||
(provide 'org-bindings)
|
|
||||||
;;; org-bindings.el ends here
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,38 +1,29 @@
|
|||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" },
|
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
|
||||||
"catppuccin": { "branch": "main", "commit": "426dbebe06b5c69fd846ceb17b42e12f890aedf1" },
|
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
|
||||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
|
||||||
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" },
|
"fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "6d808f99bd63303646794406e270bd553ad7792e" },
|
"gitsigns.nvim": { "branch": "main", "commit": "6d808f99bd63303646794406e270bd553ad7792e" },
|
||||||
|
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "a905eeebc4e63fdc48b5135d3bf8aea5618fb21c" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a3b42c3e503df87aef6d6513e13148381495c3a" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a3b42c3e503df87aef6d6513e13148381495c3a" },
|
||||||
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
|
||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "12ddd182d9efbdc848b540f16484a583d52da0fb" },
|
"mason.nvim": { "branch": "main", "commit": "12ddd182d9efbdc848b540f16484a583d52da0fb" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
"mini.nvim": { "branch": "main", "commit": "5849ef04c32a6a8e55957b946c0a275801d87530" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
|
|
||||||
"nvim-dap": { "branch": "master", "commit": "45a69eba683a2c448dd9ecfc4de89511f0646b5f" },
|
"nvim-dap": { "branch": "master", "commit": "45a69eba683a2c448dd9ecfc4de89511f0646b5f" },
|
||||||
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
|
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" },
|
"nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" },
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "e146efacbafed3789ac568abcc5a981c5decaa58" },
|
"nvim-lspconfig": { "branch": "master", "commit": "e146efacbafed3789ac568abcc5a981c5decaa58" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "c72328a5494b4502947a022fe69c0c47e53b6aa6" },
|
"nvim-web-devicons": { "branch": "master", "commit": "c72328a5494b4502947a022fe69c0c47e53b6aa6" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "08783ec022e7ddefe0f12a16f1ac4968f55478b0" },
|
|
||||||
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
|
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "506338434fec5ad19cb1f8d45bf92d66c4917393" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
|
||||||
"vimtex": { "branch": "master", "commit": "0f42a5130432d4af2e6fd21fb93a76915ff1f090" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||||
}
|
}
|
||||||
30
shared/.config/nvim/lua/custom/plugins/harpoon.lua
Normal file
30
shared/.config/nvim/lua/custom/plugins/harpoon.lua
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'ThePrimeagen/harpoon',
|
||||||
|
branch = 'harpoon2',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
|
config = function()
|
||||||
|
local harpoon = require 'harpoon'
|
||||||
|
harpoon:setup()
|
||||||
|
|
||||||
|
-- Add current file to list
|
||||||
|
vim.keymap.set('n', '<leader>a', function() harpoon:list():add() end,
|
||||||
|
{ desc = 'Harpoon: [A]dd file' })
|
||||||
|
|
||||||
|
-- Toggle the quick menu
|
||||||
|
vim.keymap.set('n', '<leader>e', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end,
|
||||||
|
{ desc = 'Harpoon: Toggle m[E]nu' })
|
||||||
|
|
||||||
|
-- Jump to file slots 1-4
|
||||||
|
-- NOTE: avoid <C-h/j/k/l> - kickstart uses these for window navigation
|
||||||
|
vim.keymap.set('n', '<leader>1', function() harpoon:list():select(1) end, { desc = 'Harpoon: File [1]' })
|
||||||
|
vim.keymap.set('n', '<leader>2', function() harpoon:list():select(2) end, { desc = 'Harpoon: File [2]' })
|
||||||
|
vim.keymap.set('n', '<leader>3', function() harpoon:list():select(3) end, { desc = 'Harpoon: File [3]' })
|
||||||
|
vim.keymap.set('n', '<leader>4', function() harpoon:list():select(4) end, { desc = 'Harpoon: File [4]' })
|
||||||
|
|
||||||
|
-- Prev/Next in list
|
||||||
|
vim.keymap.set('n', '<leader>[', function() harpoon:list():prev() end, { desc = 'Harpoon: Prev' })
|
||||||
|
vim.keymap.set('n', '<leader>]', function() harpoon:list():prev() end, { desc = 'Harpoon: Next' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
8
shared/.config/nvim/lua/custom/plugins/init.lua
Normal file
8
shared/.config/nvim/lua/custom/plugins/init.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
-- You can add your own plugins here or in other files in this directory!
|
||||||
|
-- I promise not to create any merge conflicts in this directory :)
|
||||||
|
--
|
||||||
|
-- See the kickstart.nvim README for more information
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
|
return {}
|
||||||
52
shared/.config/nvim/lua/kickstart/health.lua
Normal file
52
shared/.config/nvim/lua/kickstart/health.lua
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
--[[
|
||||||
|
--
|
||||||
|
-- This file is not required for your own configuration,
|
||||||
|
-- but helps people determine if their system is setup correctly.
|
||||||
|
--
|
||||||
|
--]]
|
||||||
|
|
||||||
|
local check_version = function()
|
||||||
|
local verstr = tostring(vim.version())
|
||||||
|
if not vim.version.ge then
|
||||||
|
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if vim.version.ge(vim.version(), '0.11') then
|
||||||
|
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
|
||||||
|
else
|
||||||
|
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local check_external_reqs = function()
|
||||||
|
-- Basic utils: `git`, `make`, `unzip`
|
||||||
|
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
|
||||||
|
local is_executable = vim.fn.executable(exe) == 1
|
||||||
|
if is_executable then
|
||||||
|
vim.health.ok(string.format("Found executable: '%s'", exe))
|
||||||
|
else
|
||||||
|
vim.health.warn(string.format("Could not find executable: '%s'", exe))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
check = function()
|
||||||
|
vim.health.start 'kickstart.nvim'
|
||||||
|
|
||||||
|
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
|
||||||
|
|
||||||
|
Fix only warnings for plugins and languages you intend to use.
|
||||||
|
Mason will give warnings for languages that are not installed.
|
||||||
|
You do not need to install, unless you want to use those languages!]]
|
||||||
|
|
||||||
|
local uv = vim.uv or vim.loop
|
||||||
|
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
|
||||||
|
|
||||||
|
check_version()
|
||||||
|
check_external_reqs()
|
||||||
|
end,
|
||||||
|
}
|
||||||
10
shared/.config/nvim/lua/kickstart/plugins/autopairs.lua
Normal file
10
shared/.config/nvim/lua/kickstart/plugins/autopairs.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- autopairs
|
||||||
|
-- https://github.com/windwp/nvim-autopairs
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
event = 'InsertEnter',
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
131
shared/.config/nvim/lua/kickstart/plugins/debug.lua
Normal file
131
shared/.config/nvim/lua/kickstart/plugins/debug.lua
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
-- debug.lua
|
||||||
|
--
|
||||||
|
-- Shows how to use the DAP plugin to debug your code.
|
||||||
|
--
|
||||||
|
-- Primarily focused on configuring the debugger for Go, but can
|
||||||
|
-- be extended to other languages as well. That's why it's called
|
||||||
|
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
-- NOTE: Yes, you can install new plugins here!
|
||||||
|
'mfussenegger/nvim-dap',
|
||||||
|
-- NOTE: And you can specify dependencies as well
|
||||||
|
dependencies = {
|
||||||
|
-- Creates a beautiful debugger UI
|
||||||
|
'rcarriga/nvim-dap-ui',
|
||||||
|
|
||||||
|
-- Required dependency for nvim-dap-ui
|
||||||
|
'nvim-neotest/nvim-nio',
|
||||||
|
|
||||||
|
-- Installs the debug adapters for you
|
||||||
|
'mason-org/mason.nvim',
|
||||||
|
'jay-babu/mason-nvim-dap.nvim',
|
||||||
|
|
||||||
|
-- Add your own debuggers here
|
||||||
|
'leoluz/nvim-dap-go',
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
-- Basic debugging keymaps, feel free to change to your liking!
|
||||||
|
{ '<F5>', function() require('dap').continue() end, desc = 'Debug: Start/Continue' },
|
||||||
|
{ '<F1>', function() require('dap').step_into() end, desc = 'Debug: Step Into' },
|
||||||
|
{ '<F2>', function() require('dap').step_over() end, desc = 'Debug: Step Over' },
|
||||||
|
{ '<F3>', function() require('dap').step_out() end, desc = 'Debug: Step Out' },
|
||||||
|
{ '<leader>b', function() require('dap').toggle_breakpoint() end, desc = 'Debug: Toggle Breakpoint' },
|
||||||
|
{ '<leader>B', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, desc = 'Debug: Set Breakpoint' },
|
||||||
|
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
||||||
|
{ '<F7>', function() require('dapui').toggle() end, desc = 'Debug: See last session result.' },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local dap = require 'dap'
|
||||||
|
local dapui = require 'dapui'
|
||||||
|
|
||||||
|
require('mason-nvim-dap').setup {
|
||||||
|
-- Makes a best effort to setup the various debuggers with
|
||||||
|
-- reasonable debug configurations
|
||||||
|
automatic_installation = true,
|
||||||
|
|
||||||
|
-- You can provide additional configuration to the handlers,
|
||||||
|
-- see mason-nvim-dap README for more information
|
||||||
|
handlers = {
|
||||||
|
coreclr = function(config)
|
||||||
|
config.adapters = {
|
||||||
|
type = 'executable',
|
||||||
|
command = vim.fn.exepath 'netcoredbg',
|
||||||
|
args = { '--interpreter=vscode' },
|
||||||
|
}
|
||||||
|
require('dap').adapters.coreclr = config.adapters
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- You'll need to check that you have the required things installed
|
||||||
|
-- online, please don't ask me how to install them :)
|
||||||
|
ensure_installed = {
|
||||||
|
-- Update this to ensure that you have the debuggers for the langs you want
|
||||||
|
'delve',
|
||||||
|
'netcoredbg',
|
||||||
|
'js-debug-adapter',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Dap UI setup
|
||||||
|
-- For more information, see |:help nvim-dap-ui|
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
|
dapui.setup {
|
||||||
|
-- Set icons to characters that are more likely to work in every terminal.
|
||||||
|
-- Feel free to remove or use ones that you like more! :)
|
||||||
|
-- Don't feel like these are good choices.
|
||||||
|
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
|
controls = {
|
||||||
|
icons = {
|
||||||
|
pause = '⏸',
|
||||||
|
play = '▶',
|
||||||
|
step_into = '⏎',
|
||||||
|
step_over = '⏭',
|
||||||
|
step_out = '⏮',
|
||||||
|
step_back = 'b',
|
||||||
|
run_last = '▶▶',
|
||||||
|
terminate = '⏹',
|
||||||
|
disconnect = '⏏',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Change breakpoint icons
|
||||||
|
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
|
||||||
|
-- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
|
||||||
|
-- local breakpoint_icons = vim.g.have_nerd_font
|
||||||
|
-- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
|
||||||
|
-- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
|
||||||
|
-- for type, icon in pairs(breakpoint_icons) do
|
||||||
|
-- local tp = 'Dap' .. type
|
||||||
|
-- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
|
||||||
|
-- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
|
||||||
|
-- end
|
||||||
|
|
||||||
|
dap.configurations.cs = {
|
||||||
|
{
|
||||||
|
type = 'coreclr',
|
||||||
|
name = 'Launch .NET',
|
||||||
|
request = 'launch',
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input('Path to dll: ', vim.fn.getcwd() .. '/bin/Debug/', 'file')
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||||
|
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||||
|
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||||
|
|
||||||
|
-- Install golang specific config
|
||||||
|
require('dap-go').setup {
|
||||||
|
delve = {
|
||||||
|
-- On Windows delve must be run attached or it crashes.
|
||||||
|
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
|
||||||
|
detached = vim.fn.has 'win32' == 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
63
shared/.config/nvim/lua/kickstart/plugins/gitsigns.lua
Normal file
63
shared/.config/nvim/lua/kickstart/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
|
-- NOTE: gitsigns is already included in init.lua but contains only the base
|
||||||
|
-- config. This will add also the recommended keymaps.
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
'lewis6991/gitsigns.nvim',
|
||||||
|
---@module 'gitsigns'
|
||||||
|
---@type Gitsigns.Config
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
|
opts = {
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
local gitsigns = require 'gitsigns'
|
||||||
|
|
||||||
|
local function map(mode, l, r, opts)
|
||||||
|
opts = opts or {}
|
||||||
|
opts.buffer = bufnr
|
||||||
|
vim.keymap.set(mode, l, r, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Navigation
|
||||||
|
map('n', ']c', function()
|
||||||
|
if vim.wo.diff then
|
||||||
|
vim.cmd.normal { ']c', bang = true }
|
||||||
|
else
|
||||||
|
gitsigns.nav_hunk 'next'
|
||||||
|
end
|
||||||
|
end, { desc = 'Jump to next git [c]hange' })
|
||||||
|
|
||||||
|
map('n', '[c', function()
|
||||||
|
if vim.wo.diff then
|
||||||
|
vim.cmd.normal { '[c', bang = true }
|
||||||
|
else
|
||||||
|
gitsigns.nav_hunk 'prev'
|
||||||
|
end
|
||||||
|
end, { desc = 'Jump to previous git [c]hange' })
|
||||||
|
|
||||||
|
-- Actions
|
||||||
|
-- visual mode
|
||||||
|
map('v', '<leader>hs', function() gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [s]tage hunk' })
|
||||||
|
map('v', '<leader>hr', function() gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [r]eset hunk' })
|
||||||
|
-- normal mode
|
||||||
|
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
|
||||||
|
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
|
||||||
|
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
|
||||||
|
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
|
||||||
|
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
|
||||||
|
map('n', '<leader>hi', gitsigns.preview_hunk_inline, { desc = 'git preview hunk [i]nline' })
|
||||||
|
map('n', '<leader>hb', function() gitsigns.blame_line { full = true } end, { desc = 'git [b]lame line' })
|
||||||
|
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
|
||||||
|
map('n', '<leader>hD', function() gitsigns.diffthis '@' end, { desc = 'git [D]iff against last commit' })
|
||||||
|
map('n', '<leader>hQ', function() gitsigns.setqflist 'all' end, { desc = 'git hunk [Q]uickfix list (all files in repo)' })
|
||||||
|
map('n', '<leader>hq', gitsigns.setqflist, { desc = 'git hunk [q]uickfix list (all changes in this file)' })
|
||||||
|
-- Toggles
|
||||||
|
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
|
||||||
|
map('n', '<leader>tw', gitsigns.toggle_word_diff, { desc = '[T]oggle git intra-line [w]ord diff' })
|
||||||
|
|
||||||
|
-- Text object
|
||||||
|
map({ 'o', 'x' }, 'ih', gitsigns.select_hunk)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
13
shared/.config/nvim/lua/kickstart/plugins/indent_line.lua
Normal file
13
shared/.config/nvim/lua/kickstart/plugins/indent_line.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
-- Add indentation guides even on blank lines
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
|
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||||
|
-- See `:help ibl`
|
||||||
|
main = 'ibl',
|
||||||
|
---@module 'ibl'
|
||||||
|
---@type ibl.config
|
||||||
|
opts = {},
|
||||||
|
}
|
||||||
59
shared/.config/nvim/lua/kickstart/plugins/lint.lua
Normal file
59
shared/.config/nvim/lua/kickstart/plugins/lint.lua
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
-- Linting
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
'mfussenegger/nvim-lint',
|
||||||
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
|
config = function()
|
||||||
|
local lint = require 'lint'
|
||||||
|
lint.linters_by_ft = {
|
||||||
|
markdown = { 'markdownlint' }, -- Make sure to install `markdownlint` via mason / npm
|
||||||
|
}
|
||||||
|
|
||||||
|
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||||
|
-- instead set linters_by_ft like this:
|
||||||
|
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
||||||
|
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
||||||
|
--
|
||||||
|
-- However, note that this will enable a set of default linters,
|
||||||
|
-- which will cause errors unless these tools are available:
|
||||||
|
-- {
|
||||||
|
-- clojure = { "clj-kondo" },
|
||||||
|
-- dockerfile = { "hadolint" },
|
||||||
|
-- inko = { "inko" },
|
||||||
|
-- janet = { "janet" },
|
||||||
|
-- json = { "jsonlint" },
|
||||||
|
-- markdown = { "vale" },
|
||||||
|
-- rst = { "vale" },
|
||||||
|
-- ruby = { "ruby" },
|
||||||
|
-- terraform = { "tflint" },
|
||||||
|
-- text = { "vale" }
|
||||||
|
-- }
|
||||||
|
--
|
||||||
|
-- You can disable the default linters by setting their filetypes to nil:
|
||||||
|
-- lint.linters_by_ft['clojure'] = nil
|
||||||
|
-- lint.linters_by_ft['dockerfile'] = nil
|
||||||
|
-- lint.linters_by_ft['inko'] = nil
|
||||||
|
-- lint.linters_by_ft['janet'] = nil
|
||||||
|
-- lint.linters_by_ft['json'] = nil
|
||||||
|
-- lint.linters_by_ft['markdown'] = nil
|
||||||
|
-- lint.linters_by_ft['rst'] = nil
|
||||||
|
-- lint.linters_by_ft['ruby'] = nil
|
||||||
|
-- lint.linters_by_ft['terraform'] = nil
|
||||||
|
-- lint.linters_by_ft['text'] = nil
|
||||||
|
|
||||||
|
-- Create autocommand which carries out the actual linting
|
||||||
|
-- on the specified events.
|
||||||
|
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
||||||
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
||||||
|
group = lint_augroup,
|
||||||
|
callback = function()
|
||||||
|
-- Only run the linter in buffers that you can modify in order to
|
||||||
|
-- avoid superfluous noise, notably within the handy LSP pop-ups that
|
||||||
|
-- describe the hovered symbol using Markdown.
|
||||||
|
if vim.bo.modifiable then lint.try_lint() end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
29
shared/.config/nvim/lua/kickstart/plugins/neo-tree.lua
Normal file
29
shared/.config/nvim/lua/kickstart/plugins/neo-tree.lua
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
-- Neo-tree is a Neovim plugin to browse the file system
|
||||||
|
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
'nvim-neo-tree/neo-tree.nvim',
|
||||||
|
version = '*',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
||||||
|
'MunifTanjim/nui.nvim',
|
||||||
|
},
|
||||||
|
lazy = false,
|
||||||
|
keys = {
|
||||||
|
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
||||||
|
},
|
||||||
|
---@module 'neo-tree'
|
||||||
|
---@type neotree.Config
|
||||||
|
opts = {
|
||||||
|
filesystem = {
|
||||||
|
window = {
|
||||||
|
mappings = {
|
||||||
|
['\\'] = 'close_window',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
export BROWSER=firefox
|
export BROWSER=firefox
|
||||||
export EDITOR="emacsclient -t -a \"\""
|
export EDITOR="nvim"
|
||||||
export VISUAL="emacsclient -c -a \"\""
|
export VISUAL="nvim"
|
||||||
export TERMINAL=ghostty
|
export TERMINAL=ghostty
|
||||||
export MAILER=neomutt
|
export MAILER=neomutt
|
||||||
. "$HOME/.cargo/env"
|
. "$HOME/.cargo/env"
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ PROMPT="%F{blue}%m %~%b"$'\n'"%(?.%F{green}%Bλ%b |.%F{red}?) %f"
|
|||||||
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/go/bin:$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/go/bin:$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
alias e="emacsclient -t -a \"\""
|
|
||||||
alias mailsync="mbsync -a"
|
alias mailsync="mbsync -a"
|
||||||
alias c="clear"
|
alias c="clear"
|
||||||
alias cat="bat --paging=never --style=plain"
|
alias cat="bat --paging=never --style=plain"
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
;;; dev-settings.el --- Work development environment (C#, TypeScript, JavaScript, CSS, HTML)
|
|
||||||
|
|
||||||
;;; C#
|
|
||||||
;; LSP server: dotnet tool install -g csharp-ls
|
|
||||||
|
|
||||||
(use-package csharp-ts-mode
|
|
||||||
:ensure nil
|
|
||||||
:mode "\\.cs\\'"
|
|
||||||
:hook (csharp-ts-mode . eglot-ensure))
|
|
||||||
|
|
||||||
;;; TypeScript / TSX
|
|
||||||
|
|
||||||
(use-package typescript-ts-mode
|
|
||||||
:ensure nil
|
|
||||||
:mode (("\\.ts\\'" . typescript-ts-mode)
|
|
||||||
("\\.tsx\\'" . tsx-ts-mode))
|
|
||||||
:hook ((typescript-ts-mode . eglot-ensure)
|
|
||||||
(tsx-ts-mode . eglot-ensure)))
|
|
||||||
|
|
||||||
;;; JavaScript / JSX
|
|
||||||
;; typescript-language-server handles JS too; install via: npm i -g typescript-language-server typescript
|
|
||||||
|
|
||||||
(use-package js-ts-mode
|
|
||||||
:ensure nil
|
|
||||||
:mode (("\\.js\\'" . js-ts-mode)
|
|
||||||
("\\.mjs\\'" . js-ts-mode)
|
|
||||||
("\\.cjs\\'" . js-ts-mode)
|
|
||||||
("\\.jsx\\'" . js-ts-mode))
|
|
||||||
:hook (js-ts-mode . eglot-ensure)
|
|
||||||
:config
|
|
||||||
(setq js-indent-level 2))
|
|
||||||
|
|
||||||
;;; CSS
|
|
||||||
;; LSP server: npm i -g vscode-langservers-extracted
|
|
||||||
|
|
||||||
(use-package css-ts-mode
|
|
||||||
:ensure nil
|
|
||||||
:mode "\\.css\\'"
|
|
||||||
:hook (css-ts-mode . eglot-ensure)
|
|
||||||
:config
|
|
||||||
(setq css-indent-offset 2))
|
|
||||||
|
|
||||||
;;; HTML
|
|
||||||
;; LSP server: npm i -g vscode-langservers-extracted
|
|
||||||
|
|
||||||
(use-package html-ts-mode
|
|
||||||
:ensure nil
|
|
||||||
:mode (("\\.html\\'" . html-ts-mode)
|
|
||||||
("\\.htm\\'" . html-ts-mode))
|
|
||||||
:hook (html-ts-mode . eglot-ensure))
|
|
||||||
|
|
||||||
;;; Prettier (formatting for JS/TS/CSS/HTML)
|
|
||||||
|
|
||||||
(use-package prettier
|
|
||||||
:hook ((typescript-ts-mode . prettier-mode)
|
|
||||||
(tsx-ts-mode . prettier-mode)
|
|
||||||
(js-ts-mode . prettier-mode)
|
|
||||||
(css-ts-mode . prettier-mode)
|
|
||||||
(html-ts-mode . prettier-mode)))
|
|
||||||
|
|
||||||
(provide 'dev-settings)
|
|
||||||
;;; dev-settings.el ends here
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
-- Work language pack: C#, TypeScript, JavaScript, CSS, HTML, Prettier.
|
|
||||||
-- Loaded by shared/init.lua via require('languages').
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
|
||||||
servers = {
|
|
||||||
ts_ls = {}, -- handles TypeScript, TSX, JavaScript, JSX
|
|
||||||
cssls = {},
|
|
||||||
html = {},
|
|
||||||
csharp_ls = {},
|
|
||||||
},
|
|
||||||
parsers = { 'c_sharp', 'css', 'html', 'javascript', 'tsx', 'typescript' },
|
|
||||||
formatters = {
|
|
||||||
javascript = { 'prettier' },
|
|
||||||
javascriptreact = { 'prettier' },
|
|
||||||
typescript = { 'prettier' },
|
|
||||||
typescriptreact = { 'prettier' },
|
|
||||||
css = { 'prettier' },
|
|
||||||
html = { 'prettier' },
|
|
||||||
json = { 'prettier' },
|
|
||||||
},
|
|
||||||
tools = { 'prettier' },
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user