removing clunky editors and replacing neovim with kickstart
This commit is contained in:
@@ -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
29
shared/.config/nvim/lazy-lock.json
Normal file
29
shared/.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
|
||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "6d808f99bd63303646794406e270bd553ad7792e" },
|
||||
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a3b42c3e503df87aef6d6513e13148381495c3a" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
||||
"mason.nvim": { "branch": "main", "commit": "12ddd182d9efbdc848b540f16484a583d52da0fb" },
|
||||
"mini.nvim": { "branch": "main", "commit": "5849ef04c32a6a8e55957b946c0a275801d87530" },
|
||||
"nvim-dap": { "branch": "master", "commit": "45a69eba683a2c448dd9ecfc4de89511f0646b5f" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "e146efacbafed3789ac568abcc5a981c5decaa58" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "c72328a5494b4502947a022fe69c0c47e53b6aa6" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "506338434fec5ad19cb1f8d45bf92d66c4917393" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
|
||||
"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',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user