summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AutoHotkey/kinesis360_hotkeys.ahk10
-rw-r--r--emacs/init.el4
-rw-r--r--nvim/init.lua388
-rw-r--r--nvim/lua/configs.lua285
-rw-r--r--nvim/lua/core/autocmds.lua98
-rw-r--r--nvim/lua/core/keymaps.lua113
-rw-r--r--nvim/lua/core/options.lua37
-rw-r--r--nvim/lua/plugins.lua359
-rw-r--r--nvim_old/LICENSE (renamed from nvim/LICENSE)0
-rw-r--r--nvim_old/init.lua370
-rw-r--r--nvim_old/lazy-lock.json25
-rw-r--r--nvim_old/lua/codev.lua (renamed from nvim/lua/codev.lua)0
-rw-r--r--nvim_old/lua/keybindings.lua (renamed from nvim/lua/keybindings.lua)0
-rw-r--r--nvim_old/lua/options.lua (renamed from nvim/lua/options.lua)0
-rw-r--r--nvim_old/lua/plugins.lua256
-rw-r--r--nvim_old/structure.txt16
-rw-r--r--nvim_old/syntax/codelis.vim47
-rw-r--r--nvim_old/syntax/codev.vim66
-rw-r--r--powershell/Microsoft.PowerShell_profile.ps11
-rw-r--r--windows-terminal/settings.json4
20 files changed, 1487 insertions, 592 deletions
diff --git a/AutoHotkey/kinesis360_hotkeys.ahk b/AutoHotkey/kinesis360_hotkeys.ahk
index bc2fa32..143828f 100644
--- a/AutoHotkey/kinesis360_hotkeys.ahk
+++ b/AutoHotkey/kinesis360_hotkeys.ahk
@@ -42,7 +42,7 @@ CapsLock & Space::Send "^!l"
}
;Emacs
-#e::
+#n::
{
; Check if Emacs is running
@@ -118,17 +118,17 @@ CapsLock & Space::Send "^!l"
{
; Check if Telegram is running
- if WinExist("ahk_exe Telegram.exe")
+ if WinExist("ahk_class Qt51515QWindowIcon ahk_exe Telegram.exe")
{
; If Telegram is already in the foreground, minimize it
- if WinActive("ahk_exe Telegram.exe")
+ if WinActive("ahk_class Qt51515QWindowIcon ahk_exe Telegram.exe")
{
- WinMinimize("ahk_exe Telegram.exe")
+ WinMinimize("ahk_class Qt51515QWindowIcon ahk_exe Telegram.exe")
}
else
{
; If Telegram is running but not in the foreground, bring it to the foreground
- WinActivate("Telegram.exe" )
+ WinActivate("ahk_class Qt51515QWindowIcon ahk_exe Telegram.exe" )
}
}
}
diff --git a/emacs/init.el b/emacs/init.el
index 02f1bc3..8db4245 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -34,8 +34,8 @@
(add-hook 'after-make-frame-functions
(lambda (frame)
(with-selected-frame frame
- (set-face-attribute 'default nil :font "Hack NF" :height 220))))
- (set-face-attribute 'default nil :font "Hack NF" :height 220))
+ (set-face-attribute 'default nil :font "FiraCode Nerd Font Mono" :height 220))))
+ (set-face-attribute 'default nil :font "FiraCode Nerd Font Mono" :height 220))
diff --git a/nvim/init.lua b/nvim/init.lua
index 343fd4b..7c8b9e2 100644
--- a/nvim/init.lua
+++ b/nvim/init.lua
@@ -1,382 +1,10 @@
-require("options")
-require("codev")
-require("plugins")
-require("keybindings")
-require('lspconfig').marksman.setup{}
+-- Load core settings
+require('core.options')
+require('core.keymaps')
+require('core.autocmds')
-local harpoon = require("harpoon")
-local actions = require "telescope.actions"
+-- Load plugins
+require('plugins')
-
-
-if vim.g.neovide then
- vim.g.neovide_confirm_quit = true
- vim.cmd [[
- autocmd VimEnter * cd D:\Optics\CODEV\Designs
- " autocmd VimEnter * Oil
- ]]
-end
-
-
-
-local function open_in_external_program(prompt_bufnr)
- local entry = require('telescope.actions.state').get_selected_entry()
- local file_path = entry.path or entry.filename
- if file_path then
- os.execute(string.format('start "" "%s"', file_path))
- else
- print("No file selected")
- end
- actions.close(prompt_bufnr)
-end
-
-
-require('telescope').setup({
- defaults = {
- layout_config = {
- vertical = { width = 0.5 }
- -- other layout configuration here
- },
- mappings = {
- n = {
- ["q"] = actions.close,
- ["o"] = open_in_external_program,
- },
- i = {
- ["<C-c>"] = actions.close,
- ["<C-n>"] = actions.cycle_history_next,
- ["<C-p>"] = actions.cycle_history_prev,
- ["<C-j>"] = actions.move_selection_next,
- ["<C-k>"] = actions.move_selection_previous,
- ["<C-o>"] = open_in_external_program,
- }
- },
- -- other defaults configuration here
- },
- pickers = {
- live_grep = {
- file_ignore_patterns = { 'node_modules', '.git', '.venv' },
- additional_args = function(_)
- return { "--hidden" }
- end
- },
- find_files = {
- file_ignore_patterns = { 'node_modules', '.git', '.venv' },
- hidden = true
- }
- }
-})
-require("Comment").setup()
-
--- REQUIRED
-harpoon:setup()
--- REQUIRED
-
-vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
-vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
-
-vim.keymap.set("n", "<leader>h", function() harpoon:list():select(1) end)
-vim.keymap.set("n", "<leader>j", function() harpoon:list():select(2) end)
-vim.keymap.set("n", "<leader>k", function() harpoon:list():select(3) end)
-vim.keymap.set("n", "<leader>l", function() harpoon:list():select(4) end)
-
--- Toggle previous & next buffers stored within Harpoon list
-vim.keymap.set("n", "<leader>N", function() harpoon:list():prev() end)
-vim.keymap.set("n", "<leader>P", function() harpoon:list():next() end)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-require("oil").setup({
- -- Oil will take over directory buffers (e.g. `vim .` or `:e src/`)
- -- Set to false if you want some other plugin (e.g. netrw) to open when you edit directories.
- default_file_explorer = true,
- -- Id is automatically added at the beginning, and name at the end
- -- See :help oil-columns
- columns = {
- "icon",
- -- "permissions",
- -- "size",
- -- "mtime",
- },
- -- Buffer-local options to use for oil buffers
- buf_options = {
- buflisted = false,
- bufhidden = "hide",
- },
- -- Window-local options to use for oil buffers
- win_options = {
- wrap = false,
- signcolumn = "no",
- cursorcolumn = false,
- foldcolumn = "0",
- spell = false,
- list = false,
- conceallevel = 3,
- concealcursor = "nvic",
- },
- -- Send deleted files to the trash instead of permanently deleting them (:help oil-trash)
- delete_to_trash = true,
- -- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)
- skip_confirm_for_simple_edits = false,
- -- Selecting a new/moved/renamed file or directory will prompt you to save changes first
- -- (:help prompt_save_on_select_new_entry)
- prompt_save_on_select_new_entry = true,
- -- Oil will automatically delete hidden buffers after this delay
- -- You can set the delay to false to disable cleanup entirely
- -- Note that the cleanup process only starts when none of the oil buffers are currently displayed
- cleanup_delay_ms = 2000,
- lsp_file_methods = {
- -- Time to wait for LSP file operations to complete before skipping
- timeout_ms = 1000,
- -- Set to true to autosave buffers that are updated with LSP willRenameFiles
- -- Set to "unmodified" to only save unmodified buffers
- autosave_changes = false,
- },
- -- Constrain the cursor to the editable parts of the oil buffer
- -- Set to `false` to disable, or "name" to keep it on the file names
- constrain_cursor = "editable",
- -- Set to true to watch the filesystem for changes and reload oil
- watch_for_changes = false,
- -- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
- -- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
- -- Additionally, if it is a string that matches "actions.<name>",
- -- it will use the mapping at require("oil.actions").<name>
- -- Set to `false` to remove a keymap
- -- See :help oil-actions for a list of all available actions
- keymaps = {
- ["g?"] = "actions.show_help",
- ["<CR>"] = "actions.select",
- ["<C-S>"] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" },
- ["<C-H>"] = { "actions.select", opts = { horizontal = true }, desc = "Open the entry in a horizontal split" },
- -- ["<C-t>"] = { "actions.select", opts = { tab = true }, desc = "Open the entry in new tab" },
- ["<C-p>"] = "actions.preview",
- ["<C-c>"] = "actions.close",
- ["<C-l>"] = "actions.refresh",
- ["-"] = "actions.parent",
- ["_"] = "actions.open_cwd",
- ["`"] = "actions.cd",
- ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" },
- ["gs"] = "actions.change_sort",
- ["<C-o>"] = "actions.open_external",
- ["g."] = "actions.toggle_hidden",
- ["g\\"] = "actions.toggle_trash",
- ['yp'] = {
- desc = 'Copy filepath to system clipboard',
- callback = function ()
- require('oil.actions').copy_entry_path.callback()
- vim.fn.setreg("+", vim.fn.getreg(vim.v.register))
- end,
- },
- },
- -- Set to false to disable all of the above keymaps
- use_default_keymaps =false,
- view_options = {
- -- Show files and directories that start with "."
- show_hidden = false,
- -- This function defines what is considered a "hidden" file
- is_hidden_file = function(name, bufnr)
- return vim.startswith(name, ".")
- end,
- -- This function defines what will never be shown, even when `show_hidden` is set
- is_always_hidden = function(name, bufnr)
- return false
- end,
- -- Sort file names in a more intuitive order for humans. Is less performant,
- -- so you may want to set to false if you work with large directories.
- natural_order = true,
- -- Sort file and directory names case insensitive
- case_insensitive = false,
- sort = {
- -- sort order can be "asc" or "desc"
- -- see :help oil-columns to see which columns are sortable
- { "type", "asc" },
- { "name", "asc" },
- },
- },
- -- Extra arguments to pass to SCP when moving/copying files over SSH
- extra_scp_args = {},
- -- EXPERIMENTAL support for performing file operations with git
- git = {
- -- Return true to automatically git add/mv/rm files
- add = function(path)
- return false
- end,
- mv = function(src_path, dest_path)
- return false
- end,
- rm = function(path)
- return false
- end,
- },
- -- Configuration for the floating window in oil.open_float
- float = {
- -- Padding around the floating window
- padding = 2,
- max_width = 0,
- max_height = 0,
- border = "rounded",
- win_options = {
- winblend = 0,
- },
- -- preview_split: Split direction: "auto", "left", "right", "above", "below".
- preview_split = "auto",
- -- This is the config that will be passed to nvim_open_win.
- -- Change values here to customize the layout
- override = function(conf)
- return conf
- end,
- },
- -- Configuration for the actions floating preview window
- preview = {
- -- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
- -- min_width and max_width can be a single value or a list of mixed integer/float types.
- -- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total"
- max_width = 0.9,
- -- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total"
- min_width = { 40, 0.4 },
- -- optionally define an integer/float for the exact width of the preview window
- width = nil,
- -- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
- -- min_height and max_height can be a single value or a list of mixed integer/float types.
- -- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total"
- max_height = 0.9,
- -- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total"
- min_height = { 5, 0.1 },
- -- optionally define an integer/float for the exact height of the preview window
- height = nil,
- border = "rounded",
- win_options = {
- winblend = 0,
- },
- -- Whether the preview window is automatically updated when the cursor is moved
- update_on_cursor_moved = true,
- },
- -- Configuration for the floating progress window
- progress = {
- max_width = 0.9,
- min_width = { 40, 0.4 },
- width = nil,
- max_height = { 10, 0.9 },
- min_height = { 5, 0.1 },
- height = nil,
- border = "rounded",
- minimized_border = "none",
- win_options = {
- winblend = 0,
- },
- },
- -- Configuration for the floating SSH window
- ssh = {
- border = "rounded",
- },
- -- Configuration for the floating keymaps help window
- keymaps_help = {
- border = "rounded",
- },
-})
-
-
--- Load toggleterm if not loaded
--- require('toggleterm').setup{}
-
--- Close the terminal with Ctrl+q and Ctrl+d in terminal mode
-function _G.set_terminal_keymaps()
- local opts = { noremap = true, silent = true }
- vim.api.nvim_buf_set_keymap(0, 't', '<C-d>', [[<C-\><C-n><cmd>ToggleTerm<CR>]], opts)
- vim.api.nvim_buf_set_keymap(0, 't', '<C-q>', [[<C-\><C-n><cmd>ToggleTerm<CR>]], opts)
- -- vim.api.nvim_buf_set_keymap(0, 'n', '<C-d>', [[<C-\><C-n><cmd>ToggleTerm<CR>]], opts)
- -- vim.api.nvim_buf_set_keymap(0, 't', 'jk','<Nop>',opts)
- -- vim.api.nvim_buf_del_keymap(0, 'i', "jk")
- -- vim.api.nvim_buf_set_keymap(0, 'i', 'k', '<Nop>', opts)
-end
-require("toggleterm").setup({
- -- open_mapping = [[<C-\>]], -- Example keybinding, adjust as needed
- direction = "float", -- or "horizontal" / "vertical" / "tab"
- -- set_terminal_keymaps(),
- -- on_open = function(term)
- -- vim.cmd("startinsert") -- Always enter insert mode when terminal opens
- -- end,
- -- on_focus = function(term)
- -- vim.cmd("startinsert") -- Enter insert mode when terminal gains focus
- -- end,
- -- on_close = function(term)
- -- vim.cmd("stopinsert") -- Stop insert mode when terminal closes
- -- end,
- start_in_insert=true,
- -- persist_mode = true,
-})
-
--- Set the keymaps when a terminal is opened
--- vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
--- Automatically enter insert mode when ToggleTerm is opened
--- vim.api.nvim_create_autocmd("TermOpen", {
--- pattern = "term://*",
--- callback = function()
--- vim.cmd(":startinsert")
--- -- set_terminal_keymaps()
--- end,
--- })
-
-vim.api.nvim_create_autocmd({ "TermOpen", "BufEnter" }, {
- -- pattern = { "*" },
- callback = function()
- if vim.opt.buftype:get() == "terminal" then
- vim.cmd("startinsert")
- -- vim.cmd("shfdstartinsert")
- set_terminal_keymaps()
- end
- end
-})
-
-
--- Add this after your lsp-zero configuration
-vim.diagnostic.config({
- virtual_text = {
- prefix = '●', -- Could be '■', '▎', 'x'
- source = "if_many"
- },
- float = {
- -- source = "always",
- border = "rounded",
- header = "",
- prefix = "",
- },
- signs = true,
- underline = true,
- update_in_insert = false,
- severity_sort = true,
-})
-
--- Add keyboard shortcuts to see full error messages
-vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, { noremap=true, silent=true })
+-- Load plugin configurations
+require('configs')
diff --git a/nvim/lua/configs.lua b/nvim/lua/configs.lua
new file mode 100644
index 0000000..92d26f7
--- /dev/null
+++ b/nvim/lua/configs.lua
@@ -0,0 +1,285 @@
+-- Plugin configurations
+-- All plugin-specific settings are configured here
+
+--------------------------------
+-- TELESCOPE
+--------------------------------
+local function setup_telescope()
+ local actions = require("telescope.actions")
+
+ -- Function to open selected file in external program
+ local function open_in_external_program(prompt_bufnr)
+ local entry = require('telescope.actions.state').get_selected_entry()
+ local file_path = entry.path or entry.filename
+ if file_path then
+ os.execute(string.format('start "" "%s"', file_path))
+ else
+ print("No file selected")
+ end
+ actions.close(prompt_bufnr)
+ end
+
+ require('telescope').setup({
+ defaults = {
+ layout_config = {
+ vertical = { width = 0.5 }
+ },
+ mappings = {
+ n = {
+ ["q"] = actions.close,
+ ["o"] = open_in_external_program,
+ },
+ i = {
+ ["<C-c>"] = actions.close,
+ ["<C-n>"] = actions.cycle_history_next,
+ ["<C-p>"] = actions.cycle_history_prev,
+ ["<C-j>"] = actions.move_selection_next,
+ ["<C-k>"] = actions.move_selection_previous,
+ ["<C-o>"] = open_in_external_program,
+ }
+ },
+ },
+ pickers = {
+ live_grep = {
+ file_ignore_patterns = { 'node_modules', '.git', '.venv' },
+ additional_args = function(_)
+ return { "--hidden" }
+ end
+ },
+ find_files = {
+ file_ignore_patterns = { 'node_modules', '.git', '.venv' },
+ hidden = true
+ }
+ }
+ })
+end
+
+--------------------------------
+-- HARPOON
+--------------------------------
+local function setup_harpoon()
+ local harpoon = require("harpoon")
+
+ -- Initialize harpoon
+ harpoon:setup({
+ settings = {
+ save_on_toggle = true,
+ sync_on_ui_close = true,
+ }
+ })
+end
+
+--------------------------------
+-- OIL
+--------------------------------
+local function setup_oil()
+ require("oil").setup({
+ -- Default file explorer settings
+ default_file_explorer = true,
+
+ -- Columns to display
+ columns = { "icon" },
+
+ -- Buffer options
+ buf_options = {
+ buflisted = false,
+ bufhidden = "hide",
+ },
+
+ -- Window options
+ win_options = {
+ wrap = false,
+ signcolumn = "no",
+ cursorcolumn = false,
+ foldcolumn = "0",
+ spell = false,
+ list = false,
+ conceallevel = 3,
+ concealcursor = "nvic",
+ },
+
+ -- File operations
+ delete_to_trash = true,
+ skip_confirm_for_simple_edits = false,
+ prompt_save_on_select_new_entry = true,
+ cleanup_delay_ms = 2000,
+
+ -- UI behavior
+ constrain_cursor = "editable",
+ watch_for_changes = false,
+
+ -- Custom keymaps
+ keymaps = {
+ ["g?"] = "actions.show_help",
+ ["<CR>"] = "actions.select",
+ ["<C-S>"] = { "actions.select", opts = { vertical = true } },
+ ["<C-H>"] = { "actions.select", opts = { horizontal = true } },
+ ["<C-p>"] = "actions.preview",
+ ["<C-c>"] = "actions.close",
+ ["<C-l>"] = "actions.refresh",
+ ["-"] = "actions.parent",
+ ["_"] = "actions.open_cwd",
+ ["`"] = "actions.cd",
+ ["~"] = { "actions.cd", opts = { scope = "tab" } },
+ ["gs"] = "actions.change_sort",
+ ["<C-o>"] = "actions.open_external",
+ ["g."] = "actions.toggle_hidden",
+ ["g\\"] = "actions.toggle_trash",
+ ['yp'] = {
+ desc = 'Copy filepath to system clipboard',
+ callback = function ()
+ require('oil.actions').copy_entry_path.callback()
+ vim.fn.setreg("+", vim.fn.getreg(vim.v.register))
+ end,
+ },
+ },
+
+ -- Disable default keymaps
+ use_default_keymaps = false,
+
+ -- View options
+ view_options = {
+ show_hidden = false,
+ natural_order = true,
+ case_insensitive = false,
+ sort = {
+ { "type", "asc" },
+ { "name", "asc" },
+ },
+ },
+
+ -- Preview window settings
+ preview = {
+ max_width = 0.9,
+ min_width = { 40, 0.4 },
+ max_height = 0.9,
+ min_height = { 5, 0.1 },
+ border = "rounded",
+ win_options = { winblend = 0 },
+ },
+
+ -- Floating window settings
+ float = {
+ padding = 2,
+ max_width = 0,
+ max_height = 0,
+ border = "rounded",
+ win_options = { winblend = 0 },
+ },
+ })
+end
+
+--------------------------------
+-- TOGGLETERM
+--------------------------------
+local function setup_toggleterm()
+ require("toggleterm").setup({
+ -- Shell to use in the terminal
+ shell = "pwsh.exe -NoLogo",
+
+ -- Display options
+ direction = "float",
+ float_opts = {
+ border = "rounded",
+ },
+
+ -- Window appearance
+ winbar = {
+ enabled = false
+ },
+
+ -- Behavior
+ start_in_insert = true,
+ close_on_exit = true,
+
+ -- Integration with tmux
+ persist_size = true,
+ persist_mode = true,
+ })
+end
+
+--------------------------------
+-- TREESITTER
+--------------------------------
+local function setup_treesitter()
+ require('nvim-treesitter.configs').setup({
+ ensure_installed = { "c", "lua", "vim", "vimdoc", "cpp", "python" },
+ sync_install = false,
+ auto_install = false,
+ highlight = { enable = true },
+ indent = { enable = true },
+ })
+end
+
+--------------------------------
+-- COMMENTS
+--------------------------------
+local function setup_comments()
+ require('Comment').setup({
+ padding = true,
+ sticky = true,
+ ignore = nil,
+ toggler = {
+ line = '<leader>/',
+ block = 'gbc',
+ },
+ opleader = {
+ line = '<leader>/',
+ block = 'gb',
+ }
+ })
+end
+
+--------------------------------
+-- LSP Configuration
+--------------------------------
+local function setup_lsp()
+ -- Configure Mason LSP installer/manager
+ require('mason').setup({
+ ensure_installed = {
+ 'lua_ls', -- Lua
+ 'clangd', -- C/C++
+ 'pyright', -- Python
+ 'marksman', -- Markdown
+ },
+ handlers = {
+ -- Lua LSP settings
+ lua_ls = function()
+ require('lspconfig').lua_ls.setup({})
+ end,
+
+ -- C/C++ LSP settings (clangd)
+ clangd = function()
+ require('lspconfig').clangd.setup({})
+ end,
+
+ -- Markdown LSP settings
+ marksman = function()
+ require('lspconfig').marksman.setup({})
+ end,
+ }
+ })
+ require("mason-lspconfig").setup {}
+
+ -- Configure diagnostics appearance
+ vim.diagnostic.config({
+ virtual_lines=true,
+ signs = true,
+ underline = true,
+ update_in_insert = false,
+ severity_sort = true,
+ })
+end
+
+--------------------------------
+-- INITIALIZE ALL CONFIGS
+--------------------------------
+
+-- Set up all plugin configurations
+setup_telescope()
+setup_harpoon()
+setup_oil()
+setup_toggleterm()
+setup_treesitter()
+setup_comments()
+setup_lsp()
diff --git a/nvim/lua/core/autocmds.lua b/nvim/lua/core/autocmds.lua
new file mode 100644
index 0000000..898aeb7
--- /dev/null
+++ b/nvim/lua/core/autocmds.lua
@@ -0,0 +1,98 @@
+-- Core autocommands
+-- Centralized place for all autocommands
+
+--------------------------------
+-- FILE DETECTION & RELOADING
+--------------------------------
+
+-- Auto-reload files when changed externally
+local file_change_detect = vim.api.nvim_create_augroup("FileChangeDetect", { clear = true })
+vim.api.nvim_create_autocmd({"FocusGained", "BufEnter", "BufWinEnter", "WinEnter", "CursorHold", "CursorHoldI"}, {
+ group = file_change_detect,
+ callback = function()
+ vim.cmd("checktime")
+ end,
+})
+
+vim.api.nvim_create_autocmd("FileChangedShellPost", {
+ group = file_change_detect,
+ callback = function()
+ vim.notify("File changed on disk. Buffer reloaded.", vim.log.levels.WARN)
+ vim.cmd("checktime")
+ end,
+})
+
+--------------------------------
+-- TERMINAL BEHAVIOR
+--------------------------------
+
+-- Terminal settings and keymaps
+local terminal_settings = vim.api.nvim_create_augroup("TerminalSettings", { clear = true })
+vim.api.nvim_create_autocmd({"TermOpen", "BufEnter"}, {
+ group = terminal_settings,
+ callback = function()
+ if vim.opt.buftype:get() == "terminal" then
+ vim.cmd("startinsert")
+
+ -- Terminal keymaps
+ local opts = { noremap = true, silent = true, buffer = true }
+ vim.keymap.set("t", "<C-d>", [[<C-\><C-n><cmd>ToggleTerm<CR>]], opts)
+ vim.keymap.set("t", "<C-q>", [[<C-\><C-n><cmd>ToggleTerm<CR>]], opts)
+ vim.keymap.set("t", "jk", [[<C-\><C-n>]], opts)
+ vim.keymap.set("t", "<C-h>", [[<C-\><C-n><C-W>h]], opts)
+ vim.keymap.set("t", "<C-j>", [[<C-\><C-n><C-W>j]], opts)
+ vim.keymap.set("t", "<C-k>", [[<C-\><C-n><C-W>k]], opts)
+ vim.keymap.set("t", "<C-l>", [[<C-\><C-n><C-W>l]], opts)
+ end
+ end,
+})
+
+--------------------------------
+-- CUSTOM FILETYPES
+--------------------------------
+
+-- Custom filetype detection
+local filetype_group = vim.api.nvim_create_augroup("CustomFileTypes", { clear = true })
+
+-- Set up .seq files to use codev syntax
+vim.api.nvim_create_autocmd({"BufRead", "BufNewFile"}, {
+ group = filetype_group,
+ pattern = "*.seq",
+ callback = function()
+ vim.bo.filetype = "seq"
+ vim.bo.syntax = "codev"
+ vim.bo.commentstring = "!%s"
+ end,
+})
+
+-- Set up .lis files to use codelis syntax
+vim.api.nvim_create_autocmd({"BufRead", "BufNewFile"}, {
+ group = filetype_group,
+ pattern = "*.lis",
+ callback = function()
+ vim.bo.filetype = "lis"
+ vim.bo.syntax = "codelis"
+ end,
+})
+
+--------------------------------
+-- CUSTOM COMMANDS
+--------------------------------
+
+-- Python docstring helper
+vim.api.nvim_create_user_command("PythonDocstring", function()
+ local docstring = [["""
+
+# Information:
+
+# Arguments:
+
+# Returns:
+
+"""]]
+ -- Insert the docstring at the cursor position
+ local line = vim.api.nvim_win_get_cursor(0)[1]
+ vim.api.nvim_buf_set_lines(0, line-1, line-1, false, vim.split(docstring, "\n"))
+ -- Position cursor at the right spot
+ vim.api.nvim_win_set_cursor(0, {line+1, 0})
+end, {})
diff --git a/nvim/lua/core/keymaps.lua b/nvim/lua/core/keymaps.lua
new file mode 100644
index 0000000..0ab02ff
--- /dev/null
+++ b/nvim/lua/core/keymaps.lua
@@ -0,0 +1,113 @@
+-- Core keymaps
+-- General key mappings not tied to specific plugins
+
+-- Leader key
+vim.g.mapleader = " "
+
+----------------
+-- NORMAL MODE
+----------------
+
+-- File operations
+vim.keymap.set("n", "<leader>w", "<cmd>w<cr>", { desc = "Save file" })
+vim.keymap.set("n", "<leader>q", "<cmd>q<cr>", { desc = "Quit" })
+vim.keymap.set("n", "<leader>Q", "<cmd>q!<cr>", { desc = "Force quit" })
+vim.keymap.set("n", "<C-c>", "<cmd>bd<cr>", { desc = "Close buffer" })
+
+-- Quick buffer navigation
+vim.keymap.set("n", "<C-h>", "<C-w>h", { desc = "Move to left window" })
+vim.keymap.set("n", "<C-j>", "<C-w>j", { desc = "Move to bottom window" })
+vim.keymap.set("n", "<C-k>", "<C-w>k", { desc = "Move to top window" })
+vim.keymap.set("n", "<C-l>", "<C-w>l", { desc = "Move to right window" })
+
+-- Quick formatting
+vim.keymap.set("n", "<leader>S", "ggVG=", { desc = "Format entire file" })
+
+-- Quick line operations
+vim.keymap.set("n", "<leader>o", "o<Esc>", { desc = "New line below" })
+vim.keymap.set("n", "<leader>O", "O<Esc>", { desc = "New line above" })
+vim.keymap.set("n", "J", "mzJ`z", { desc = "Join lines and maintain cursor" })
+
+-- Better vertical navigation
+vim.keymap.set("n", "<C-d>", "<C-d>zz", { desc = "Half page down and center" })
+vim.keymap.set("n", "<C-u>", "<C-u>zz", { desc = "Half page up and center" })
+vim.keymap.set("n", "n", "nzzzv", { desc = "Next search result and center" })
+vim.keymap.set("n", "N", "Nzzzv", { desc = "Prev search result and center" })
+
+-- Clipboard operations
+vim.keymap.set({"n", "v"}, "<leader>y", [["+y]], { desc = "Copy to system clipboard" })
+vim.keymap.set("n", "<leader>Y", [["+Y]], { desc = "Copy line to system clipboard" })
+vim.keymap.set({"n", "v"}, "<leader>d", [["_d]], { desc = "Delete to void register" })
+vim.keymap.set("x", "<leader>p", [["_dP]], { desc = "Paste over selection" })
+
+-- Quickfix navigation
+vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz", { desc = "Next quickfix item" })
+vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz", { desc = "Previous quickfix item" })
+
+-- Undo remap
+vim.keymap.set("n", "U", "<C-r>", { desc = "Redo" })
+
+-- Search and replace current word
+vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
+ { desc = "Replace current word" })
+
+-- Terminal keymaps
+vim.keymap.set("n", "<leader>t", "<cmd>ToggleTerm<cr>", { desc = "Toggle terminal" })
+vim.keymap.set({"n", "i"},"<C-r><C-k>", "<cmd>ToggleTermSendCurrentLine<cr>j", { desc = "Send line to terminal" })
+vim.keymap.set("n","<C-r><C-j>", "ggVG:'<,'>ToggleTermSendVisualLines<cr>", { desc = "Send file to terminal" })
+vim.keymap.set("i","<C-r><C-j>", "<Esc>ggVG:'<,'>ToggleTermSendVisualLines<cr><Esc>i", { desc = "Send file to terminal" })
+vim.keymap.set("v","<C-r><C-k>", ":ToggleTermSendVisualLines<cr><Esc>", { desc = "Send selection to terminal" })
+
+-- File browser
+vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory with Oil" })
+
+-- LSP quick diagnostics
+vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, { noremap=true, silent=true, desc = "Show diagnostics" })
+
+-- Python docstring helper
+vim.keymap.set("n", "<leader>dc", ":PythonDocstring<CR>", {
+ silent = true,
+ desc = "Insert Python docstring template"
+})
+
+----------------
+-- INSERT MODE
+----------------
+
+vim.keymap.set("i", "jk", "<Esc>", { desc = "Exit insert mode" })
+vim.keymap.set("i", "<leader>e", "<Space>e", { desc = "Insert e after leader" })
+vim.keymap.set("i", "<C-c>", "<cmd>bd<cr>", { desc = "Close buffer" })
+
+----------------
+-- VISUAL MODE
+----------------
+
+-- Move selected lines
+vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", { desc = "Move selection down" })
+vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", { desc = "Move selection up" })
+
+-- Telescope keymaps (grouped for related functionality)
+vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files theme=dropdown<cr>", { desc = "Find files" })
+vim.keymap.set("n", "<leader>fm", "<cmd>Telescope find_files cwd=D:/Optics/CODEV/Macros theme=dropdown<cr>", { desc = "Find macro files" })
+vim.keymap.set("n", "<leader>fc", "<cmd>Telescope find_files cwd=C:/CODEV202403/macro theme=dropdown<cr>", { desc = "Find CODEV macro files" })
+vim.keymap.set("n", "<leader>fl", "<cmd>Telescope find_files cwd=C:/CODEV202403/lens theme=dropdown<cr>", { desc = "Find lens files" })
+vim.keymap.set("n", "<leader>gg", "<cmd>Telescope live_grep theme=dropdown<cr>", { desc = "Live grep" })
+vim.keymap.set("n", "<leader>gm", "<cmd>Telescope live_grep cwd=D:/Optics/CODEV/Macros theme=dropdown<cr>", { desc = "Grep in macro files" })
+vim.keymap.set("n", "<leader>gc", "<cmd>Telescope live_grep cwd=C:/CODEV202403/macro theme=dropdown<cr>", { desc = "Grep in CODEV macro files" })
+vim.keymap.set("n", "<leader>gl", "<cmd>Telescope live_grep cwd=C:/CODEV202403/lens theme=dropdown<cr>", { desc = "Grep in lens files" })
+vim.keymap.set("n", "<leader>b", "<cmd>Telescope buffers theme=dropdown<cr>", { desc = "List buffers" })
+
+-- Harpoon keymaps
+vim.keymap.set("n", "<leader>a", function() require("harpoon"):list():add() end, { desc = "Add file to harpoon" })
+vim.keymap.set("n", "<C-e>", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, { desc = "Toggle harpoon menu" })
+vim.keymap.set("n", "<leader>h", function() require("harpoon"):list():select(1) end, { desc = "Harpoon file 1" })
+vim.keymap.set("n", "<leader>j", function() require("harpoon"):list():select(2) end, { desc = "Harpoon file 2" })
+vim.keymap.set("n", "<leader>k", function() require("harpoon"):list():select(3) end, { desc = "Harpoon file 3" })
+vim.keymap.set("n", "<leader>l", function() require("harpoon"):list():select(4) end, { desc = "Harpoon file 4" })
+vim.keymap.set("n", "<leader>N", function() require("harpoon"):list():prev() end, { desc = "Previous harpoon file" })
+vim.keymap.set("n", "<leader>P", function() require("harpoon"):list():next() end, { desc = "Next harpoon file" })
+
+-- Other tool keymaps
+vim.keymap.set("n", "<leader>G", vim.cmd.Git, { desc = "Open Git status" })
+vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle, { desc = "Toggle undo tree" })
+vim.keymap.set("n", "[c", function() require("treesitter-context").go_to_context() end, { desc = "Go to context", silent = true })
diff --git a/nvim/lua/core/options.lua b/nvim/lua/core/options.lua
new file mode 100644
index 0000000..b05ad08
--- /dev/null
+++ b/nvim/lua/core/options.lua
@@ -0,0 +1,37 @@
+-- Core Neovim settings
+-- General options and settings
+
+-- UI settings
+vim.opt.termguicolors = true -- True color support
+vim.opt.number = true -- Show line numbers
+vim.opt.relativenumber = true -- Show relative line numbers
+vim.opt.scrolloff = 999 -- Keep cursor centered
+vim.opt.splitbelow = true -- Horizontal splits below
+vim.opt.splitright = true -- Vertical splits to the right
+vim.opt.wrap = true -- Line wrapping
+vim.opt.virtualedit = "block" -- Allow cursor beyond text in block mode
+
+-- Search settings
+vim.opt.hlsearch = false -- Don't highlight search results
+vim.opt.incsearch = true -- Incremental search
+vim.opt.ignorecase = true -- Case insensitive search
+
+-- Tab settings
+vim.opt.tabstop = 4 -- Tab width
+vim.opt.softtabstop = 4 -- Soft tab width
+vim.opt.shiftwidth = 4 -- Indentation width
+vim.opt.expandtab = true -- Use spaces instead of tabs
+
+-- File management
+vim.opt.swapfile = false -- No swap files
+vim.opt.backup = false -- No backup files
+vim.opt.undodir = os.getenv("USERPROFILE").."/.vim/undodir" -- Undo directory
+vim.opt.undofile = true -- Persistent undo history
+
+-- Performance and usability
+vim.opt.updatetime = 50 -- Faster update time
+vim.opt.inccommand = "split" -- Live substitution preview
+
+-- Status line
+vim.cmd([[set laststatus=2]]) -- Always show statusline
+vim.cmd([[set shortmess=I]]) -- Don't show intro message
diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua
index 79b4c5f..a04187c 100644
--- a/nvim/lua/plugins.lua
+++ b/nvim/lua/plugins.lua
@@ -1,8 +1,10 @@
--- lazy plugin manager
+-- Plugin declarations
+-- All plugins used in Neovim are defined here
+
+
+-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
- -- bootstrap lazy.nvim
- -- stylua: ignore
vim.fn.system({
"git",
"clone",
@@ -12,245 +14,196 @@ if not vim.loop.fs_stat(lazypath) then
lazypath,
})
end
-vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
-
-require("lazy").setup({
+vim.opt.rtp:prepend(lazypath)
+
+-- Initialize lazy.nvim with plugins
+require("lazy").setup({
+ ------------------------------------------------------------
+ -- UI
+ ------------------------------------------------------------
+
-- Colorscheme
{
"folke/tokyonight.nvim",
- init = function()
+ lazy = false,
+ priority = 1000,
+ config = function()
vim.cmd.colorscheme("tokyonight-night")
- end
+ end,
},
+ -- File browser
{
- 'tpope/vim-fugitive',
+ 'stevearc/oil.nvim',
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ cmd = "Oil",
},
+ -- Terminal
{
- {
- 'VonHeikemen/lsp-zero.nvim',
- branch = 'v3.x',
- lazy = true,
- config = false,
- init = function()
- -- Disable automatic setup, we are doing it manually
- vim.g.lsp_zero_extend_cmp = 0
- vim.g.lsp_zero_extend_lspconfig = 0
- end,
- },
-
- {
- 'williamboman/mason.nvim',
- lazy = false,
- config = true,
- },
-
- {
- 'neovim/nvim-lspconfig',
- dependencies = {
- {'hrsh7th/cmp-nvim-lsp'},
- }
- },
-
- -- Autocompletion
- {
- 'hrsh7th/nvim-cmp',
- event = 'InsertEnter',
- dependencies = {
- {'L3MON4D3/LuaSnip',
- 'hrsh7th/cmp-path',
- },
- },
- config = function()
- -- Here is where you configure the autocompletion settings.
- local lsp_zero = require('lsp-zero')
- lsp_zero.extend_cmp()
-
- -- And you can configure cmp even more, if you want to.
- local cmp = require('cmp')
- local cmp_action = lsp_zero.cmp_action()
-
- cmp.setup({
- formatting = lsp_zero.cmp_format(),
- sources = {
- { name = 'nvim_lsp' }, -- Enable LSP-based completion
- { name = 'path' }, -- Enables path completion
- { name = 'buffer' }, -- Buffer source for plain text completion
- },
- mapping = cmp.mapping.preset.insert({
- ['<C-Space>'] = cmp.mapping.complete(),
- ['<C-u>'] = cmp.mapping.scroll_docs(-4),
- ['<C-d>'] = cmp.mapping.scroll_docs(4),
- ['<C-f>'] = cmp_action.luasnip_jump_forward(),
- ['<C-b>'] = cmp_action.luasnip_jump_backward(),
- }),
-
- -- },
- })
- end
- },
- -- LSP
- {
- 'neovim/nvim-lspconfig',
- cmd = {'LspInfo', 'LspInstall', 'LspStart'},
- event = {'BufReadPre', 'BufNewFile'},
- dependencies = {
- {'hrsh7th/cmp-nvim-lsp'},
- {'williamboman/mason-lspconfig.nvim'},
- },
- config = function()
- -- This is where all the LSP shenanigans will live
- local lsp_zero = require('lsp-zero')
- lsp_zero.extend_lspconfig()
-
- lsp_zero.on_attach(function(client, bufnr)
- -- see :help lsp-zero-keybindings
- -- to learn the available actions
- lsp_zero.default_keymaps({buffer = bufnr})
- end)
-
-
- require('mason-lspconfig').setup({
- ensure_installed = {},
- handlers = {
- lsp_zero.default_setup,
- lua_ls = function()
- -- (Optional) Configure lua language server for neovim
- local lua_opts = lsp_zero.nvim_lua_ls()
- require('lspconfig').lua_ls.setup(lua_opts)
- end,
- -- ADD THIS SECTION for clangd:
- clangd = function()
- require('lspconfig').clangd.setup({
- cmd = { "clangd", "--header-insertion=never" },
- -- No root_dir specification that requires compile_commands.json
- })
- end,
- }
- })
- end
- }
-
+ 'akinsho/toggleterm.nvim',
+ version = "*",
+ cmd = {"ToggleTerm", "ToggleTermSendCurrentLine", "ToggleTermSendVisualLines"},
},
+ ------------------------------------------------------------
+ -- EDITOR ENHANCEMENTS
+ ------------------------------------------------------------
+
+ -- Telescope (fuzzy finder)
{
'nvim-telescope/telescope.nvim',
- -- or , branch = '0.1.x',
- dependencies = { 'nvim-lua/plenary.nvim' }
+ dependencies = { 'nvim-lua/plenary.nvim' },
+ cmd = "Telescope",
},
+ -- Harpoon (quick file navigation)
{
- 'nvim-treesitter/nvim-treesitter',
- build = ':TSUpdate',
- config = function ()
- local configs = require("nvim-treesitter.configs")
-
- configs.setup({
- ensure_installed = { "c", "lua", "vim", "vimdoc", "cpp", "python"}, --add "neorg here"
- sync_install = false,
- highlight = {
- enable = true
- },
- indent = {
- enable = true
- },
- })
- end
+ "ThePrimeagen/harpoon",
+ branch = "harpoon2",
+ dependencies = { "nvim-lua/plenary.nvim" },
},
+ -- Git integration
{
- 'mbbill/undotree'
+ 'tpope/vim-fugitive',
+ cmd = {"Git", "Gstatus", "Gblame", "Gdiffsplit", "Gread", "Gwrite", "Ggrep", "GMove", "GDelete"},
},
- {'akinsho/toggleterm.nvim',
- version = "*",
- opts = {
- shell = "pwsh.exe -NoLogo",
- winbar = {
- enabled =false
- },
- direction = 'float',
- border = 'none', -- No border around the terminal
- -- width = function()
- -- return vim.o.columns -- Full width of the screen
- -- end,
- -- height = function()
- -- return vim.o.lines -- Full height minus command line
- -- end,
- -- width = 800,
- -- height = 700,
- }
+ -- Undo history visualization
+ {
+ 'mbbill/undotree',
+ cmd = "UndotreeToggle",
},
+
+ ------------------------------------------------------------
+ -- CODE EDITING
+ ------------------------------------------------------------
+
+ -- Syntax highlighting
{
- 'windwp/nvim-autopairs',
- event = "InsertEnter",
- config = true
- -- use opts = {} for passing setup options
- -- this is equivalent to setup({}) function
-},
+ 'nvim-treesitter/nvim-treesitter',
+ build = ':TSUpdate',
+ event = { "BufReadPost", "BufNewFile" },
+ cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
+ dependencies = {
+ 'nvim-treesitter/nvim-treesitter-context',
+ },
+ },
+ -- Comments
{
'numToStr/Comment.nvim',
- lazy = false,
- opts= {
- -- filetype = {
- -- seq ={
- -- commentstring ="! %s"
- -- }
- -- },
- ---Add a space b/w comment and the line
- padding = true,
- ---Whether the cursor should stay at its position
- sticky = true,
- ---Lines to be ignored while (un)comment
- ignore = nil,
- ---LHS of toggle mappings in NORMAL mode
- toggler = {
- ---Line-comment toggle keymap
- line = '<leader>/',
- ---Block-comment toggle keymap
- block = 'gbc',
- },
- ---LHS of operator-pending mappings in NORMAL and VISUAL mode
- opleader = {
- ---Line-comment keymap
- line = '<leader>/',
- ---Block-comment keymap
- block = 'gb',
- }}
+ event = { "BufReadPost", "BufNewFile" },
},
-
+ -- Auto brackets
{
- 'nvim-treesitter/nvim-treesitter-context'
+ 'windwp/nvim-autopairs',
+ event = "InsertEnter",
+ config = true,
},
+
+ -- LaTeX support
{
"lervag/vimtex",
- lazy = false, -- we don't want to lazy load VimTeX
- -- tag = "v2.15", -- uncomment to pin to a specific release
+ ft = {"tex", "latex"},
init = function()
- -- VimTeX configuration goes here, e.g.
vim.g.vimtex_view_method = "mupdf"
end
},
- -- {
- -- "nvim-telescope/telescope-file-browser.nvim",
- -- dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
- --
- -- },
-
+ ------------------------------------------------------------
+ -- LSP & COMPLETION
+ ------------------------------------------------------------
+
+ -- LSP Base
{
- "ThePrimeagen/harpoon",
- branch = "harpoon2",
- dependencies = { "nvim-lua/plenary.nvim" }
+ "mason-org/mason.nvim",
+ "mason-org/mason-lspconfig.nvim",
+ "neovim/nvim-lspconfig",
+},
+ {
+ "folke/lazydev.nvim",
+ ft = "lua", -- only load on lua files
+ 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" } },
+ },
},
+ },
+
+ -- Autocompletion
{
- 'stevearc/oil.nvim',
- opts = {},
- -- Optional dependencies
- -- dependencies = { "echasnovski/mini.icons" },
- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
- }
+ 'saghen/blink.cmp',
+ -- optional: provides snippets for the snippet source
+ dependencies = { 'rafamadriz/friendly-snippets' },
+
+ version = '1.*',
+ opts = {
+ -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
+ -- 'super-tab' for mappings similar to vscode (tab to accept)
+ -- 'enter' for enter to accept
+ -- 'none' for no mappings
+ --
+ -- All presets have the following mappings:
+ -- C-space: Open menu or open docs if already open
+ -- C-n/C-p or Up/Down: Select next/previous item
+ -- C-e: Hide menu
+ -- C-k: Toggle signature help (if signature.enabled = true)
+ --
+ -- See :h blink-cmp-config-keymap for defining your own keymap
+ keymap = { preset = 'default' },
+
+ appearance = {
+ -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
+ -- Adjusts spacing to ensure icons are aligned
+ nerd_font_variant = 'mono'
+ },
+
+ -- (Default) Only show the documentation popup when manually triggered
+ completion = { documentation = { auto_show = true} },
+
+ -- Default list of enabled providers defined so that you can extend it
+ -- elsewhere in your config, without redefining it, due to `opts_extend`
+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,
+ },
+ },
+ },
+ -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
+ -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
+ -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
+ --
+ -- See the fuzzy documentation for more information
+ fuzzy = { implementation = "prefer_rust_with_warning" }
+ },
+ opts_extend = { "sources.default" }
+},
+
+}, {
+ -- Lazy.nvim options
+ install = { colorscheme = { "tokyonight-night" } },
+ checker = { enabled = true, frequency = 86400 }, -- Check for updates once per day
+ change_detection = { notify = false },
+ performance = {
+ rtp = {
+ disabled_plugins = {
+ "gzip",
+ "tarPlugin",
+ "tohtml",
+ "tutor",
+ "zipPlugin",
+ },
+ },
+ },
})
diff --git a/nvim/LICENSE b/nvim_old/LICENSE
index 3877ae0..3877ae0 100644
--- a/nvim/LICENSE
+++ b/nvim_old/LICENSE
diff --git a/nvim_old/init.lua b/nvim_old/init.lua
new file mode 100644
index 0000000..9109ee0
--- /dev/null
+++ b/nvim_old/init.lua
@@ -0,0 +1,370 @@
+require("options")
+require("codev")
+require("plugins")
+require("keybindings")
+require('lspconfig').marksman.setup{}
+
+local harpoon = require("harpoon")
+local actions = require "telescope.actions"
+
+local function open_in_external_program(prompt_bufnr)
+ local entry = require('telescope.actions.state').get_selected_entry()
+ local file_path = entry.path or entry.filename
+ if file_path then
+ os.execute(string.format('start "" "%s"', file_path))
+ else
+ print("No file selected")
+ end
+ actions.close(prompt_bufnr)
+end
+
+
+require('telescope').setup({
+ defaults = {
+ layout_config = {
+ vertical = { width = 0.5 }
+ -- other layout configuration here
+ },
+ mappings = {
+ n = {
+ ["q"] = actions.close,
+ ["o"] = open_in_external_program,
+ },
+ i = {
+ ["<C-c>"] = actions.close,
+ ["<C-n>"] = actions.cycle_history_next,
+ ["<C-p>"] = actions.cycle_history_prev,
+ ["<C-j>"] = actions.move_selection_next,
+ ["<C-k>"] = actions.move_selection_previous,
+ ["<C-o>"] = open_in_external_program,
+ }
+ },
+ -- other defaults configuration here
+ },
+ pickers = {
+ live_grep = {
+ file_ignore_patterns = { 'node_modules', '.git', '.venv' },
+ additional_args = function(_)
+ return { "--hidden" }
+ end
+ },
+ find_files = {
+ file_ignore_patterns = { 'node_modules', '.git', '.venv' },
+ hidden = true
+ }
+ }
+})
+require("Comment").setup()
+
+-- REQUIRED
+harpoon:setup()
+-- REQUIRED
+
+vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
+vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
+
+vim.keymap.set("n", "<leader>h", function() harpoon:list():select(1) end)
+vim.keymap.set("n", "<leader>j", function() harpoon:list():select(2) end)
+vim.keymap.set("n", "<leader>k", function() harpoon:list():select(3) end)
+vim.keymap.set("n", "<leader>l", function() harpoon:list():select(4) end)
+
+-- Toggle previous & next buffers stored within Harpoon list
+vim.keymap.set("n", "<leader>N", function() harpoon:list():prev() end)
+vim.keymap.set("n", "<leader>P", function() harpoon:list():next() end)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+require("oil").setup({
+ -- Oil will take over directory buffers (e.g. `vim .` or `:e src/`)
+ -- Set to false if you want some other plugin (e.g. netrw) to open when you edit directories.
+ default_file_explorer = true,
+ -- Id is automatically added at the beginning, and name at the end
+ -- See :help oil-columns
+ columns = {
+ "icon",
+ -- "permissions",
+ -- "size",
+ -- "mtime",
+ },
+ -- Buffer-local options to use for oil buffers
+ buf_options = {
+ buflisted = false,
+ bufhidden = "hide",
+ },
+ -- Window-local options to use for oil buffers
+ win_options = {
+ wrap = false,
+ signcolumn = "no",
+ cursorcolumn = false,
+ foldcolumn = "0",
+ spell = false,
+ list = false,
+ conceallevel = 3,
+ concealcursor = "nvic",
+ },
+ -- Send deleted files to the trash instead of permanently deleting them (:help oil-trash)
+ delete_to_trash = true,
+ -- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)
+ skip_confirm_for_simple_edits = false,
+ -- Selecting a new/moved/renamed file or directory will prompt you to save changes first
+ -- (:help prompt_save_on_select_new_entry)
+ prompt_save_on_select_new_entry = true,
+ -- Oil will automatically delete hidden buffers after this delay
+ -- You can set the delay to false to disable cleanup entirely
+ -- Note that the cleanup process only starts when none of the oil buffers are currently displayed
+ cleanup_delay_ms = 2000,
+ lsp_file_methods = {
+ -- Time to wait for LSP file operations to complete before skipping
+ timeout_ms = 1000,
+ -- Set to true to autosave buffers that are updated with LSP willRenameFiles
+ -- Set to "unmodified" to only save unmodified buffers
+ autosave_changes = false,
+ },
+ -- Constrain the cursor to the editable parts of the oil buffer
+ -- Set to `false` to disable, or "name" to keep it on the file names
+ constrain_cursor = "editable",
+ -- Set to true to watch the filesystem for changes and reload oil
+ watch_for_changes = false,
+ -- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
+ -- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
+ -- Additionally, if it is a string that matches "actions.<name>",
+ -- it will use the mapping at require("oil.actions").<name>
+ -- Set to `false` to remove a keymap
+ -- See :help oil-actions for a list of all available actions
+ keymaps = {
+ ["g?"] = "actions.show_help",
+ ["<CR>"] = "actions.select",
+ ["<C-S>"] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" },
+ ["<C-H>"] = { "actions.select", opts = { horizontal = true }, desc = "Open the entry in a horizontal split" },
+ -- ["<C-t>"] = { "actions.select", opts = { tab = true }, desc = "Open the entry in new tab" },
+ ["<C-p>"] = "actions.preview",
+ ["<C-c>"] = "actions.close",
+ ["<C-l>"] = "actions.refresh",
+ ["-"] = "actions.parent",
+ ["_"] = "actions.open_cwd",
+ ["`"] = "actions.cd",
+ ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" },
+ ["gs"] = "actions.change_sort",
+ ["<C-o>"] = "actions.open_external",
+ ["g."] = "actions.toggle_hidden",
+ ["g\\"] = "actions.toggle_trash",
+ ['yp'] = {
+ desc = 'Copy filepath to system clipboard',
+ callback = function ()
+ require('oil.actions').copy_entry_path.callback()
+ vim.fn.setreg("+", vim.fn.getreg(vim.v.register))
+ end,
+ },
+ },
+ -- Set to false to disable all of the above keymaps
+ use_default_keymaps =false,
+ view_options = {
+ -- Show files and directories that start with "."
+ show_hidden = false,
+ -- This function defines what is considered a "hidden" file
+ is_hidden_file = function(name, bufnr)
+ return vim.startswith(name, ".")
+ end,
+ -- This function defines what will never be shown, even when `show_hidden` is set
+ is_always_hidden = function(name, bufnr)
+ return false
+ end,
+ -- Sort file names in a more intuitive order for humans. Is less performant,
+ -- so you may want to set to false if you work with large directories.
+ natural_order = true,
+ -- Sort file and directory names case insensitive
+ case_insensitive = false,
+ sort = {
+ -- sort order can be "asc" or "desc"
+ -- see :help oil-columns to see which columns are sortable
+ { "type", "asc" },
+ { "name", "asc" },
+ },
+ },
+ -- Extra arguments to pass to SCP when moving/copying files over SSH
+ extra_scp_args = {},
+ -- EXPERIMENTAL support for performing file operations with git
+ git = {
+ -- Return true to automatically git add/mv/rm files
+ add = function(path)
+ return false
+ end,
+ mv = function(src_path, dest_path)
+ return false
+ end,
+ rm = function(path)
+ return false
+ end,
+ },
+ -- Configuration for the floating window in oil.open_float
+ float = {
+ -- Padding around the floating window
+ padding = 2,
+ max_width = 0,
+ max_height = 0,
+ border = "rounded",
+ win_options = {
+ winblend = 0,
+ },
+ -- preview_split: Split direction: "auto", "left", "right", "above", "below".
+ preview_split = "auto",
+ -- This is the config that will be passed to nvim_open_win.
+ -- Change values here to customize the layout
+ override = function(conf)
+ return conf
+ end,
+ },
+ -- Configuration for the actions floating preview window
+ preview = {
+ -- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
+ -- min_width and max_width can be a single value or a list of mixed integer/float types.
+ -- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total"
+ max_width = 0.9,
+ -- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total"
+ min_width = { 40, 0.4 },
+ -- optionally define an integer/float for the exact width of the preview window
+ width = nil,
+ -- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
+ -- min_height and max_height can be a single value or a list of mixed integer/float types.
+ -- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total"
+ max_height = 0.9,
+ -- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total"
+ min_height = { 5, 0.1 },
+ -- optionally define an integer/float for the exact height of the preview window
+ height = nil,
+ border = "rounded",
+ win_options = {
+ winblend = 0,
+ },
+ -- Whether the preview window is automatically updated when the cursor is moved
+ update_on_cursor_moved = true,
+ },
+ -- Configuration for the floating progress window
+ progress = {
+ max_width = 0.9,
+ min_width = { 40, 0.4 },
+ width = nil,
+ max_height = { 10, 0.9 },
+ min_height = { 5, 0.1 },
+ height = nil,
+ border = "rounded",
+ minimized_border = "none",
+ win_options = {
+ winblend = 0,
+ },
+ },
+ -- Configuration for the floating SSH window
+ ssh = {
+ border = "rounded",
+ },
+ -- Configuration for the floating keymaps help window
+ keymaps_help = {
+ border = "rounded",
+ },
+})
+
+
+-- Load toggleterm if not loaded
+-- require('toggleterm').setup{}
+
+-- Close the terminal with Ctrl+q and Ctrl+d in terminal mode
+function _G.set_terminal_keymaps()
+ local opts = { noremap = true, silent = true }
+ vim.api.nvim_buf_set_keymap(0, 't', '<C-d>', [[<C-\><C-n><cmd>ToggleTerm<CR>]], opts)
+ vim.api.nvim_buf_set_keymap(0, 't', '<C-q>', [[<C-\><C-n><cmd>ToggleTerm<CR>]], opts)
+ -- vim.api.nvim_buf_set_keymap(0, 'n', '<C-d>', [[<C-\><C-n><cmd>ToggleTerm<CR>]], opts)
+ -- vim.api.nvim_buf_set_keymap(0, 't', 'jk','<Nop>',opts)
+ -- vim.api.nvim_buf_del_keymap(0, 'i', "jk")
+ -- vim.api.nvim_buf_set_keymap(0, 'i', 'k', '<Nop>', opts)
+end
+require("toggleterm").setup({
+ -- open_mapping = [[<C-\>]], -- Example keybinding, adjust as needed
+ direction = "float", -- or "horizontal" / "vertical" / "tab"
+ -- set_terminal_keymaps(),
+ -- on_open = function(term)
+ -- vim.cmd("startinsert") -- Always enter insert mode when terminal opens
+ -- end,
+ -- on_focus = function(term)
+ -- vim.cmd("startinsert") -- Enter insert mode when terminal gains focus
+ -- end,
+ -- on_close = function(term)
+ -- vim.cmd("stopinsert") -- Stop insert mode when terminal closes
+ -- end,
+ start_in_insert=true,
+ -- persist_mode = true,
+})
+
+-- Set the keymaps when a terminal is opened
+-- vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
+-- Automatically enter insert mode when ToggleTerm is opened
+-- vim.api.nvim_create_autocmd("TermOpen", {
+-- pattern = "term://*",
+-- callback = function()
+-- vim.cmd(":startinsert")
+-- -- set_terminal_keymaps()
+-- end,
+-- })
+
+vim.api.nvim_create_autocmd({ "TermOpen", "BufEnter" }, {
+ -- pattern = { "*" },
+ callback = function()
+ if vim.opt.buftype:get() == "terminal" then
+ vim.cmd("startinsert")
+ -- vim.cmd("shfdstartinsert")
+ set_terminal_keymaps()
+ end
+ end
+})
+
+
+-- Add this after your lsp-zero configuration
+vim.diagnostic.config({
+ virtual_text = {
+ prefix = '●', -- Could be '■', '▎', 'x'
+ source = "if_many"
+ },
+ float = {
+ -- source = "always",
+ border = "rounded",
+ header = "",
+ prefix = "",
+ },
+ signs = true,
+ underline = true,
+ update_in_insert = false,
+ severity_sort = true,
+})
+
+-- Add keyboard shortcuts to see full error messages
+vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, { noremap=true, silent=true })
diff --git a/nvim_old/lazy-lock.json b/nvim_old/lazy-lock.json
new file mode 100644
index 0000000..8e323af
--- /dev/null
+++ b/nvim_old/lazy-lock.json
@@ -0,0 +1,25 @@
+{
+ "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
+ "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
+ "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
+ "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
+ "harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
+ "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
+ "lsp-zero.nvim": { "branch": "v3.x", "commit": "77550f2f6cbf0959ef1583d845661af075f3442b" },
+ "mason-lspconfig.nvim": { "branch": "main", "commit": "d39a75bbce4b8aad5d627191ea915179c77c100f" },
+ "mason.nvim": { "branch": "main", "commit": "7c7318e8bae7e3536ef6b9e86b9e38e74f2e125e" },
+ "nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
+ "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
+ "nvim-lspconfig": { "branch": "master", "commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45" },
+ "nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" },
+ "nvim-treesitter-context": { "branch": "master", "commit": "5c48b8ba1b0b7b25feb6e34e7eb293ea893aedc4" },
+ "nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" },
+ "oil.nvim": { "branch": "master", "commit": "685cdb4ffa74473d75a1b97451f8654ceeab0f4a" },
+ "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
+ "telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
+ "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
+ "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
+ "undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
+ "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
+ "vimtex": { "branch": "master", "commit": "7d16d56c765476f3101b2daa2a09f8ab82df9c5d" }
+}
diff --git a/nvim/lua/codev.lua b/nvim_old/lua/codev.lua
index ed6c330..ed6c330 100644
--- a/nvim/lua/codev.lua
+++ b/nvim_old/lua/codev.lua
diff --git a/nvim/lua/keybindings.lua b/nvim_old/lua/keybindings.lua
index 9a9d0f0..9a9d0f0 100644
--- a/nvim/lua/keybindings.lua
+++ b/nvim_old/lua/keybindings.lua
diff --git a/nvim/lua/options.lua b/nvim_old/lua/options.lua
index 944ea6d..944ea6d 100644
--- a/nvim/lua/options.lua
+++ b/nvim_old/lua/options.lua
diff --git a/nvim_old/lua/plugins.lua b/nvim_old/lua/plugins.lua
new file mode 100644
index 0000000..79b4c5f
--- /dev/null
+++ b/nvim_old/lua/plugins.lua
@@ -0,0 +1,256 @@
+-- lazy plugin manager
+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+if not vim.loop.fs_stat(lazypath) then
+ -- bootstrap lazy.nvim
+ -- stylua: ignore
+ vim.fn.system({
+ "git",
+ "clone",
+ "--filter=blob:none",
+ "https://github.com/folke/lazy.nvim.git",
+ "--branch=stable",
+ lazypath,
+ })
+end
+vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
+
+require("lazy").setup({
+ -- Colorscheme
+ {
+ "folke/tokyonight.nvim",
+ init = function()
+ vim.cmd.colorscheme("tokyonight-night")
+ end
+ },
+
+ {
+ 'tpope/vim-fugitive',
+ },
+
+ {
+ {
+ 'VonHeikemen/lsp-zero.nvim',
+ branch = 'v3.x',
+ lazy = true,
+ config = false,
+ init = function()
+ -- Disable automatic setup, we are doing it manually
+ vim.g.lsp_zero_extend_cmp = 0
+ vim.g.lsp_zero_extend_lspconfig = 0
+ end,
+ },
+
+ {
+ 'williamboman/mason.nvim',
+ lazy = false,
+ config = true,
+ },
+
+ {
+ 'neovim/nvim-lspconfig',
+ dependencies = {
+ {'hrsh7th/cmp-nvim-lsp'},
+ }
+ },
+
+ -- Autocompletion
+ {
+ 'hrsh7th/nvim-cmp',
+ event = 'InsertEnter',
+ dependencies = {
+ {'L3MON4D3/LuaSnip',
+ 'hrsh7th/cmp-path',
+ },
+ },
+ config = function()
+ -- Here is where you configure the autocompletion settings.
+ local lsp_zero = require('lsp-zero')
+ lsp_zero.extend_cmp()
+
+ -- And you can configure cmp even more, if you want to.
+ local cmp = require('cmp')
+ local cmp_action = lsp_zero.cmp_action()
+
+ cmp.setup({
+ formatting = lsp_zero.cmp_format(),
+ sources = {
+ { name = 'nvim_lsp' }, -- Enable LSP-based completion
+ { name = 'path' }, -- Enables path completion
+ { name = 'buffer' }, -- Buffer source for plain text completion
+ },
+ mapping = cmp.mapping.preset.insert({
+ ['<C-Space>'] = cmp.mapping.complete(),
+ ['<C-u>'] = cmp.mapping.scroll_docs(-4),
+ ['<C-d>'] = cmp.mapping.scroll_docs(4),
+ ['<C-f>'] = cmp_action.luasnip_jump_forward(),
+ ['<C-b>'] = cmp_action.luasnip_jump_backward(),
+ }),
+
+ -- },
+ })
+ end
+ },
+ -- LSP
+ {
+ 'neovim/nvim-lspconfig',
+ cmd = {'LspInfo', 'LspInstall', 'LspStart'},
+ event = {'BufReadPre', 'BufNewFile'},
+ dependencies = {
+ {'hrsh7th/cmp-nvim-lsp'},
+ {'williamboman/mason-lspconfig.nvim'},
+ },
+ config = function()
+ -- This is where all the LSP shenanigans will live
+ local lsp_zero = require('lsp-zero')
+ lsp_zero.extend_lspconfig()
+
+ lsp_zero.on_attach(function(client, bufnr)
+ -- see :help lsp-zero-keybindings
+ -- to learn the available actions
+ lsp_zero.default_keymaps({buffer = bufnr})
+ end)
+
+
+ require('mason-lspconfig').setup({
+ ensure_installed = {},
+ handlers = {
+ lsp_zero.default_setup,
+ lua_ls = function()
+ -- (Optional) Configure lua language server for neovim
+ local lua_opts = lsp_zero.nvim_lua_ls()
+ require('lspconfig').lua_ls.setup(lua_opts)
+ end,
+ -- ADD THIS SECTION for clangd:
+ clangd = function()
+ require('lspconfig').clangd.setup({
+ cmd = { "clangd", "--header-insertion=never" },
+ -- No root_dir specification that requires compile_commands.json
+ })
+ end,
+ }
+ })
+ end
+ }
+
+ },
+
+ {
+ 'nvim-telescope/telescope.nvim',
+ -- or , branch = '0.1.x',
+ dependencies = { 'nvim-lua/plenary.nvim' }
+ },
+
+ {
+ 'nvim-treesitter/nvim-treesitter',
+ build = ':TSUpdate',
+ config = function ()
+ local configs = require("nvim-treesitter.configs")
+
+ configs.setup({
+ ensure_installed = { "c", "lua", "vim", "vimdoc", "cpp", "python"}, --add "neorg here"
+ sync_install = false,
+ highlight = {
+ enable = true
+ },
+ indent = {
+ enable = true
+ },
+ })
+ end
+ },
+
+ {
+ 'mbbill/undotree'
+ },
+
+ {'akinsho/toggleterm.nvim',
+ version = "*",
+ opts = {
+ shell = "pwsh.exe -NoLogo",
+ winbar = {
+ enabled =false
+ },
+ direction = 'float',
+ border = 'none', -- No border around the terminal
+ -- width = function()
+ -- return vim.o.columns -- Full width of the screen
+ -- end,
+ -- height = function()
+ -- return vim.o.lines -- Full height minus command line
+ -- end,
+ -- width = 800,
+ -- height = 700,
+ }
+ },
+ {
+ 'windwp/nvim-autopairs',
+ event = "InsertEnter",
+ config = true
+ -- use opts = {} for passing setup options
+ -- this is equivalent to setup({}) function
+},
+
+ {
+ 'numToStr/Comment.nvim',
+ lazy = false,
+ opts= {
+ -- filetype = {
+ -- seq ={
+ -- commentstring ="! %s"
+ -- }
+ -- },
+ ---Add a space b/w comment and the line
+ padding = true,
+ ---Whether the cursor should stay at its position
+ sticky = true,
+ ---Lines to be ignored while (un)comment
+ ignore = nil,
+ ---LHS of toggle mappings in NORMAL mode
+ toggler = {
+ ---Line-comment toggle keymap
+ line = '<leader>/',
+ ---Block-comment toggle keymap
+ block = 'gbc',
+ },
+ ---LHS of operator-pending mappings in NORMAL and VISUAL mode
+ opleader = {
+ ---Line-comment keymap
+ line = '<leader>/',
+ ---Block-comment keymap
+ block = 'gb',
+ }}
+ },
+
+
+ {
+ 'nvim-treesitter/nvim-treesitter-context'
+ },
+ {
+ "lervag/vimtex",
+ lazy = false, -- we don't want to lazy load VimTeX
+ -- tag = "v2.15", -- uncomment to pin to a specific release
+ init = function()
+ -- VimTeX configuration goes here, e.g.
+ vim.g.vimtex_view_method = "mupdf"
+ end
+ },
+
+ -- {
+ -- "nvim-telescope/telescope-file-browser.nvim",
+ -- dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
+ --
+ -- },
+
+ {
+ "ThePrimeagen/harpoon",
+ branch = "harpoon2",
+ dependencies = { "nvim-lua/plenary.nvim" }
+ },
+ {
+ 'stevearc/oil.nvim',
+ opts = {},
+ -- Optional dependencies
+ -- dependencies = { "echasnovski/mini.icons" },
+ dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
+ }
+})
diff --git a/nvim_old/structure.txt b/nvim_old/structure.txt
new file mode 100644
index 0000000..a51b876
--- /dev/null
+++ b/nvim_old/structure.txt
@@ -0,0 +1,16 @@
+nvim
+| init.lua
+| lazy-lock.json
+| LICENSE
+| structure.txt
+|
++---lua
+| codev.lua
+| keybindings.lua
+| options.lua
+| plugins.lua
+|
+\---syntax
+ codelis.vim
+ codev.vim
+
diff --git a/nvim_old/syntax/codelis.vim b/nvim_old/syntax/codelis.vim
new file mode 100644
index 0000000..2bd4125
--- /dev/null
+++ b/nvim_old/syntax/codelis.vim
@@ -0,0 +1,47 @@
+:syntax case ignore
+:syntax region lisString start =/"/ end= /"/
+:highlight lisString guifg=#9ece6a
+
+:syntax region lisString start =/'/ end= /'/
+:highlight lisString guifg=#9ece6a
+
+:syntax match lisComment /!.*/
+:highlight lisComment guifg=#535c7e
+
+
+:syntax match lisSurfaceZoom /\<\([szfw][0-9oia]\)\>\|\<[sz]\>/
+:highlight lisSurfaceZoom guifg=#ff9e64 gui=bold
+" :highlight lisSurfaceZoom guifg=#2ac3de gui=bold
+
+:syntax match lisNumber /\<[0-9.e-]\+\>/
+:highlight lisNumber guifg=#ff9e64
+
+:syntax match lisTitle /code v/
+:highlight lisTitle guifg=#1a1b26 guibg=#c0caf5
+
+:syntax match lisRMSSpot /Minimum RMS spot diameter/
+:highlight lisRMSSpot guifg=#3cb371
+
+
+:syntax match lisPerfMetric /Optical System/
+:syntax match lisPerfMetric /First-Order Properties/
+:syntax match lisPerfMetric /Manufacturability Results/
+:syntax match lisPerfMetric /Fifth-Order Results/
+:syntax match lisPerfMetric /Spotsize Results/
+:syntax match lisPerfMetric /Longitudinal Curvature Results/
+:syntax match lisPerfMetric /MTF Results/
+:syntax match lisPerfMetric /FSW Results/
+:highlight lisPerfMetric guifg=#000000 guibg=#008000
+
+:syntax match lisAUTCyc /CYCLE NUMBER/
+:highlight lisAUTCyc guifg=#1a1b26 guibg=#c0caf5
+
+:syntax match lisAUTAddConstr /Constraints added/
+:highlight lisAUTAddConstr guifg=#e00a97
+
+
+:syntax match lisAUTActiveConstr /Active Constraints/
+:highlight lisAUTActiveConstr guifg=#23a08e
+
+:syntax match lisAUTInactiveConstr /Inactive Constraints/
+:highlight lisAUTInactiveConstr guifg=#ffdf4f
diff --git a/nvim_old/syntax/codev.vim b/nvim_old/syntax/codev.vim
new file mode 100644
index 0000000..c428f22
--- /dev/null
+++ b/nvim_old/syntax/codev.vim
@@ -0,0 +1,66 @@
+:syntax case ignore
+:syntax region cvString start =/"/ end= /"/
+:highlight cvString guifg=#9ece6a
+
+:syntax region cvString start =/'/ end= /'/
+:highlight cvString guifg=#9ece6a
+
+:syntax match cvComment /!.*/
+:highlight cvComment guifg=#535c7e
+
+:syntax keyword cvConditional if els and else or
+" :highlight cvConditional guifg=LightGreen gui=italic
+:highlight cvConditional guifg=#bb9af7
+"
+:syntax match cvVariable /\^\w*/
+:highlight cvVariable guifg=#6ad5e8
+" :highlight cvVariable guifg=#27a1b9
+" DarkYellow
+:syntax match cvIdentifier /\$\w*/
+:highlight cvIdentifier guifg=#27a1b9 gui=italic
+
+:syntax keyword cvType str num
+:highlight cvType guifg=#ff9e64
+
+:syntax keyword cvScope lcl gbl
+:highlight cvScope gui=bold guifg=#6ad5e8
+
+:syntax keyword cvCommand sur aut rfd nab eva wri wrl wgf out res sav dif lib fie gcv gra go rfd pth sys rdy rdx can thi cuy cux tit dim ins gla dro mtf yan wl wtw wtf frz rim sto spo vie ver rdm din svl k a b c
+:highlight cvCommand guifg=#9d7cd8 gui=bold
+
+:syntax keyword cvOption lsa ast dst del exp dir mfr ifr pur ssi nrd nbr lns nos ref
+:highlight cvOption guifg=#9d7cd8 gui=italic
+
+:syntax keyword cvDatabase typ ind ucy umy hcy icy hmy imy pcy efx efy erf sd abv et ate atc map tco ptz sas ax lat ct
+:highlight cvDatabase guifg=#89ddff gui=bold
+
+:syntax match cvSurfaceZoom /\<\([sz][0-9oia]\)\>\|\<[sz]\>/
+:highlight cvSurfaceZoom guifg=#ff9e64 gui=bold
+" :highlight cvSurfaceZoom guifg=#2ac3de gui=bold
+
+:syntax match cvNumber /\<[0-9.e-]\+\>/
+:highlight cvNumber guifg=#ff9e64
+
+:syntax keyword cvBoolean yes no y n true false
+:highlight cvBoolean guifg=#1abc9c gui=bold
+
+:syntax keyword cvFunction join concat absf rfstr atanf sagf num_to_str isfct substr upcase
+:highlight cvFunction guifg=#7aa2f7
+
+:syntax match cvUDF /@[a-z0-9_]\+/
+:highlight link cvUDF cvFunction
+
+:syntax keyword cvImport in
+:highlight cvImport guifg=#7dcfff
+
+:syntax keyword cvSpecial buf end fct Q t len new b0
+:highlight cvSpecial guifg=#9d7cd8 gui=bold
+
+:syntax keyword cvRepeat for
+:highlight cvRepeat guifg=#bb9af7
+
+:syntax keyword cvOptimization eft wfr efp int dra rou bfg ext cnv mxc tar tim imp dsp
+:highlight link cvOptimization cvOption
+
+:syntax keyword cvConstraints thc gl1 ccy mxt mnt mne mna mae efl oal imd diy ray
+:highlight link cvConstraints cvOption
diff --git a/powershell/Microsoft.PowerShell_profile.ps1 b/powershell/Microsoft.PowerShell_profile.ps1
index e9a1b38..676fc91 100644
--- a/powershell/Microsoft.PowerShell_profile.ps1
+++ b/powershell/Microsoft.PowerShell_profile.ps1
@@ -160,6 +160,7 @@ function lsr {
#Alias Programs
function i {ipython}
+function j {z "$args"}
function pidof {Get-Process -Name $args}
function which {Get-Command $args}
function lsblk {Get-PSDrive}
diff --git a/windows-terminal/settings.json b/windows-terminal/settings.json
index b28c0cf..9dfe3bc 100644
--- a/windows-terminal/settings.json
+++ b/windows-terminal/settings.json
@@ -62,7 +62,7 @@
{
"font":
{
- "face": "Hack NF",
+ "face": "FiraCode Nerd Font Mono",
"size": 18
},
"padding": "0"
@@ -84,7 +84,7 @@
{
"font":
{
- "face": "Hack NF",
+ "face": "FiraCode Nerd Font Mono",
"size": 18
},
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
Back to https://optics-design.com