nvim,sway
This commit is contained in:
		
							parent
							
								
									fb4b15a8ef
								
							
						
					
					
						commit
						593717151d
					
				
					 24 changed files with 967 additions and 1099 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +0,0 @@
 | 
			
		|||
{
 | 
			
		||||
    "diagnostics.globals": [
 | 
			
		||||
        "fsaf"
 | 
			
		||||
    ]
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,6 +0,0 @@
 | 
			
		|||
column_width = 120
 | 
			
		||||
line_endings = "Unix"
 | 
			
		||||
indent_type = "Spaces"
 | 
			
		||||
indent_width = 2
 | 
			
		||||
quote_style = "AutoPreferDouble"
 | 
			
		||||
call_parentheses = "None"
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
				
			
			@ -1,35 +1,21 @@
 | 
			
		|||
{
 | 
			
		||||
  "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
 | 
			
		||||
  "auto-save.nvim": { "branch": "main", "commit": "24af023800c48645e6472cb6f30cebe782288446" },
 | 
			
		||||
  "conform.nvim": { "branch": "master", "commit": "b1a75324ddf96b7bb84963a297b1ed334db087c0" },
 | 
			
		||||
  "coq.artifacts": { "branch": "artifacts", "commit": "ef5f21d638ccc456cfa5b8d0ab37093cefe48c8b" },
 | 
			
		||||
  "coq.thirdparty": { "branch": "3p", "commit": "6ee3c221c308dca7071387267ac76c9272b184a9" },
 | 
			
		||||
  "coq_nvim": { "branch": "coq", "commit": "d83bc18d044cfcd65e91dc49740a353546bc143b" },
 | 
			
		||||
  "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
 | 
			
		||||
  "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
 | 
			
		||||
  "blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" },
 | 
			
		||||
  "conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" },
 | 
			
		||||
  "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
 | 
			
		||||
  "friendly-snippets": { "branch": "main", "commit": "31f2a2657b6261724313281fe0d8ba6f43f4a4fa" },
 | 
			
		||||
  "js-i18n.nvim": { "branch": "main", "commit": "124f22f91d51e85641ba10e9a32f3b858394c2dd" },
 | 
			
		||||
  "lackluster.nvim": { "branch": "main", "commit": "d2519d14b2b6e9eef05752d5d4486ed5c48d6178" },
 | 
			
		||||
  "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
 | 
			
		||||
  "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
 | 
			
		||||
  "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" },
 | 
			
		||||
  "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
 | 
			
		||||
  "mason-tool-installer.nvim": { "branch": "main", "commit": "98767d37f8e5255a5111fc1e3163232d4dc07bda" },
 | 
			
		||||
  "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
 | 
			
		||||
  "mini.nvim": { "branch": "main", "commit": "d0464ced00abfd9bbed196fa36ccf3b1691c6b2c" },
 | 
			
		||||
  "neotest": { "branch": "master", "commit": "dddbe8fe358b05b2b7e54fe4faab50563171a76d" },
 | 
			
		||||
  "neotest-golang": { "branch": "main", "commit": "131e0402e63966692d340861c58756853913ada3" },
 | 
			
		||||
  "nvim-autopairs": { "branch": "master", "commit": "6522027785b305269fa17088395dfc0f456cedd2" },
 | 
			
		||||
  "nvim-lspconfig": { "branch": "master", "commit": "ff6471d4f837354d8257dfa326b031dd8858b16e" },
 | 
			
		||||
  "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
 | 
			
		||||
  "nvim-autopairs": { "branch": "master", "commit": "2a406cdd8c373ae7fe378a9e062a5424472bd8d8" },
 | 
			
		||||
  "nvim-lspconfig": { "branch": "master", "commit": "442e077e326ac467daf9cd63e72120fb450a850b" },
 | 
			
		||||
  "nvim-surround": { "branch": "main", "commit": "caf6f633d4d77a29b6e265b560c5a035d171a913" },
 | 
			
		||||
  "nvim-treesitter": { "branch": "master", "commit": "9be6836ebeb88a536055bf1ce0961eef68da4bc6" },
 | 
			
		||||
  "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
 | 
			
		||||
  "nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" },
 | 
			
		||||
  "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
 | 
			
		||||
  "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
 | 
			
		||||
  "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
 | 
			
		||||
  "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
 | 
			
		||||
  "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
 | 
			
		||||
  "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
 | 
			
		||||
  "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
 | 
			
		||||
  "typescript-tools.nvim": { "branch": "master", "commit": "e0887c1e336edbb01243e9f1e60d74b0bc0a2bed" },
 | 
			
		||||
  "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
 | 
			
		||||
  "typescript-tools.nvim": { "branch": "master", "commit": "a4109c70e7d6a3a86f971cefea04ab6720582ba9" },
 | 
			
		||||
  "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										45
									
								
								.config/nvim/lua/autocmd.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								.config/nvim/lua/autocmd.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,45 @@
 | 
			
		|||
-- [[ Basic Autocommands ]]
 | 
			
		||||
--  See `:help lua-guide-autocommands`
 | 
			
		||||
 | 
			
		||||
-- Highlight when yanking (copying) text
 | 
			
		||||
--  Try it with `yap` in normal mode
 | 
			
		||||
--  See `:help vim.highlight.on_yank()`
 | 
			
		||||
vim.api.nvim_create_autocmd("TextYankPost", {
 | 
			
		||||
  desc = "Highlight when yanking (copying) text",
 | 
			
		||||
  group = vim.api.nvim_create_augroup("highlight-yank", { clear = true }),
 | 
			
		||||
  callback = function() vim.hl.on_yank() end,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
 | 
			
		||||
  desc = "diagnostics on hold",
 | 
			
		||||
  group = vim.api.nvim_create_augroup("diagnostics", { clear = true }),
 | 
			
		||||
  callback = function() vim.diagnostic.open_float(nil, { focus = false }) end,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
-- TODO: check if it interferes with C-s shortcut
 | 
			
		||||
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
 | 
			
		||||
  desc = "create parent folders automatically",
 | 
			
		||||
  group = vim.api.nvim_create_augroup("create-parent-automatically", { clear = true }),
 | 
			
		||||
  callback = function()
 | 
			
		||||
    vim.cmd ":silent !mkdir -p %:p:h"
 | 
			
		||||
  end,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
vim.api.nvim_create_autocmd("BufReadPost", {
 | 
			
		||||
  pattern = { "*" },
 | 
			
		||||
  desc = "When editing a file, always jump to the last known cursor position",
 | 
			
		||||
  group = vim.api.nvim_create_augroup("last-location", { clear = true }),
 | 
			
		||||
  callback = function()
 | 
			
		||||
    local line = vim.fn.line "'\""
 | 
			
		||||
    if
 | 
			
		||||
      line >= 1
 | 
			
		||||
      and line <= vim.fn.line "$"
 | 
			
		||||
      and vim.bo.filetype ~= "commit"
 | 
			
		||||
      and vim.fn.index({ "xxd", "gitrebase" }, vim.bo.filetype) == -1
 | 
			
		||||
    then
 | 
			
		||||
      vim.cmd 'normal! g`"'
 | 
			
		||||
    end
 | 
			
		||||
  end,
 | 
			
		||||
})
 | 
			
		||||
							
								
								
									
										25
									
								
								.config/nvim/lua/config/lazy.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								.config/nvim/lua/config/lazy.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
-- [[ Install `lazy.nvim` plugin manager ]]
 | 
			
		||||
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
 | 
			
		||||
 | 
			
		||||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
 | 
			
		||||
 | 
			
		||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
 | 
			
		||||
  local lazyrepo = "https://github.com/folke/lazy.nvim.git"
 | 
			
		||||
  local out = vim.fn.system { 
 | 
			
		||||
      "git",
 | 
			
		||||
      "clone",
 | 
			
		||||
      "--filter=blob:none",
 | 
			
		||||
      "--branch=stable",
 | 
			
		||||
      lazyrepo,
 | 
			
		||||
      lazypath
 | 
			
		||||
  }
 | 
			
		||||
  if vim.v.shell_error ~= 0 then
 | 
			
		||||
    error("Error cloning lazy.nvim:\n" .. out)
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
vim.opt.rtp:prepend(lazypath)
 | 
			
		||||
 | 
			
		||||
require("lazy").setup(
 | 
			
		||||
  { import = "plugins" },
 | 
			
		||||
  { install = { colorscheme = { "tokyonight-storm" } } }
 | 
			
		||||
)
 | 
			
		||||
							
								
								
									
										35
									
								
								.config/nvim/lua/keymaps.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								.config/nvim/lua/keymaps.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,35 @@
 | 
			
		|||
vim.keymap.set("n", "<C-s>", ":w ++p<CR>", { desc = "save file" })
 | 
			
		||||
vim.keymap.set("v", "<C-s>", ":w ++p<CR>", { desc = "save file" })
 | 
			
		||||
vim.keymap.set("i", "<C-s>", "<Esc>:w ++p<CR>a", { desc = "save file" })
 | 
			
		||||
vim.keymap.set("n", ";", ":", { desc = "command with ;" })
 | 
			
		||||
vim.keymap.set("v", ";", ":", { desc = "command with ;" })
 | 
			
		||||
vim.keymap.set("n", "q", ":bd<cr>", { desc = "close buffer" })
 | 
			
		||||
vim.keymap.set("n", "Q", ":%bd<cr>", { desc = "close all buffers" })
 | 
			
		||||
vim.keymap.set("n", "d", '"_d', { desc = "delete without cut" })
 | 
			
		||||
vim.keymap.set("v", "d", '"_d', { desc = "delete without cut" })
 | 
			
		||||
vim.keymap.set({"v", "n"}, "vv", "<C-v>", { desc = "vv for visual block" })
 | 
			
		||||
 | 
			
		||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
 | 
			
		||||
-- for people to discover. Otherwise, you normally need to pres <C-\><C-n>, which
 | 
			
		||||
-- is not what someone will guess without a bit more experience.
 | 
			
		||||
--
 | 
			
		||||
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
 | 
			
		||||
-- or just use <C-\><C-n> to exit terminal mode
 | 
			
		||||
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-- TIP: Disable arrow keys in normal mode
 | 
			
		||||
vim.keymap.set("n", "<left>", '<cmd>echo "Use h to move!!"<CR>')
 | 
			
		||||
vim.keymap.set("n", "<right>", '<cmd>echo "Use l to move!!"<CR>')
 | 
			
		||||
vim.keymap.set("n", "<up>", '<cmd>echo "Use k to move!!"<CR>')
 | 
			
		||||
vim.keymap.set("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-- Keybindings to make split navigation easier.
 | 
			
		||||
--  Use CTRL+<hjkl> to switch between windows
 | 
			
		||||
--
 | 
			
		||||
--  See `:help wincmd` for a list of all window commands
 | 
			
		||||
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left window" })
 | 
			
		||||
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
 | 
			
		||||
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
 | 
			
		||||
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
 | 
			
		||||
							
								
								
									
										80
									
								
								.config/nvim/lua/options.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										80
									
								
								.config/nvim/lua/options.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,80 @@
 | 
			
		|||
-- space as a leader key
 | 
			
		||||
vim.g.mapleader = " "
 | 
			
		||||
 | 
			
		||||
-- flush buffer on focus change
 | 
			
		||||
vim.g.autowrite = "on"
 | 
			
		||||
 | 
			
		||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
 | 
			
		||||
vim.g.have_nerd_font = true
 | 
			
		||||
 | 
			
		||||
vim.opt.completeopt = { "popup", "menu", "menuone", "noselect" }
 | 
			
		||||
vim.opt.mouse = "a" -- allow the mouse to be used in Nvim
 | 
			
		||||
 | 
			
		||||
-- Tab
 | 
			
		||||
vim.opt.tabstop = 2 -- number of visual spaces per TAB
 | 
			
		||||
vim.opt.softtabstop = 2 -- number of spaces in tab when editing
 | 
			
		||||
vim.opt.shiftwidth = 2 -- insert 4 spaces on a tab
 | 
			
		||||
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
 | 
			
		||||
 | 
			
		||||
-- UI config
 | 
			
		||||
vim.opt.number = true -- show absolute number
 | 
			
		||||
vim.opt.relativenumber = true -- add numbers to each line on the left side
 | 
			
		||||
vim.opt.cursorline = true -- highlight cursor line underneath the cursor horizontally
 | 
			
		||||
vim.opt.splitbelow = true -- open new vertical split bottom
 | 
			
		||||
vim.opt.splitright = true -- open new horizontal splits right
 | 
			
		||||
vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
 | 
			
		||||
vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
 | 
			
		||||
vim.opt.wrap = false
 | 
			
		||||
-- Sets how neovim will display certain whitespace characters in the editor.
 | 
			
		||||
--  See `:help 'list'`
 | 
			
		||||
--  and `:help 'listchars'`
 | 
			
		||||
vim.opt.list = true
 | 
			
		||||
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
 | 
			
		||||
-- Enable break indent
 | 
			
		||||
-- Every wrapped line will continue visually indented (same amount of
 | 
			
		||||
-- space as the beginning of that line), thus preserving horizontal blocks
 | 
			
		||||
-- of text.
 | 
			
		||||
vim.opt.breakindent = true
 | 
			
		||||
-- Preview substitutions live, as you type!
 | 
			
		||||
vim.opt.inccommand = "split"
 | 
			
		||||
 | 
			
		||||
-- Searching
 | 
			
		||||
vim.opt.incsearch = true -- search as characters are entered
 | 
			
		||||
vim.opt.hlsearch = false -- do not highlight matches
 | 
			
		||||
vim.opt.ignorecase = true -- ignore case in searches by default
 | 
			
		||||
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
 | 
			
		||||
 | 
			
		||||
-- Sync clipboard between OS and Neovim.
 | 
			
		||||
--  Schedule the setting after `UiEnter` because it can increase startup-time.
 | 
			
		||||
--  Remove this option if you want your OS clipboard to remain independent.
 | 
			
		||||
--  See `:help 'clipboard'`
 | 
			
		||||
vim.schedule(function()
 | 
			
		||||
	vim.opt.clipboard = "unnamedplus"
 | 
			
		||||
end)
 | 
			
		||||
 | 
			
		||||
-- Save undo history
 | 
			
		||||
vim.opt.undofile = true
 | 
			
		||||
 | 
			
		||||
-- Keep signcolumn on by default
 | 
			
		||||
vim.opt.signcolumn = "yes"
 | 
			
		||||
 | 
			
		||||
-- Decrease update time
 | 
			
		||||
vim.opt.updatetime = 250
 | 
			
		||||
 | 
			
		||||
-- Decrease mapped sequence wait time
 | 
			
		||||
-- Displays which-key popup sooner
 | 
			
		||||
vim.opt.timeoutlen = 300
 | 
			
		||||
 | 
			
		||||
-- Minimal number of screen lines to keep above and below the cursor.
 | 
			
		||||
vim.opt.scrolloff = 10
 | 
			
		||||
 | 
			
		||||
-- folds
 | 
			
		||||
vim.opt.foldcolumn = "0"
 | 
			
		||||
vim.opt.foldmethod = "expr"
 | 
			
		||||
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
 | 
			
		||||
vim.opt.foldtext = ""
 | 
			
		||||
 | 
			
		||||
vim.opt.foldnestmax = 3
 | 
			
		||||
vim.opt.foldlevel = 99
 | 
			
		||||
vim.opt.foldlevelstart = 99
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										6
									
								
								.config/nvim/lua/plugins/autopairs.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.config/nvim/lua/plugins/autopairs.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
return {
 | 
			
		||||
  "windwp/nvim-autopairs",
 | 
			
		||||
  event = "InsertEnter",
 | 
			
		||||
  config = true,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										32
									
								
								.config/nvim/lua/plugins/blink.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								.config/nvim/lua/plugins/blink.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
return {
 | 
			
		||||
	"saghen/blink.cmp",
 | 
			
		||||
	dependencies = { "rafamadriz/friendly-snippets" },
 | 
			
		||||
	version = "1.*",
 | 
			
		||||
	opts = {
 | 
			
		||||
		keymap = {
 | 
			
		||||
			preset = "super-tab",
 | 
			
		||||
			["<C-CR>"] = { "show", "show_documentation", "hide_documentation" },
 | 
			
		||||
			["<C-space>"] = {},
 | 
			
		||||
		},
 | 
			
		||||
		completion = {
 | 
			
		||||
			-- Disable showing for all alphanumeric keywords by default. Prefer LSP specific trigger
 | 
			
		||||
			-- characters.
 | 
			
		||||
			-- trigger = { show_on_keyword = false },
 | 
			
		||||
			-- Controls whether the documentation window will automatically show when selecting a completion item
 | 
			
		||||
			documentation = { auto_show = true, auto_show_delay_ms = 500 },
 | 
			
		||||
		},
 | 
			
		||||
		sources = {
 | 
			
		||||
			-- add lazydev to your completion providers
 | 
			
		||||
			default = { "lazydev", "lsp", "path", "snippets", "buffer" },
 | 
			
		||||
			providers = {
 | 
			
		||||
				lazydev = {
 | 
			
		||||
					name = "LazyDev",
 | 
			
		||||
					module = "lazydev.integrations.blink",
 | 
			
		||||
					-- make lazydev completions top priority (see `:h blink.cmp`)
 | 
			
		||||
					score_offset = 100,
 | 
			
		||||
				},
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		signature = { enabled = true },
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										42
									
								
								.config/nvim/lua/plugins/conform.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								.config/nvim/lua/plugins/conform.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,42 @@
 | 
			
		|||
-- Autoformat
 | 
			
		||||
return {
 | 
			
		||||
	"stevearc/conform.nvim",
 | 
			
		||||
	event = { "BufWritePre" },
 | 
			
		||||
	cmd = { "ConformInfo" },
 | 
			
		||||
	keys = {
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>f",
 | 
			
		||||
			function()
 | 
			
		||||
				require("conform").format({ async = true, lsp_format = "fallback" })
 | 
			
		||||
			end,
 | 
			
		||||
			mode = "",
 | 
			
		||||
			desc = "[F]ormat buffer",
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	opts = {
 | 
			
		||||
		notify_on_error = false,
 | 
			
		||||
		format_on_save = function(bufnr)
 | 
			
		||||
			-- Disable "format_on_save lsp_fallback" for languages that don't
 | 
			
		||||
			-- have a well standardized coding style. You can add additional
 | 
			
		||||
			-- languages here or re-enable it for the disabled ones.
 | 
			
		||||
			local disable_filetypes = { c = true, cpp = true }
 | 
			
		||||
			local lsp_format_opt
 | 
			
		||||
			if disable_filetypes[vim.bo[bufnr].filetype] then
 | 
			
		||||
				lsp_format_opt = "never"
 | 
			
		||||
			end
 | 
			
		||||
			return {
 | 
			
		||||
				timeout_ms = 500,
 | 
			
		||||
				lsp_format = lsp_format_opt,
 | 
			
		||||
			}
 | 
			
		||||
		end,
 | 
			
		||||
		formatters_by_ft = {
 | 
			
		||||
			lua = { "stylua" },
 | 
			
		||||
			javascript = { "biome", "biome-organize-imports" },
 | 
			
		||||
			javascriptreact = { "biome", "biome-organize-imports" },
 | 
			
		||||
			typescript = { "biome", "biome-organize-imports" },
 | 
			
		||||
			typescriptreact = { "biome", "biome-organize-imports" },
 | 
			
		||||
			-- You can use 'stop_after_first' to run the first available formatter from the list
 | 
			
		||||
			-- javascript = { "prettierd", "prettier", stop_after_first = true },
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										41
									
								
								.config/nvim/lua/plugins/flash.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								.config/nvim/lua/plugins/flash.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,41 @@
 | 
			
		|||
return {
 | 
			
		||||
  "folke/flash.nvim",
 | 
			
		||||
  event = "VeryLazy",
 | 
			
		||||
  opts = {
 | 
			
		||||
    jump = {
 | 
			
		||||
      autojump = true,
 | 
			
		||||
    },
 | 
			
		||||
    label = {
 | 
			
		||||
      before = true,
 | 
			
		||||
      after = false,
 | 
			
		||||
      min_pattern_length = 0,
 | 
			
		||||
      style = "overlay",
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  keys = {
 | 
			
		||||
    {
 | 
			
		||||
      "s",
 | 
			
		||||
      mode = { "n", "x", "o" },
 | 
			
		||||
      function()
 | 
			
		||||
        require("flash").jump()
 | 
			
		||||
      end,
 | 
			
		||||
      desc = "Flash",
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "S",
 | 
			
		||||
      mode = { "n", "x", "o" },
 | 
			
		||||
      function()
 | 
			
		||||
        require("flash").treesitter()
 | 
			
		||||
      end,
 | 
			
		||||
      desc = "Flash Treesitter",
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "R",
 | 
			
		||||
      mode = { "o", "x" },
 | 
			
		||||
      function()
 | 
			
		||||
        require("flash").treesitter_search()
 | 
			
		||||
      end,
 | 
			
		||||
      desc = "Treesitter Search",
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								.config/nvim/lua/plugins/i18n.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.config/nvim/lua/plugins/i18n.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,10 @@
 | 
			
		|||
return {
 | 
			
		||||
	"nabekou29/js-i18n.nvim",
 | 
			
		||||
	dependencies = {
 | 
			
		||||
		"neovim/nvim-lspconfig",
 | 
			
		||||
		"nvim-treesitter/nvim-treesitter",
 | 
			
		||||
		"nvim-lua/plenary.nvim",
 | 
			
		||||
	},
 | 
			
		||||
	event = { "BufReadPre", "BufNewFile" },
 | 
			
		||||
	opts = {},
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										15
									
								
								.config/nvim/lua/plugins/lazydev.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								.config/nvim/lua/plugins/lazydev.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
-- lazydev.nvim is a plugin that properly configures LuaLS for editing your Neovim config by
 | 
			
		||||
-- lazily updating your workspace libraries.
 | 
			
		||||
return {
 | 
			
		||||
    'folke/lazydev.nvim',
 | 
			
		||||
    ft = 'lua',
 | 
			
		||||
    opts = {
 | 
			
		||||
        library = {
 | 
			
		||||
            -- See the configuration section for more details
 | 
			
		||||
            -- Load luvit types when the `vim.uv` word is found
 | 
			
		||||
            { path = "${3rd}/luv/library", words = { "vim%.uv" } },
 | 
			
		||||
            '~/.local/share/nvim/lazy/',
 | 
			
		||||
            { path = "snacks.nvim", words = { "Snacks", "snacks" } },
 | 
			
		||||
        },
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								.config/nvim/lua/plugins/luckluster.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.config/nvim/lua/plugins/luckluster.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,10 @@
 | 
			
		|||
return {
 | 
			
		||||
	"slugbyte/lackluster.nvim",
 | 
			
		||||
	lazy = false,
 | 
			
		||||
	priority = 1000,
 | 
			
		||||
	init = function()
 | 
			
		||||
		vim.cmd.colorscheme("lackluster")
 | 
			
		||||
		-- vim.cmd.colorscheme("lackluster-hack") -- my favorite
 | 
			
		||||
		-- vim.cmd.colorscheme("lackluster-mint")
 | 
			
		||||
	end,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										114
									
								
								.config/nvim/lua/plugins/mason.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										114
									
								
								.config/nvim/lua/plugins/mason.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,114 @@
 | 
			
		|||
-- Automatically install LSPs and related tools to stdpath for neovim
 | 
			
		||||
return {
 | 
			
		||||
	"williamboman/mason.nvim",
 | 
			
		||||
	dependencies = {
 | 
			
		||||
		"neovim/nvim-lspconfig",
 | 
			
		||||
		"williamboman/mason-lspconfig.nvim",
 | 
			
		||||
	},
 | 
			
		||||
	config = function()
 | 
			
		||||
		local servers = {
 | 
			
		||||
			harper_ls = {
 | 
			
		||||
				settings = {
 | 
			
		||||
					["harper-ls"] = {
 | 
			
		||||
						userDictPath = vim.fn.stdpath("config") .. "/spell/en.utf-8.add",
 | 
			
		||||
					},
 | 
			
		||||
				},
 | 
			
		||||
			},
 | 
			
		||||
			marksman = {},
 | 
			
		||||
			-- vtsls = {
 | 
			
		||||
			-- 	settings = {
 | 
			
		||||
			-- 		complete_function_calls = true,
 | 
			
		||||
			-- 		vtsls = {
 | 
			
		||||
			-- 			enableMoveToFileCodeAction = true,
 | 
			
		||||
			-- 			autoUseWorkspaceTsdk = true,
 | 
			
		||||
			-- 			experimental = {
 | 
			
		||||
			-- 				completion = {
 | 
			
		||||
			-- 					enableServerSideFuzzyMatch = true,
 | 
			
		||||
			-- 				},
 | 
			
		||||
			-- 			},
 | 
			
		||||
			-- 		},
 | 
			
		||||
			-- 		javascript = {
 | 
			
		||||
			-- 			updateImportsOnFileMove = { enabled = "always" },
 | 
			
		||||
			-- 			suggest = {
 | 
			
		||||
			-- 				completeFunctionCalls = true,
 | 
			
		||||
			-- 			},
 | 
			
		||||
			-- 			inlayHints = {
 | 
			
		||||
			-- 				enumMemberValues = { enabled = true },
 | 
			
		||||
			-- 				functionLikeReturnTypes = { enabled = true },
 | 
			
		||||
			-- 				parameterNames = { enabled = "literals" },
 | 
			
		||||
			-- 				parameterTypes = { enabled = true },
 | 
			
		||||
			-- 				propertyDeclarationTypes = { enabled = true },
 | 
			
		||||
			-- 				variableTypes = { enabled = false },
 | 
			
		||||
			-- 			},
 | 
			
		||||
			-- 		},
 | 
			
		||||
			-- 		typescript = {
 | 
			
		||||
			-- 			updateImportsOnFileMove = { enabled = "always" },
 | 
			
		||||
			-- 			suggest = {
 | 
			
		||||
			-- 				completeFunctionCalls = true,
 | 
			
		||||
			-- 			},
 | 
			
		||||
			-- 			inlayHints = {
 | 
			
		||||
			-- 				enumMemberValues = { enabled = true },
 | 
			
		||||
			-- 				functionLikeReturnTypes = { enabled = true },
 | 
			
		||||
			-- 				parameterNames = { enabled = "literals" },
 | 
			
		||||
			-- 				parameterTypes = { enabled = true },
 | 
			
		||||
			-- 				propertyDeclarationTypes = { enabled = true },
 | 
			
		||||
			-- 				variableTypes = { enabled = false },
 | 
			
		||||
			-- 			},
 | 
			
		||||
			-- 		},
 | 
			
		||||
			-- 	},
 | 
			
		||||
			-- },
 | 
			
		||||
			lua_ls = {
 | 
			
		||||
				settings = {
 | 
			
		||||
					Lua = {
 | 
			
		||||
						telemetry = { enable = false },
 | 
			
		||||
						-- NOTE: toggle below to ignore Lua_LS's noisy `missing-fields` warnings
 | 
			
		||||
						diagnostics = { disable = { "missing-fields" } },
 | 
			
		||||
						hint = { enable = true },
 | 
			
		||||
					},
 | 
			
		||||
				},
 | 
			
		||||
			},
 | 
			
		||||
			tailwindcss = {},
 | 
			
		||||
			html = {},
 | 
			
		||||
			cssls = {},
 | 
			
		||||
			emmet_language_server = {},
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		-- Special formatted fields cannot be set above
 | 
			
		||||
		-- servers.vtsls.settings["js/ts"] = { implicitProjectConfig = { checkJs = true } }
 | 
			
		||||
 | 
			
		||||
		local ensure_installed = vim.tbl_keys(servers or {})
 | 
			
		||||
 | 
			
		||||
		require("mason").setup()
 | 
			
		||||
 | 
			
		||||
		require("mason-lspconfig").setup({
 | 
			
		||||
			ensure_installed = ensure_installed,
 | 
			
		||||
			automatic_installation = false,
 | 
			
		||||
			handlers = {
 | 
			
		||||
				function(server_name)
 | 
			
		||||
					local server = servers[server_name] or {}
 | 
			
		||||
					-- This handles overriding only values explicitly passed
 | 
			
		||||
					-- by the server configuration above. Useful when disabling
 | 
			
		||||
					-- certain features of an LSP (for example, turning off formatting for ts_ls)
 | 
			
		||||
					server.capabilities = vim.tbl_deep_extend("force", {}, server.capabilities or {})
 | 
			
		||||
					require("lspconfig")[server_name].setup(server)
 | 
			
		||||
				end,
 | 
			
		||||
			},
 | 
			
		||||
		})
 | 
			
		||||
 | 
			
		||||
		-- TODO: move to native lsp configs when
 | 
			
		||||
		-- lspconfig plugin will be merged into core
 | 
			
		||||
		-- for server, settings in pairs(servers) do
 | 
			
		||||
		-- 	vim.lsp.config(server, settings)
 | 
			
		||||
		-- 	vim.lsp.enable(server)
 | 
			
		||||
		-- end
 | 
			
		||||
 | 
			
		||||
		-- Linters
 | 
			
		||||
		local linters = { "stylua", "biome" }
 | 
			
		||||
 | 
			
		||||
		for _, linter in ipairs(linters) do
 | 
			
		||||
			if not require("mason-registry").is_installed(linter) then
 | 
			
		||||
				vim.cmd("MasonInstall " .. linter)
 | 
			
		||||
			end
 | 
			
		||||
		end
 | 
			
		||||
	end,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										365
									
								
								.config/nvim/lua/plugins/snacks.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										365
									
								
								.config/nvim/lua/plugins/snacks.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,365 @@
 | 
			
		|||
return {
 | 
			
		||||
	"folke/snacks.nvim",
 | 
			
		||||
	priority = 1000,
 | 
			
		||||
	lazy = false,
 | 
			
		||||
	---@type snacks.Config
 | 
			
		||||
	opts = {
 | 
			
		||||
		bigfile = { enabled = true },
 | 
			
		||||
		explorer = { enabled = true, replace_netrw = true },
 | 
			
		||||
		indent = { enabled = true },
 | 
			
		||||
		input = { enabled = true },
 | 
			
		||||
		notifier = {
 | 
			
		||||
			enabled = true,
 | 
			
		||||
			timeout = 3000,
 | 
			
		||||
		},
 | 
			
		||||
		picker = { enabled = true },
 | 
			
		||||
		quickfile = { enabled = true },
 | 
			
		||||
		scroll = { enabled = true },
 | 
			
		||||
		statuscolumn = { enabled = true },
 | 
			
		||||
		words = { enabled = true },
 | 
			
		||||
		styles = {
 | 
			
		||||
			notification = {},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	keys = {
 | 
			
		||||
		-- Top Pickers & Explorer
 | 
			
		||||
		{
 | 
			
		||||
			"<leader><space>",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.buffers()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Buffers",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>e",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.explorer()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "File Explorer",
 | 
			
		||||
		},
 | 
			
		||||
		-- config
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>cc",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.files({ cwd = vim.fn.stdpath("config") })
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Find Config File",
 | 
			
		||||
		},
 | 
			
		||||
		-- search
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sf",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.files()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Find Files",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sl",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.lines()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Buffer Lines",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sg",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.grep()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Grep",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sB",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.grep_buffers()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Grep Open Buffers",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sw",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.grep_word()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Visual selection or word",
 | 
			
		||||
			mode = { "n", "x" },
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sp",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.projects()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Projects",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sc",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.commands()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Commands",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sd",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.diagnostics()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Diagnostics",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sD",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.diagnostics_buffer()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Buffer Diagnostics",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sh",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.help()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Help Pages",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sH",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.highlights()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Highlights",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sj",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.jumps()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Jumps",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sk",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.keymaps()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Keymaps",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sM",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.man()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Man Pages",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sq",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.qflist()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Quickfix List",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sR",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.resume()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Resume",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>su",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.undo()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Undo History",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>co",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.colorschemes()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Colorschemes",
 | 
			
		||||
		},
 | 
			
		||||
		-- LSP
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>gd",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.lsp_definitions()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Goto Definition",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>gD",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.lsp_declarations()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Goto Declaration",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>gr",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.lsp_references()
 | 
			
		||||
			end,
 | 
			
		||||
			nowait = true,
 | 
			
		||||
			desc = "References",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>gi",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.lsp_implementations()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Goto Implementation",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>gy",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.lsp_type_definitions()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Goto T[y]pe Definition",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>ss",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.lsp_symbols()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "LSP Symbols",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>sw",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.picker.lsp_workspace_symbols()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "LSP Workspace Symbols",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>ca",
 | 
			
		||||
			function()
 | 
			
		||||
				vim.lsp.buf.code_action()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Code actions",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>rn",
 | 
			
		||||
			function()
 | 
			
		||||
				vim.lsp.buf.rename()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Rename symbols",
 | 
			
		||||
		},
 | 
			
		||||
		-- Other
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>z",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.zen()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Toggle Zen Mode",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>Z",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.zen.zoom()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Toggle Zoom",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>.",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.scratch()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Toggle Scratch Buffer",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>S",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.scratch.select()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Select Scratch Buffer",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>mv",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.rename.rename_file()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Move File",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>gg",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.lazygit()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Lazygit",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>un",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.notifier.hide()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Dismiss All Notifications",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<c-_>",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.terminal()
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "which_key_ignore",
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"]]",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.words.jump(vim.v.count1)
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Next Reference",
 | 
			
		||||
			mode = { "n", "t" },
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"[[",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.words.jump(-vim.v.count1)
 | 
			
		||||
			end,
 | 
			
		||||
			desc = "Prev Reference",
 | 
			
		||||
			mode = { "n", "t" },
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"<leader>N",
 | 
			
		||||
			desc = "Neovim News",
 | 
			
		||||
			function()
 | 
			
		||||
				Snacks.win({
 | 
			
		||||
					file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1],
 | 
			
		||||
					width = 0.6,
 | 
			
		||||
					height = 0.6,
 | 
			
		||||
					wo = {
 | 
			
		||||
						spell = false,
 | 
			
		||||
						wrap = false,
 | 
			
		||||
						signcolumn = "yes",
 | 
			
		||||
						statuscolumn = " ",
 | 
			
		||||
						conceallevel = 3,
 | 
			
		||||
					},
 | 
			
		||||
				})
 | 
			
		||||
			end,
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	init = function()
 | 
			
		||||
		vim.api.nvim_create_autocmd("User", {
 | 
			
		||||
			pattern = "VeryLazy",
 | 
			
		||||
			callback = function()
 | 
			
		||||
				-- Setup some globals for debugging (lazy-loaded)
 | 
			
		||||
				_G.dd = function(...)
 | 
			
		||||
					Snacks.debug.inspect(...)
 | 
			
		||||
				end
 | 
			
		||||
				_G.bt = function()
 | 
			
		||||
					Snacks.debug.backtrace()
 | 
			
		||||
				end
 | 
			
		||||
				vim.print = _G.dd -- Override print to use snacks for `:=` command
 | 
			
		||||
 | 
			
		||||
				-- Create some toggle mappings
 | 
			
		||||
				Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
 | 
			
		||||
				Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
 | 
			
		||||
				Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
 | 
			
		||||
				Snacks.toggle.diagnostics():map("<leader>ud")
 | 
			
		||||
				Snacks.toggle.line_number():map("<leader>ul")
 | 
			
		||||
				Snacks.toggle
 | 
			
		||||
					.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
 | 
			
		||||
					:map("<leader>uc")
 | 
			
		||||
				Snacks.toggle.treesitter():map("<leader>uT")
 | 
			
		||||
				Snacks.toggle
 | 
			
		||||
					.option("background", { off = "light", on = "dark", name = "Dark Background" })
 | 
			
		||||
					:map("<leader>ub")
 | 
			
		||||
				Snacks.toggle.inlay_hints():map("<leader>uh")
 | 
			
		||||
				Snacks.toggle.indent():map("<leader>ug")
 | 
			
		||||
				Snacks.toggle.dim():map("<leader>uD")
 | 
			
		||||
			end,
 | 
			
		||||
		})
 | 
			
		||||
	end,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										8
									
								
								.config/nvim/lua/plugins/surround.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								.config/nvim/lua/plugins/surround.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
return {
 | 
			
		||||
	"kylechui/nvim-surround",
 | 
			
		||||
	version = "*", -- Use for stability; omit to use `main` branch for the latest features
 | 
			
		||||
	event = "VeryLazy",
 | 
			
		||||
	config = function()
 | 
			
		||||
		require("nvim-surround").setup({})
 | 
			
		||||
	end,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										13
									
								
								.config/nvim/lua/plugins/tokyonight.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								.config/nvim/lua/plugins/tokyonight.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
return {
 | 
			
		||||
	"folke/tokyonight.nvim",
 | 
			
		||||
	priority = 1000, -- Make sure to load this before all the other start plugins.
 | 
			
		||||
	init = function()
 | 
			
		||||
		-- Load the colorscheme here.
 | 
			
		||||
		-- Like many other themes, this one has different styles, and you could load
 | 
			
		||||
		-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
 | 
			
		||||
		-- vim.cmd.colorscheme("tokyonight-storm")
 | 
			
		||||
 | 
			
		||||
		-- You can configure highlights by doing something like:
 | 
			
		||||
		-- vim.cmd.hi("Comment gui=none")
 | 
			
		||||
	end,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										40
									
								
								.config/nvim/lua/plugins/treesitter.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								.config/nvim/lua/plugins/treesitter.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,40 @@
 | 
			
		|||
-- Highlight, edit, and navigate code
 | 
			
		||||
return {
 | 
			
		||||
  "nvim-treesitter/nvim-treesitter",
 | 
			
		||||
  build = ":TSUpdate",
 | 
			
		||||
  config = function () 
 | 
			
		||||
    local configs = require("nvim-treesitter.configs")
 | 
			
		||||
 | 
			
		||||
    configs.setup({
 | 
			
		||||
      ensure_installed = {
 | 
			
		||||
        "bash",
 | 
			
		||||
        "c",
 | 
			
		||||
        "diff",
 | 
			
		||||
        "html",
 | 
			
		||||
        "lua",
 | 
			
		||||
        "luadoc",
 | 
			
		||||
        "markdown",
 | 
			
		||||
        "markdown_inline",
 | 
			
		||||
        "query",
 | 
			
		||||
        "vim",
 | 
			
		||||
        "vimdoc",
 | 
			
		||||
        "go",
 | 
			
		||||
        "typescript",
 | 
			
		||||
        "javascript",
 | 
			
		||||
      },
 | 
			
		||||
      auto_install = true,
 | 
			
		||||
      sync_install = false,
 | 
			
		||||
      highlight = { enable = true },
 | 
			
		||||
      indent = { enable = true },  
 | 
			
		||||
      incremental_selection = {
 | 
			
		||||
        enable = true,
 | 
			
		||||
        keymaps = {
 | 
			
		||||
          init_selection = "<CR>",
 | 
			
		||||
          scope_incremental = "<CR>",
 | 
			
		||||
          node_incremental = "<TAB>",
 | 
			
		||||
          node_decremental = "<S-TAB>",
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
    })
 | 
			
		||||
  end
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								.config/nvim/lua/plugins/typescript.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								.config/nvim/lua/plugins/typescript.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
return {
 | 
			
		||||
	"pmizio/typescript-tools.nvim",
 | 
			
		||||
	dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
 | 
			
		||||
	opts = {
 | 
			
		||||
		settings = {
 | 
			
		||||
			jsx_close_tag = {
 | 
			
		||||
				enable = true,
 | 
			
		||||
				filetypes = { "javascriptreact", "typescriptreact" },
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										53
									
								
								.config/nvim/lua/plugins/which_key.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								.config/nvim/lua/plugins/which_key.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,53 @@
 | 
			
		|||
-- Useful plugin to show you pending keybinds.
 | 
			
		||||
return {
 | 
			
		||||
  "folke/which-key.nvim",
 | 
			
		||||
  event = "VimEnter", -- Sets the loading event to 'VimEnter'
 | 
			
		||||
  opts = {
 | 
			
		||||
    icons = {
 | 
			
		||||
      -- set icon mappings to true if you have a Nerd Font
 | 
			
		||||
      mappings = vim.g.have_nerd_font,
 | 
			
		||||
      -- If you are using a Nerd Font: set icons.keys to an empty table which will use the
 | 
			
		||||
      -- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
 | 
			
		||||
      keys = vim.g.have_nerd_font and {} or {
 | 
			
		||||
        Up = "<Up> ",
 | 
			
		||||
        Down = "<Down> ",
 | 
			
		||||
        Left = "<Left> ",
 | 
			
		||||
        Right = "<Right> ",
 | 
			
		||||
        C = "<C-…> ",
 | 
			
		||||
        M = "<M-…> ",
 | 
			
		||||
        D = "<D-…> ",
 | 
			
		||||
        S = "<S-…> ",
 | 
			
		||||
        CR = "<CR> ",
 | 
			
		||||
        Esc = "<Esc> ",
 | 
			
		||||
        ScrollWheelDown = "<ScrollWheelDown> ",
 | 
			
		||||
        ScrollWheelUp = "<ScrollWheelUp> ",
 | 
			
		||||
        NL = "<NL> ",
 | 
			
		||||
        BS = "<BS> ",
 | 
			
		||||
        Space = "<Space> ",
 | 
			
		||||
        Tab = "<Tab> ",
 | 
			
		||||
        F1 = "<F1>",
 | 
			
		||||
        F2 = "<F2>",
 | 
			
		||||
        F3 = "<F3>",
 | 
			
		||||
        F4 = "<F4>",
 | 
			
		||||
        F5 = "<F5>",
 | 
			
		||||
        F6 = "<F6>",
 | 
			
		||||
        F7 = "<F7>",
 | 
			
		||||
        F8 = "<F8>",
 | 
			
		||||
        F9 = "<F9>",
 | 
			
		||||
        F10 = "<F10>",
 | 
			
		||||
        F11 = "<F11>",
 | 
			
		||||
        F12 = "<F12>",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    -- Document existing key chains
 | 
			
		||||
    spec = {
 | 
			
		||||
      { "<leader>c", group = "[C]ode", mode = { "n", "x" } },
 | 
			
		||||
      { "<leader>d", group = "[D]ocument" },
 | 
			
		||||
      { "<leader>r", group = "[R]ename" },
 | 
			
		||||
      { "<leader>s", group = "[S]earch" },
 | 
			
		||||
      { "<leader>w", group = "[W]orkspace" },
 | 
			
		||||
      { "<leader>h", group = "Git [H]unk", mode = { "n", "v" } },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										6
									
								
								.config/nvim/spell/en.utf-8.add
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.config/nvim/spell/en.utf-8.add
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
CTRL
 | 
			
		||||
stdpath
 | 
			
		||||
neovim
 | 
			
		||||
tmux
 | 
			
		||||
Autoformat
 | 
			
		||||
TODO
 | 
			
		||||
| 
						 | 
				
			
			@ -52,7 +52,7 @@ output $external {
 | 
			
		|||
 | 
			
		||||
output $laptop {
 | 
			
		||||
    mode  2560x1600@240.0Hz
 | 
			
		||||
    pos 1280 3927
 | 
			
		||||
    pos 2461 3127
 | 
			
		||||
    transform normal
 | 
			
		||||
    scale 2.0
 | 
			
		||||
    scale_filter nearest
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue