From abdf0f8462618ca17bdb85dc8075c6f51d374334 Mon Sep 17 00:00:00 2001 From: Robear Selwans Date: Mon, 23 Mar 2026 00:17:39 +0000 Subject: [PATCH] Added neovim config --- nvim/.config/nvim/init.lua | 9 ++ nvim/.config/nvim/lua/helpers/kmstack.lua | 36 ++++++ nvim/.config/nvim/lua/helpers/plugins.lua | 18 +++ nvim/.config/nvim/lua/lsps/init.lua | 110 ++++++++++++++++++ .../nvim/lua/plugins/configs/lazydev.lua | 12 ++ .../.config/nvim/lua/plugins/configs/leap.lua | 14 +++ .../nvim/lua/plugins/configs/mason.lua | 6 + .../.config/nvim/lua/plugins/configs/mini.lua | 11 ++ .../nvim/lua/plugins/configs/neovim-ayu.lua | 13 +++ .../nvim/lua/plugins/configs/nvim-dap-ui.lua | 14 +++ .../plugins/configs/nvim-dap-virtual-text.lua | 6 + .../nvim/lua/plugins/configs/nvim-dap.lua | 45 +++++++ .../lua/plugins/configs/nvim-treesitter.lua | 18 +++ nvim/.config/nvim/lua/plugins/configs/oil.lua | 23 ++++ .../nvim/lua/plugins/configs/overseer.lua | 12 ++ .../nvim/lua/plugins/configs/telescope.lua | 23 ++++ .../nvim/lua/plugins/configs/template.lua | 10 ++ nvim/.config/nvim/lua/plugins/init.lua | 30 +++++ nvim/.config/nvim/lua/settings/keymaps.lua | 104 +++++++++++++++++ nvim/.config/nvim/lua/settings/options.lua | 49 ++++++++ nvim/.config/nvim/nvim-pack-lock.json | 68 +++++++++++ 21 files changed, 631 insertions(+) create mode 100644 nvim/.config/nvim/init.lua create mode 100644 nvim/.config/nvim/lua/helpers/kmstack.lua create mode 100644 nvim/.config/nvim/lua/helpers/plugins.lua create mode 100644 nvim/.config/nvim/lua/lsps/init.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/lazydev.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/leap.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/mason.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/mini.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/neovim-ayu.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/nvim-dap-ui.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/nvim-dap-virtual-text.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/nvim-dap.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/nvim-treesitter.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/oil.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/overseer.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/telescope.lua create mode 100644 nvim/.config/nvim/lua/plugins/configs/template.lua create mode 100644 nvim/.config/nvim/lua/plugins/init.lua create mode 100644 nvim/.config/nvim/lua/settings/keymaps.lua create mode 100644 nvim/.config/nvim/lua/settings/options.lua create mode 100644 nvim/.config/nvim/nvim-pack-lock.json diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua new file mode 100644 index 0000000..4ca5d22 --- /dev/null +++ b/nvim/.config/nvim/init.lua @@ -0,0 +1,9 @@ +require('settings/keymaps') +require('settings/options') + +vim.pack.add(require('plugins'), { load = require('helpers/plugins').load_fn }) + +require('lsps') + +-- Set Colorscheme +require('ayu').colorscheme() diff --git a/nvim/.config/nvim/lua/helpers/kmstack.lua b/nvim/.config/nvim/lua/helpers/kmstack.lua new file mode 100644 index 0000000..c49ea08 --- /dev/null +++ b/nvim/.config/nvim/lua/helpers/kmstack.lua @@ -0,0 +1,36 @@ +local saved_maps = {} + +local function get_map(mode, lhs) + for _, map in ipairs(vim.api.nvim_get_keymap(mode)) do + if map.lhs == lhs then + return map + end + end +end + +local function push_map(mode, lhs, new_rhs, opts) + local old = get_map(mode, lhs) + saved_maps[mode .. lhs] = old + + vim.keymap.set(mode, lhs, new_rhs, opts) +end + +local function pop_map(mode, lhs) + local old = saved_maps[mode .. lhs] + + if old then + vim.keymap.set(old.mode, old.lhs, old.rhs or old.callback, { + noremap = old.noremap == 1, + silent = old.silent == 1, + expr = old.expr == 1, + nowait = old.nowait == 1, + }) + else + vim.keymap.del(mode, lhs) + end +end + +return { + push = push_map, + pop = pop_map, +} diff --git a/nvim/.config/nvim/lua/helpers/plugins.lua b/nvim/.config/nvim/lua/helpers/plugins.lua new file mode 100644 index 0000000..ca77b79 --- /dev/null +++ b/nvim/.config/nvim/lua/helpers/plugins.lua @@ -0,0 +1,18 @@ +return { + load_fn = function(plug_data) + vim.cmd.packadd(plug_data.spec.name) + local status, config = pcall(require,'plugins/configs/'..plug_data.spec.name) + if status then + -- Call the configuration function (if exists) + if config.on_load ~= nil then + config.on_load() + end + + if config.keymaps ~= nil then + for _,keymap in pairs(config.keymaps) do + vim.keymap.set(keymap.modes or 'n', keymap.keys, keymap.cmd, { desc = keymap.desc }) + end + end + end + end +} diff --git a/nvim/.config/nvim/lua/lsps/init.lua b/nvim/.config/nvim/lua/lsps/init.lua new file mode 100644 index 0000000..db6552f --- /dev/null +++ b/nvim/.config/nvim/lua/lsps/init.lua @@ -0,0 +1,110 @@ + +local enabled_lsps_lspconf = { + 'clangd', + 'lua_ls', + -- 'rust_analyzer', + -- 'pylsp', +} + +local enabled_lsps_custom = { + -- 'nu_lsp', +} + +if #enabled_lsps_lspconf + #enabled_lsps_custom > 0 then + vim.lsp.config['*'] = { + -- capabilities = require('blink.cmp').get_lsp_capabilities(), + log_level = vim.lsp.protocol.MessageType.Warning, + } + + vim.api.nvim_create_autocmd("LspAttach", { + callback = function(args) + local client = vim.lsp.get_client_by_id(args.data.client_id) + if not client then + return + end + + vim.lsp.inlay_hint.enable() + + -- Setup Completion + if client:supports_method('textDocument/completion') then + -- local chars = {}; for i = 32, 126 do table.insert(chars, string.char(i)) end + -- client.server_capabilities.completionProvider.triggerCharacters = chars + vim.lsp.completion.enable(true, client.id, bufnr, { autotrigger=true }) + end + end, + }) + + vim.api.nvim_create_autocmd("InsertCharPre", { + callback = function(args) + if vim.fn.pumvisible() == 0 then + vim.lsp.completion.get() + end + end + }) + +end + +for _, lsp_name in ipairs(enabled_lsps_custom) do + require("lsps/"..lsp_name) +end + +vim.pack.add({ 'https://github.com/neovim/nvim-lspconfig' }) +for _, lsp_name in ipairs(enabled_lsps_lspconf) do + vim.lsp.config[lsp_name] = require('lspconfig.configs.'..lsp_name) +end + +local overrides = { + -- ['lua_ls'] = { + -- settings = { + -- Lua = { + -- diagnostics = { + -- globals = {'vim'}, + -- } + -- } + -- }, + -- }, +} + +for _, lsp_name in ipairs(enabled_lsps_lspconf) do + if overrides[lsp_name] ~= nil then + local current = vim.lsp.config[lsp_name] + for key, value in pairs(overrides[lsp_name]) do + current[key] = value + end + vim.lsp.config[lsp_name] = current + end + vim.lsp.enable(lsp_name) +end + + +local opts = { noremap=true, silent=true } +vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) + +local config = { + virtual_text = true, + signs = { + active = signs, + text = { + [vim.diagnostic.severity.ERROR] = ' ', + [vim.diagnostic.severity.WARN] = ' ', + [vim.diagnostic.severity.HINT] = ' ', + [vim.diagnostic.severity.INFO] = ' ', + }, + }, + update_in_insert = false, + underline = true, + severity_sort = true, + float = { + focusable = false, + style = "minimal", + border = "rounded", + source = "always", + header = "", + prefix = "", + }, +} + +vim.diagnostic.config(config) + +vim.lsp.handlers["textDocument/hover"] = function() vim.lsp.buf.hover({ border = "rounded" }) end +vim.lsp.handlers["textDocument/signatureHelp"] = function() vim.lsp.buf.signature_help({ border = "rounded" }) end diff --git a/nvim/.config/nvim/lua/plugins/configs/lazydev.lua b/nvim/.config/nvim/lua/plugins/configs/lazydev.lua new file mode 100644 index 0000000..43d9580 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/lazydev.lua @@ -0,0 +1,12 @@ +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() + require('lazydev').setup() + end, + + -- Keymaps to be set after the plugin is loaded + keymaps = { + -- { [modes='n'], keys, cmd, desc } + } +} diff --git a/nvim/.config/nvim/lua/plugins/configs/leap.lua b/nvim/.config/nvim/lua/plugins/configs/leap.lua new file mode 100644 index 0000000..3d5a010 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/leap.lua @@ -0,0 +1,14 @@ +local leap_forward = function() require('leap').leap { opts = require('leap.user').with_traversal_keys('s', 'S') } end +local leap_backward = function() require('leap').leap { opts = require('leap.user').with_traversal_keys('s', 'S'), backward = true } end + +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() end, + + -- Keymaps to be set after the plugin is loaded + keymaps = { + { modes = {'n','x','o'}, keys = 's', cmd = leap_forward, desc = 'Forward' }, + { modes = {'n','x','o'}, keys = 'S', cmd = leap_backward, desc = 'Backward' }, + } +} diff --git a/nvim/.config/nvim/lua/plugins/configs/mason.lua b/nvim/.config/nvim/lua/plugins/configs/mason.lua new file mode 100644 index 0000000..4d10cf5 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/mason.lua @@ -0,0 +1,6 @@ +return +{ + on_load = function() + require('mason').setup() + end, +} diff --git a/nvim/.config/nvim/lua/plugins/configs/mini.lua b/nvim/.config/nvim/lua/plugins/configs/mini.lua new file mode 100644 index 0000000..3cf8979 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/mini.lua @@ -0,0 +1,11 @@ +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() + require('mini.icons').setup() + require('mini.starter').setup() + if(vim.o.showtabline ~= 0) then + require('mini.tabline').setup() + end + end, +} diff --git a/nvim/.config/nvim/lua/plugins/configs/neovim-ayu.lua b/nvim/.config/nvim/lua/plugins/configs/neovim-ayu.lua new file mode 100644 index 0000000..1a1400a --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/neovim-ayu.lua @@ -0,0 +1,13 @@ +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() + require('ayu').setup({ + mirage = false, -- Set to `true` to use `mirage` variant instead of `dark` for dark background. + terminal = false, -- Set to `false` to let terminal manage its own colors. + overrides = { + VertSplit = { fg = '#FFFFFF', bg = '#FFFFFF' }, + }, -- A dictionary of group names, each associated with a dictionary of parameters (`bg`, `fg`, `sp` and `style`) and colors in hex. + }) + end, +} diff --git a/nvim/.config/nvim/lua/plugins/configs/nvim-dap-ui.lua b/nvim/.config/nvim/lua/plugins/configs/nvim-dap-ui.lua new file mode 100644 index 0000000..b9a2a2c --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/nvim-dap-ui.lua @@ -0,0 +1,14 @@ +return +{ + on_load = function() + local dap = require('dap') + local ui = require('dapui') + + dap.listeners.before.attach.dapui_config = ui.open + dap.listeners.before.launch.dapui_config = ui.open + dap.listeners.before.event_terminated.dapui_config = ui.close + dap.listeners.before.event_exited.dapui_config = ui.close + + ui.setup() + end +} diff --git a/nvim/.config/nvim/lua/plugins/configs/nvim-dap-virtual-text.lua b/nvim/.config/nvim/lua/plugins/configs/nvim-dap-virtual-text.lua new file mode 100644 index 0000000..6cb6b2d --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/nvim-dap-virtual-text.lua @@ -0,0 +1,6 @@ +return +{ + on_load = function() + require('nvim-dap-virtual-text').setup() + end, +} diff --git a/nvim/.config/nvim/lua/plugins/configs/nvim-dap.lua b/nvim/.config/nvim/lua/plugins/configs/nvim-dap.lua new file mode 100644 index 0000000..84fa95f --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/nvim-dap.lua @@ -0,0 +1,45 @@ +return +{ + on_load = function() + local dap = require('dap') + dap.adapters.codelldb = { + type = 'executable', + command = 'codelldb', + } + + dap.configurations.c = { + { + name = 'Launch file', + type = 'codelldb', + request = 'launch', + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + end, + cwd = '${workspaceFolder}', + stopOnEntry = false, + } + } + + dap.listeners.before.attach.key_config = function() + require('helpers/kmstack').push('n', '', dap.step_over, {}) + require('helpers/kmstack').push('n', '', dap.restart_frame, {}) + require('helpers/kmstack').push('n', '', dap.step_into, {}) + require('helpers/kmstack').push('n', '', dap.step_out, {}) + end + dap.listeners.before.launch.key_config = dap.listeners.before.attach.key_config + + dap.listeners.after.event_terminated.key_config = function() + require('helpers/kmstack').pop('n', '') + require('helpers/kmstack').pop('n', '') + require('helpers/kmstack').pop('n', '') + require('helpers/kmstack').pop('n', '') + end + dap.listeners.after.event_exited.key_config = dap.listeners.after.event_terminated.key_config + + end, + + keymaps = { + { keys = 'db', cmd = require('dap').toggle_breakpoint, desc = 'Toggle Breakpoint' }, + { keys = 'dn', cmd = require('dap').step_over, desc = 'Step Over' }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/configs/nvim-treesitter.lua b/nvim/.config/nvim/lua/plugins/configs/nvim-treesitter.lua new file mode 100644 index 0000000..c362fdb --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/nvim-treesitter.lua @@ -0,0 +1,18 @@ +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() + vim.api.nvim_create_autocmd('FileType', { + pattern = { 'c', 'lua' }, + callback = function() + -- syntax highlighting, provided by Neovim + vim.treesitter.start() + -- folds, provided by Neovim + vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' + vim.wo.foldmethod = 'expr' + -- indentation, provided by nvim-treesitter + -- vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + end, + }) + end, +} diff --git a/nvim/.config/nvim/lua/plugins/configs/oil.lua b/nvim/.config/nvim/lua/plugins/configs/oil.lua new file mode 100644 index 0000000..e3b0c77 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/oil.lua @@ -0,0 +1,23 @@ +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() + require("oil").setup{ watch_for_changes = true, + default_file_explorer = true, + view_options = { + show_hidden = true + }, + float = { + border = 'single', + }, + } + end, + + -- Keymaps to be set after the plugin is loaded + keymaps = { + { keys = 'oo', cmd = require('oil').open, desc = 'Open' }, + { keys = 'oc', cmd = require('oil').close, desc = 'Close' }, + { keys = 'of', cmd = require('oil').toggle_float, desc = 'Toggle Floating' }, + { keys = 'op', cmd = require('oil.actions').preview.callback, desc = 'Toggle Preview' }, + } +} diff --git a/nvim/.config/nvim/lua/plugins/configs/overseer.lua b/nvim/.config/nvim/lua/plugins/configs/overseer.lua new file mode 100644 index 0000000..1498277 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/overseer.lua @@ -0,0 +1,12 @@ +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() + require('overseer').setup() + end, + + -- Keymaps to be set after the plugin is loaded + keymaps = { + -- { [modes='n'], keys, cmd, desc } + } +} diff --git a/nvim/.config/nvim/lua/plugins/configs/telescope.lua b/nvim/.config/nvim/lua/plugins/configs/telescope.lua new file mode 100644 index 0000000..e3f27ac --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/telescope.lua @@ -0,0 +1,23 @@ +local function tc(cmd,theme) + return "Telescope "..cmd.." theme="..theme.."" +end + +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() end, + + -- Keymaps to be set after the plugin is loaded + keymaps = { + { keys="tf", cmd=tc("find_files" ,"dropdown"), desc="Files" }, + { keys="tt", cmd=tc("live_grep" ,"ivy") , desc="Text" }, + { keys="tb", cmd=tc("buffers" ,"dropdown"), desc="Buffers" }, + { keys="ts", cmd=tc("search_history","ivy") , desc="History" }, + { keys="tq", cmd=tc("quickfix" ,"ivy") , desc="Quickfix" }, + { keys="tr", cmd=tc("registers" ,"ivy") , desc="Registers" }, + { keys="ta", cmd=tc("aerial" ,"ivy") , desc="Aerial" }, + { keys="tc", cmd=tc("resume" ,"dropdown"), desc="Continue" }, + { keys="td", cmd=tc("diagnostics" ,"ivy") , desc="Diagnostics"}, + { keys="th", cmd=tc("help_tags" ,"ivy") , desc="Help Tags" }, + } +} diff --git a/nvim/.config/nvim/lua/plugins/configs/template.lua b/nvim/.config/nvim/lua/plugins/configs/template.lua new file mode 100644 index 0000000..247fdcd --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/configs/template.lua @@ -0,0 +1,10 @@ +return +{ + -- Configuration function to be run after the plugin is loaded + on_load = function() end, + + -- Keymaps to be set after the plugin is loaded + keymaps = { + -- { [modes='n'], keys, cmd, desc } + } +} diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua new file mode 100644 index 0000000..cbc8759 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -0,0 +1,30 @@ +return +{ + -- Colorschemes + 'https://github.com/shatur/neovim-ayu', + + 'https://github.com/OXY2DEV/helpview.nvim', + + -- Dependencies + 'https://github.com/nvim-lua/plenary.nvim', -- For Telescope + 'https://github.com/nvim-neotest/nvim-nio', -- For nvim-dap-ui + + { src = 'https://github.com/nvim-mini/mini.nvim', name = 'mini' }, + { src = 'https://github.com/stevearc/oil.nvim', name = 'oil' }, + { src = 'https://github.com/nvim-telescope/telescope.nvim', name = 'telescope' }, + { src = 'https://github.com/stevearc/overseer.nvim', name = 'overseer' }, + + { src = 'https://codeberg.org/andyg/leap.nvim', name = 'leap' }, + + -- Debugging Support + 'https://github.com/mfussenegger/nvim-dap', + 'https://github.com/rcarriga/nvim-dap-ui', + 'https://github.com/theHamsta/nvim-dap-virtual-text', + + -- Easy Installers + 'https://github.com/nvim-treesitter/nvim-treesitter', + { src = 'https://github.com/mason-org/mason.nvim', name = 'mason' }, + + -- Misc. + { src = 'https://github.com/folke/lazydev.nvim', name = 'lazydev' }, +} diff --git a/nvim/.config/nvim/lua/settings/keymaps.lua b/nvim/.config/nvim/lua/settings/keymaps.lua new file mode 100644 index 0000000..b41202b --- /dev/null +++ b/nvim/.config/nvim/lua/settings/keymaps.lua @@ -0,0 +1,104 @@ +local keymap = vim.keymap.set + +keymap("", "", "", opts) +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +-- Modes +-- n = Normal +-- i = Insert +-- x = Visual +-- s = Select +-- v = Visual + Select +-- t = Term +-- c = Command + +-- Normal -- +-- Window Navigation -- +keymap("n", "", "h", {}) +keymap("n", "", "j", {}) +keymap("n", "", "k", {}) +keymap("n", "", "l", {}) + +-- Splits -- +keymap("n", "", ":vsplit", {}) +keymap("n", "", ":split", {}) + +-- Resize splits -- +keymap("n", "", ":resize +2", {}) +keymap("n", "", ":resize -2", {}) +keymap("n", "", ":vertical resize -2", {}) +keymap("n", "", ":vertical resize +2", {}) + +-- Navigate buffers -- +keymap("n", "j", ":bnext", {}) +keymap("n", "k", ":bprevious", {}) +keymap("n", "d", ":bdelete", {}) + +-- Faster command -- +keymap("n", ";", ":", {}) + +-- LSP Commands -- +keymap("n", "l?", vim.lsp.buf.hover, {}) +keymap("n", "li", vim.lsp.buf.implementation, {}) +keymap("n", "ld", vim.lsp.buf.definition, {}) +keymap("n", "lD", vim.lsp.buf.declaration, {}) +keymap("n", "lR", vim.lsp.buf.rename, {}) +keymap("n", "lca", vim.lsp.buf.code_action, {}) +keymap("n", "lr", vim.lsp.buf.references, {}) +keymap("n", "lf", vim.diagnostic.open_float, {}) +keymap("n", "lF", vim.lsp.buf.format, {}) +keymap("i", "", vim.lsp.buf.signature_help, {}) +keymap("i", "", vim.lsp.completion.get, {}) + +-- Insert -- +-- Quicker escape -- +keymap("i", "jk", "", {}) + +-- Move lines -- +keymap("n", "", "<<", {}) +keymap("n", "", ">>", {}) +keymap("n", "", "dd2kp", {}) +keymap("n", "", "ddp", {}) +-- Visual -- +-- Stay in indent mode -- +keymap("v", "", "", ">gv", {}) +-- Move text up and down +keymap("v", "", ":move '<-2gv-gv", {}) +keymap("v", "", ":move '>+1gv-gv", {}) + +-- Paste overwrite selection +keymap("v", "p", '"_dP', {}) + +-- Terminal -- +-- Better terminal navigation -- +keymap("t", "", "h", {}) +keymap("t", "", "j", {}) +keymap("t", "", "k", {}) +keymap("t", "", "l", {}) + +-- ------------------------------------------------------------------------------------- +-- ------------------------------------------------------------------------------------- + +-- Tab Overloads +keymap("i", "", + function() + if vim.fn.pumvisible() == 1 then + return '' + else + return '' + end + end, + { expr = true, noremap = true, silent = true } +) +keymap("i", "", + function() + if vim.fn.pumvisible() == 1 then + return '' + else + return '' + end + end, + { expr = true, noremap = true, silent = true } +) diff --git a/nvim/.config/nvim/lua/settings/options.lua b/nvim/.config/nvim/lua/settings/options.lua new file mode 100644 index 0000000..356f00b --- /dev/null +++ b/nvim/.config/nvim/lua/settings/options.lua @@ -0,0 +1,49 @@ +vim.opt.backup = false -- Backup file creation +vim.opt.clipboard = "unnamedplus" -- Using system clipboard +vim.opt.cmdheight = 0 +vim.opt.showcmdloc = 'statusline' +vim.opt.conceallevel = 0 +vim.opt.fileencoding = "utf-8" -- File encoding +vim.opt.hlsearch = true -- Highlight search matches +vim.opt.ignorecase = true -- Ignore case in search patterns +vim.opt.mouse = "a" -- Use mouse in neovim +vim.opt.pumheight = 10 -- Pop-up menu height +vim.opt.showmode = false -- Show mode name +vim.opt.showtabline = 0 -- Show tabs (0: never, 1: when >=2 tabs present, 2: always) +vim.opt.smartcase = true -- Override ignorecase when needed +vim.opt.smartindent = true -- Smarter indentation +vim.opt.splitbelow = true -- Horizontal splits go below +vim.opt.splitright = true -- Vertical split go right +vim.opt.swapfile = false -- Swap file creation +vim.opt.termguicolors = true +vim.opt.timeoutlen = 1000 -- Time to wait for a mapped sequence to complete +vim.opt.undofile = true -- Persistent undo history +vim.opt.updatetime = 100 -- Faster completion (ms) +vim.opt.writebackup = false +vim.opt.expandtab = true -- Convert tabs to spaces +vim.opt.shiftwidth = 2 -- Number of spaces per indentation +vim.opt.tabstop = 2 -- Insert spaces per tab +vim.opt.cursorline = true -- Highlight the current line +vim.opt.number = true -- Set numbered lines +vim.opt.relativenumber = false -- Set relative numbered lines +vim.opt.numberwidth = 4 -- Set number column width +vim.opt.signcolumn = "yes" -- Always show sign column +vim.opt.wrap = false -- Text wrapping +vim.opt.scrolloff = 8 +vim.opt.sidescrolloff = 8 +-- vim.opt.lazyredraw = true -- Don't draw in the middle of bindings/macros +vim.opt.exrc = true +vim.opt.laststatus=3 + +vim.opt.completeopt = { "menuone", "noselect", "popup", "fuzzy" } +vim.opt.shortmess:append "c" + +vim.opt.foldlevel=99 +vim.opt.foldlevelstart=99 + +-- opt.shell = 'nu.exe' + +vim.cmd "set whichwrap+=<,>,[,],h,l" +vim.cmd [[set iskeyword+=-]] -- Don't treat `-` as a word separator +vim.cmd [[set formatoptions-=cro]] +vim.cmd [[set fillchars+=vert:║]] diff --git a/nvim/.config/nvim/nvim-pack-lock.json b/nvim/.config/nvim/nvim-pack-lock.json new file mode 100644 index 0000000..b222d22 --- /dev/null +++ b/nvim/.config/nvim/nvim-pack-lock.json @@ -0,0 +1,68 @@ +{ + "plugins": { + "helpview.nvim": { + "rev": "518789535a0cb146224a428edf93a70f98b795db", + "src": "https://github.com/OXY2DEV/helpview.nvim" + }, + "lazydev": { + "rev": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d", + "src": "https://github.com/folke/lazydev.nvim" + }, + "leap": { + "rev": "25d893149edfc831ba188f16448b255ab582544c", + "src": "https://codeberg.org/andyg/leap.nvim" + }, + "mason": { + "rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65", + "src": "https://github.com/mason-org/mason.nvim" + }, + "mini": { + "rev": "59f09943573c5348ca6c88393fa09ce3b66a7818", + "src": "https://github.com/nvim-mini/mini.nvim" + }, + "neovim-ayu": { + "rev": "e5a9f0fa2918d6b5f57c21b3ac014314ee5e41c8", + "src": "https://github.com/shatur/neovim-ayu" + }, + "nvim-dap": { + "rev": "a9d8cb68ee7184111dc66156c4a2ebabfbe01bc5", + "src": "https://github.com/mfussenegger/nvim-dap" + }, + "nvim-dap-ui": { + "rev": "cf91d5e2d07c72903d052f5207511bf7ecdb7122", + "src": "https://github.com/rcarriga/nvim-dap-ui" + }, + "nvim-dap-virtual-text": { + "rev": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6", + "src": "https://github.com/theHamsta/nvim-dap-virtual-text" + }, + "nvim-lspconfig": { + "rev": "841c6d4139aedb8a3f2baf30cef5327371385b93", + "src": "https://github.com/neovim/nvim-lspconfig" + }, + "nvim-nio": { + "rev": "21f5324bfac14e22ba26553caf69ec76ae8a7662", + "src": "https://github.com/nvim-neotest/nvim-nio" + }, + "nvim-treesitter": { + "rev": "875515255192864c33981c3ed66ad94e561b904a", + "src": "https://github.com/nvim-treesitter/nvim-treesitter" + }, + "oil": { + "rev": "0fcc83805ad11cf714a949c98c605ed717e0b83e", + "src": "https://github.com/stevearc/oil.nvim" + }, + "overseer": { + "rev": "a2194447f4c5a1baf95139c5c7b539fa7b0d012f", + "src": "https://github.com/stevearc/overseer.nvim" + }, + "plenary.nvim": { + "rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509", + "src": "https://github.com/nvim-lua/plenary.nvim" + }, + "telescope": { + "rev": "5255aa27c422de944791318024167ad5d40aad20", + "src": "https://github.com/nvim-telescope/telescope.nvim" + } + } +} \ No newline at end of file