DEVELOPMENT ENVIRONMENT

~alex/dotfiles

d5a5353b4f9d6a7d7a5defb4c4420d00871d4a5f — Alejandro Laguna 16 days ago 3e6f6ae master
chore: cleanup neovim config
13 files changed, 7 insertions(+), 314 deletions(-)

M nvim/init.lua
M nvim/lazy-lock.json
M nvim/lua/autocmds.lua
D nvim/lua/keymaps.lua
D nvim/lua/notes.lua
M nvim/lua/options.lua
M nvim/lua/plugins.lua
M nvim/lua/plugins/lazydev.lua
D nvim/lua/plugins/obsidian.lua
D nvim/lua/plugins/presence.lua
D nvim/lua/plugins/startup.lua
D nvim/lua/plugins/supermaven.lua
D nvim/lua/plugins/zig-lamp.lua
M nvim/init.lua => nvim/init.lua +0 -3
@@ 3,11 3,8 @@ vim.g.maplocalleader = " "
vim.g.have_nerd_font = false

require("options")
require("keymaps")
require("autocmds")
require("plugins")
require("notes")

--vim.cmd.colorscheme("nordbones")
vim.g.seoul256_background = 233
vim.cmd.colorscheme("seoul256")

M nvim/lazy-lock.json => nvim/lazy-lock.json +5 -17
@@ 1,40 1,28 @@
{
  "LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" },
  "beside.nvim": { "branch": "main", "commit": "ce2f889718f13b22eb8cdeb6738a74f7bbea06a4" },
  "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
  "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
  "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
  "conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" },
  "cord": { "branch": "master", "commit": "85f295e43550bc968b66d95d8bfd6e12bb17df08" },
  "fidget.nvim": { "branch": "main", "commit": "9e0201673e08e997e7cf52afca5565c70bd117f3" },
  "gitsigns.nvim": { "branch": "main", "commit": "070a5d7b985546cc57e1fc61e5bc507fecac6045" },
  "julia-vim": { "branch": "master", "commit": "52b30547346b21bc93acda28d626795667f9e087" },
  "gitsigns.nvim": { "branch": "main", "commit": "851a051e2bd2caba97e23314c68d69f1b1cf5d19" },
  "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
  "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
  "luvit-meta": { "branch": "main", "commit": "7edcd52ac6f2acc2f83f0cc27ac989a142408fbf" },
  "mason-lspconfig.nvim": { "branch": "main", "commit": "b3298993d55fa194279b5eb9dbfb3a43da65cadf" },
  "mason-lspconfig.nvim": { "branch": "main", "commit": "e17625cdc8c2650787467398e02c5d63a2cde966" },
  "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
  "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
  "nvim-cmp": { "branch": "main", "commit": "2ffe79f1f021def8dd1fcd81deb16f1bb0d989f3" },
  "nvim-lspconfig": { "branch": "master", "commit": "a9bb4d5f4276aa5cddc015faa3ecc5a7b5a26b14" },
  "nvim-lspconfig": { "branch": "master", "commit": "c59fc922f718fa055f69f5f3bc888f23211571eb" },
  "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" },
  "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
  "screenkey.nvim": { "branch": "main", "commit": "16390931d847b1d5d77098daccac4e55654ac9e2" },
  "seoul256.vim": { "branch": "master", "commit": "0357ff3e44faab66c98bc98dfc89c834e37012da" },
  "supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
  "tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" },
  "telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" },
  "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
  "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
  "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
  "transparent.nvim": { "branch": "main", "commit": "e00ca1cf09caef575edf8da7e5a8b9193893b4c7" },
  "vim-blade": { "branch": "master", "commit": "9534101808cc320eef003129a40cab04b026a20c" },
  "vim-markdown": { "branch": "master", "commit": "1bc9d0cd8e1cc3e901b0a49c2b50a843f1c89397" },
  "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
  "vim-table-mode": { "branch": "master", "commit": "bb025308a45c67c7c8f0763ba37bc2ee3f534df0" },
  "vimtex": { "branch": "master", "commit": "16a5609d17a436db7f48046d91747fd6a9d75c74" },
  "vimtex": { "branch": "master", "commit": "77df16780a8a4b418c651f3a4300d59bc2dd3603" },
  "vimwiki": { "branch": "dev", "commit": "a54a3002e229c4b43d69ced170ff77663a5b2c40" },
  "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
  "zen-mode.nvim": { "branch": "main", "commit": "8564ce6d29ec7554eb9df578efa882d33b3c23a7" },
  "zig-lamp": { "branch": "main", "commit": "0654299f5150b2a420212e34f86a96c7dbae31e2" }
  "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

M nvim/lua/autocmds.lua => nvim/lua/autocmds.lua +0 -25
@@ 6,34 6,9 @@ vim.api.nvim_create_autocmd("TextYankPost", {
	end,
})

-- Forcefully stop treesitter for markdown to prevent crashes
vim.api.nvim_create_autocmd("FileType", {
	pattern = { "markdown" },
	callback = function(args)
		pcall(vim.treesitter.stop, args.buf)
	end,
})

--local function pdf_of(file)
--	return vim.fn.fnamemodify(file, ":r") .. ".pdf"
--end
--
--vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, {
--	pattern = "*.typ",
--	callback = function()
--		local file = vim.fn.expand("%:p")
--		local pdf = pdf_of(file)
--
--		vim.fn.jobstart({
--			"typst",
--			"compile",
--			file,
--			pdf,
--		}, { detach = true })
--
--		vim.fn.jobstart({
--			"sioyek",
--			pdf,
--		}, { detach = true })
--	end,
--})

D nvim/lua/keymaps.lua => nvim/lua/keymaps.lua +0 -16
@@ 1,16 0,0 @@
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })

vim.keymap.set("n", "<leader>cd", "<cmd>:cd %:h<CR>")

vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal 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>')

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" })

D nvim/lua/notes.lua => nvim/lua/notes.lua +0 -1
@@ 1,1 0,0 @@
vim.keymap.set("n", "<leader>zz", ":ZenMode<CR>")

M nvim/lua/options.lua => nvim/lua/options.lua +0 -2
@@ 42,8 42,6 @@ vim.diagnostic.config({

vim.opt.conceallevel = 1

-- Failsafe: Completely block treesitter from starting on markdown
-- This prevents crashes in Neovim 0.12+ hovers/files
local original_ts_start = vim.treesitter.start
vim.treesitter.start = function(bufnr, lang)
	local buf = bufnr or vim.api.nvim_get_current_buf()

M nvim/lua/plugins.lua => nvim/lua/plugins.lua +1 -59
@@ 11,45 11,8 @@ vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
	"tpope/vim-sleuth",
	-- Lua
	{
		"folke/zen-mode.nvim",
		opts = {
			window = {
				width = 100, -- width of the Zen window
			},
		},
	},

	{
		"preservim/vim-markdown",
		dependencies = { "godlygeek/tabular" },
		init = function()
			vim.g.vim_markdown_folding_disabled = 1
			vim.g.vim_markdown_no_default_key_mappings = 1
		end,
	},
	"dhruvasagar/vim-table-mode",
	"xiyaowong/transparent.nvim",
	"jwalton512/vim-blade",
	"Bilal2453/luvit-meta",
	"JuliaEditorSupport/julia-vim",
	--	{
	--		"norcalli/nvim-colorizer.lua",
	--		config = function()
	--			require("colorizer").setup({
	--				"*",
	--				css = { rgb_fn = true },
	--				html = { mode = "foreground" },
	--			})
	--		end,
	--	},
	{
		"NStefan002/screenkey.nvim",
		lazy = false,
		version = "*", -- or branch = "main", to use the latest commit
	},
	{ import = "plugins.presence" },
	{ import = "plugins.gitsigns" },
	{ import = "plugins.which_key" },
	{ import = "plugins.telescope" },


@@ 61,26 24,5 @@ require("lazy").setup({
	{ import = "plugins.todo_comments" },
	{ import = "plugins.treesitter" },
	{ import = "plugins.latex" },
	{ import = "plugins.zig-lamp" },
	{ import = "plugins.vimwiki" },
	{ import = "plugins.supermaven" },
	-- { import = "plugins.obsidian" },
}, {
	ui = {
		icons = vim.g.have_nerd_font and {} or {
			cmd = "⌘",
			config = "🛠",
			event = "📅",
			ft = "📂",
			init = "⚙",
			keys = "🗝",
			plugin = "🔌",
			runtime = "💻",
			require = "🌙",
			source = "📄",
			start = "🚀",
			task = "📌",
			lazy = "💤 ",
		},
	},
})
}, {})

M nvim/lua/plugins/lazydev.lua => nvim/lua/plugins/lazydev.lua +1 -1
@@ 3,7 3,7 @@ return {
	ft = "lua",
	opts = {
		library = {
			{ path = "luvit-meta/library", words = { "vim%.uv" } },
			{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
		},
	},
}

D nvim/lua/plugins/obsidian.lua => nvim/lua/plugins/obsidian.lua +0 -15
@@ 1,15 0,0 @@
return {
	"obsidian-nvim/obsidian.nvim",
	version = "*", -- use latest release, remove to use latest commit
	---@module 'obsidian'
	---@type obsidian.config
	opts = {
		legacy_commands = false, -- this will be removed in 4.0.0
		workspaces = {
			{
				name = "personal",
				path = "~/personal/vault",
			},
		},
	},
}

D nvim/lua/plugins/presence.lua => nvim/lua/plugins/presence.lua +0 -131
@@ 1,131 0,0 @@
return {
	"vyfor/cord.nvim",
	name = "cord",
	config = function()
		require("cord").setup({
			enabled = true,
			log_level = vim.log.levels.OFF,
			editor = {
				client = "neovim",
				tooltip = "neovim",
				icon = nil,
			},
			display = {
				theme = "atom",
				flavor = "accent",
				swap_fields = false,
				swap_icons = false,
			},
			timestamp = {
				enabled = true,
				reset_on_idle = false,
				reset_on_change = false,
			},
			idle = {
				enabled = false,
				timeout = 300000,
				show_status = true,
				ignore_focus = true,
				unidle_on_focus = true,
				smart_idle = true,
				details = "Idling",
				state = nil,
				tooltip = "💤",
				icon = nil,
			},
			text = {
				default = nil,
				workspace = function(opts)
					return "in " .. opts.workspace
				end,
				viewing = function(opts)
					return "viewing " .. opts.filename
				end,
				editing = function(opts)
					return "editing " .. opts.filename
				end,
				file_browser = function(opts)
					return "browsing files in " .. opts.name
				end,
				plugin_manager = function(opts)
					return "managing plugins in " .. opts.name
				end,
				lsp = function(opts)
					return "configuring LSP in " .. opts.name
				end,
				docs = function(opts)
					return "reading " .. opts.name
				end,
				vcs = function(opts)
					return "committing changes in " .. opts.name
				end,
				notes = function(opts)
					return "taking notes in " .. opts.name
				end,
				debug = function(opts)
					return "debugging in " .. opts.name
				end,
				test = function(opts)
					return "testing in " .. opts.name
				end,
				diagnostics = function(opts)
					return "fixing problems in " .. opts.name
				end,
				games = function(opts)
					return "playing " .. opts.name
				end,
				terminal = function(opts)
					return "running commands in " .. opts.name
				end,
				dashboard = "home",
			},
			buttons = nil,
			-- buttons = {
			--   {
			--     label = 'View Repository',
			--     url = function(opts) return opts.repo_url end,
			--   },
			-- },
			assets = nil,
			variables = nil,
			hooks = {
				ready = nil,
				shutdown = nil,
				pre_activity = nil,
				post_activity = nil,
				idle_enter = nil,
				idle_leave = nil,
				workspace_change = nil,
			},
			plugins = nil,
			advanced = {
				plugin = {
					autocmds = true,
					cursor_update = "on_hold",
					match_in_mappings = true,
				},
				server = {
					update = "fetch",
					pipe_path = nil,
					executable_path = nil,
					timeout = 300000,
				},
				discord = {
					reconnect = {
						enabled = false,
						interval = 5000,
						initial = true,
					},
				},
				workspace = {
					root_markers = {
						".git",
						".hg",
						".svn",
					},
					limit_to_cwd = false,
				},
			},
		})
	end,
}

D nvim/lua/plugins/startup.lua => nvim/lua/plugins/startup.lua +0 -0
D nvim/lua/plugins/supermaven.lua => nvim/lua/plugins/supermaven.lua +0 -20
@@ 1,20 0,0 @@
return {
  "supermaven-inc/supermaven-nvim",
  config = function()
    require("supermaven-nvim").setup({
      keymaps = {
        accept_suggestion = "<Tab>",
        clear_suggestion = "<C-]>",
        accept_word = "<C-j>",
      },
      ignore_filetypes = { cpp = true }, -- you can add filetypes here to ignore
      color = {
        suggestion_color = "#5c534f",
        cterm = 244,
      },
      log_level = "info", -- set to "off" to disable logging completely
      disable_inline_completion = false, -- disables inline completion for use with cmp
      disable_keymaps = false, -- disables built in keymaps for more manual control
    })
  end,
}

D nvim/lua/plugins/zig-lamp.lua => nvim/lua/plugins/zig-lamp.lua +0 -24
@@ 1,24 0,0 @@
return {
	"jinzhongjia/zig-lamp",
	event = "VeryLazy",
	-- Optional but recommended: build the local FFI lib to enable faster/safer verification & formatting
	build = ":ZigLampBuild async",
	dependencies = {
		"nvim-lua/plenary.nvim",
	},
	init = function()
		-- Backward-compatible global vars (all optional)
		-- Auto-install ZLS: timeout in milliseconds; set to nil to disable
		vim.g.zig_lamp_zls_auto_install = nil
		-- Fallback to system zls when no local match is found
		vim.g.zig_lamp_fall_back_sys_zls = nil
		-- Extra LSP options merged into defaults
		vim.g.zig_lamp_zls_lsp_opt = {}
		-- ZLS server settings (overrides built-in recommendations)
		vim.g.zig_lamp_zls_settings = {}
		-- Help text color for the package panel
		vim.g.zig_lamp_pkg_help_fg = "#CF5C00"
		-- Timeout (ms) used by `zig fetch` when retrieving url hashes
		vim.g.zig_lamp_zig_fetch_timeout = 5000
	end,
}