diff options
author | Kashieru1987 <mahdichowdhury07@gmail.com> | 2025-03-30 13:38:25 +0100 |
---|---|---|
committer | Kashieru1987 <mahdichowdhury07@gmail.com> | 2025-03-30 13:38:25 +0100 |
commit | 87f42cb4c2abd74d0227cbf7a555a7e28e0c3576 (patch) | |
tree | 34fce0c223b9cf81efad4a0204c44860686d685b /.config/nvim | |
parent | 452f00a528aa4b77a61c53af5c55b197acffef65 (diff) |
added some configs from .config :3HEADdebian-chan
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/init.lua | 2 | ||||
-rw-r--r-- | .config/nvim/lazy-lock.json | 20 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/hover.lua | 35 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/init.lua | 4 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/lazy.lua | 23 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/plugins/colours.lua | 13 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/plugins/harpoon.lua | 15 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/plugins/lsp-zero.lua | 168 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/plugins/lualine.lua | 50 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/plugins/markview.lua | 4 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/plugins/noice.lua | 36 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/plugins/nvim-surround.lua | 3 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/plugins/telescope.lua | 16 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/plugins/treesitter.lua | 26 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/plugins/undotree.lua | 6 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/plugins/vim-be-good.lua | 3 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/remap.lua | 57 | ||||
-rw-r--r-- | .config/nvim/lua/chronoziel/set.lua | 41 |
18 files changed, 522 insertions, 0 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..53abcdc --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,2 @@ +require("chronoziel") +print("Welcome, Kashieru") diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..6d24299 --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,20 @@ +{ + "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, + "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lsp-zero.nvim": { "branch": "v4.x", "commit": "df80878a8ac6f855a6290389340fd089870ea7a5" }, + "lualine.nvim": { "branch": "master", "commit": "1517caa8fff05e4b4999857319d3b0609a7f57fa" }, + "markview.nvim": { "branch": "main", "commit": "b3c0f3caf78518d33a0b5ad8af944a3c70aa0389" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" }, + "nvim-lspconfig": { "branch": "master", "commit": "0a1ac55d7d4ec2b2ed9616dfc5406791234d1d2b" }, + "nvim-surround": { "branch": "main", "commit": "caf6f633d4d77a29b6e265b560c5a035d171a913" }, + "nvim-treesitter": { "branch": "master", "commit": "86768fdd002c75833414010052a1e95a4760ee32" }, + "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "rose-pine": { "branch": "main", "commit": "7d1b5c7dcd274921f0f58e90a8bf935f6a95fbf3" }, + "telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" }, + "undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" }, + "vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" } +} diff --git a/.config/nvim/lua/chronoziel/hover.lua b/.config/nvim/lua/chronoziel/hover.lua new file mode 100644 index 0000000..0a49574 --- /dev/null +++ b/.config/nvim/lua/chronoziel/hover.lua @@ -0,0 +1,35 @@ + +-- Function to enable the hover autocmd +function EnableHoverAutocmd() + vim.cmd [[ + augroup HoverInfo + autocmd! + autocmd CursorHold * lua vim.lsp.buf.hover() + augroup END + ]] +end + +-- Function to disable the hover autocmd +function DisableHoverAutocmd() + vim.cmd [[ + augroup HoverInfo + autocmd! + augroup END + ]] +end + +-- Variable to keep track of the autocmd state +local hover_autocmd_enabled = false + +-- Toggle function +function ToggleHoverAutocmd() + if hover_autocmd_enabled then + DisableHoverAutocmd() + hover_autocmd_enabled = false + print("Hover autocmd disabled") + else + EnableHoverAutocmd() + hover_autocmd_enabled = true + print("Hover autocmd enabled") + end +end diff --git a/.config/nvim/lua/chronoziel/init.lua b/.config/nvim/lua/chronoziel/init.lua new file mode 100644 index 0000000..6c7c0e9 --- /dev/null +++ b/.config/nvim/lua/chronoziel/init.lua @@ -0,0 +1,4 @@ +require("chronoziel.remap") +require("chronoziel.set") +require("chronoziel.lazy") +require("chronoziel.hover") diff --git a/.config/nvim/lua/chronoziel/lazy.lua b/.config/nvim/lua/chronoziel/lazy.lua new file mode 100644 index 0000000..605c0b0 --- /dev/null +++ b/.config/nvim/lua/chronoziel/lazy.lua @@ -0,0 +1,23 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +-- This is also a good place to setup other settings (vim.opt) + +-- Setup lazy.nvim +require("lazy").setup("chronoziel.plugins") diff --git a/.config/nvim/lua/chronoziel/plugins/colours.lua b/.config/nvim/lua/chronoziel/plugins/colours.lua new file mode 100644 index 0000000..b952d54 --- /dev/null +++ b/.config/nvim/lua/chronoziel/plugins/colours.lua @@ -0,0 +1,13 @@ +return { + "rose-pine/neovim", + name = "rose-pine", + config = function() + vim.cmd("colorscheme rose-pine"); + -- vim.cmd.colorscheme(color) + + vim.api.nvim_set_hl(0, "Normal", {bg = "none"}) + vim.api.nvim_set_hl(0, "NormalFloat", {bg = "none"}) + + + end +} diff --git a/.config/nvim/lua/chronoziel/plugins/harpoon.lua b/.config/nvim/lua/chronoziel/plugins/harpoon.lua new file mode 100644 index 0000000..b22c104 --- /dev/null +++ b/.config/nvim/lua/chronoziel/plugins/harpoon.lua @@ -0,0 +1,15 @@ +return { + "theprimeagen/harpoon", + config = function() + local mark = require("harpoon.mark") + local ui = require("harpoon.ui") + + vim.keymap.set("n", "<leader>a", mark.add_file) + vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu) + + vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end) + vim.keymap.set("n", "<C-j>", function() ui.nav_file(2) end) + vim.keymap.set("n", "<C-k>", function() ui.nav_file(3) end) + vim.keymap.set("n", "<C-l>", function() ui.nav_file(4) end) + end +} diff --git a/.config/nvim/lua/chronoziel/plugins/lsp-zero.lua b/.config/nvim/lua/chronoziel/plugins/lsp-zero.lua new file mode 100644 index 0000000..dd58ee4 --- /dev/null +++ b/.config/nvim/lua/chronoziel/plugins/lsp-zero.lua @@ -0,0 +1,168 @@ +return { + "VonHeikemen/lsp-zero.nvim", + + dependencies = { + {'williamboman/mason.nvim'}, + {'williamboman/mason-lspconfig.nvim'}, + + {'neovim/nvim-lspconfig'}, + {'hrsh7th/nvim-cmp'}, + {'hrsh7th/cmp-nvim-lsp'}, + }, + + config = function() + -- "Avoids annoying layout shift in the screen" + vim.opt.signcolumn = 'yes' + + -- Adds cmp_nvim_lsp capabilities settings to lspconfig + local lspconfig_defaults = require('lspconfig').util.default_config + lspconfig_defaults.capabilities = vim.tbl_deep_extend( + 'force', + lspconfig_defaults.capabilities, + require('cmp_nvim_lsp').default_capabilities() + ) + + -- This is where you enable features that only work + -- if there is a language server active in the file + vim.api.nvim_create_autocmd('LspAttach', { + desc = 'LSP actions', + callback = function(event) + local opts = {buffer = event.buf} + + vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts) + vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts) + vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts) + vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts) + vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts) + vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts) + vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts) + vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts) + vim.keymap.set({'n', 'x'}, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts) + vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts) + end, + }) + + -- to learn how to use mason.nvim + -- read this: https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/guides/integrate-with-mason-nvim.md + require('mason').setup({}) + + require('mason-lspconfig').setup({ + ensure_installed = {}, + handlers = { + function(server_name) + require('lspconfig')[server_name].setup({}) + end, + }, + }) + + require('lspconfig').harper_ls.setup { + settings = { + ["harper-ls"] = { + linters = { + spell_check = false, + spelled_numbers = false, + an_a = true, + sentence_capitalization = false, + unclosed_quotes = true, + wrong_quotes = false, + long_sentences = false, + repeated_words = false, + spaces = true, + matcher = true, + correct_number_suffix = true, + number_suffix_capitalization = true, + multiple_sequential_pronouns = true, + linking_verbs = false, + avoid_curses = false, + terminating_conjunctions = true + } + } + }, + } + + local cmp = require('cmp') + + cmp.setup({ + sources = { + {name = 'nvim_lsp'}, + }, + snippet = { + expand = function(args) + -- You need Neovim v0.10 to use vim.snippet + vim.snippet.expand(args.body) + end, + }, +-- mapping = cmp.mapping.preset.insert({}), + + mapping = { + ["<Tab>"] = cmp.mapping.select_next_item(), + ["<S-Tab>"] = cmp.mapping.select_prev_item(), + ["<C-Tab>"] = cmp.mapping.complete(), + } + + }) + + + end, + + -- "VonHeikemen/lsp-zero.nvim", + -- dependencies = { + -- {'williamboman/mason.nvim'}, + -- {'williamboman/mason-lspconfig.nvim'}, + -- + -- {'neovim/nvim-lspconfig'}, + -- {'hrsh7th/nvim-cmp'}, + -- {'hrsh7th/cmp-nvim-lsp'}, + -- + -- {'L3MON4D3/LuaSnip'}, + -- }, + -- + -- config = function() + -- local lsp_zero = require('lsp-zero') + -- + -- lsp_zero.on_attach(function(client, bufnr) + -- -- see :help lsp-zero-keybindings + -- -- to learn the available actions + -- lsp_zero.default_keymaps({buffer = bufnr}) + -- end) + -- + -- + -- -- to learn how to use mason.nvim + -- -- read this: https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/guides/integrate-with-mason-nvim.md + -- require('mason').setup({}) + -- + -- require('mason-lspconfig').setup({ + -- ensure_installed = {}, + -- handlers = { + -- function(server_name) + -- require('lspconfig')[server_name].setup({}) + -- end, + -- }, + -- }) + -- + -- require('lspconfig').harper_ls.setup { + -- settings = { + -- ["harper-ls"] = { + -- linters = { + -- spell_check = false, + -- spelled_numbers = false, + -- an_a = true, + -- sentence_capitalization = false, + -- unclosed_quotes = true, + -- wrong_quotes = false, + -- long_sentences = false, + -- repeated_words = false, + -- spaces = true, + -- matcher = true, + -- correct_number_suffix = true, + -- number_suffix_capitalization = true, + -- multiple_sequential_pronouns = true, + -- linking_verbs = false, + -- avoid_curses = false, + -- terminating_conjunctions = true + -- } + -- } + -- }, + -- } + -- end + } diff --git a/.config/nvim/lua/chronoziel/plugins/lualine.lua b/.config/nvim/lua/chronoziel/plugins/lualine.lua new file mode 100644 index 0000000..bf0fb8e --- /dev/null +++ b/.config/nvim/lua/chronoziel/plugins/lualine.lua @@ -0,0 +1,50 @@ +return { + "nvim-lualine/lualine.nvim", + dependencies = { + "nvim-tree/nvim-web-devicons" + }, + config = function() + local lualine = require('lualine') + + lualine.setup { + options = { + icons_enabled = true, + theme = 'horizon', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} + } + end +} diff --git a/.config/nvim/lua/chronoziel/plugins/markview.lua b/.config/nvim/lua/chronoziel/plugins/markview.lua new file mode 100644 index 0000000..d2af8fd --- /dev/null +++ b/.config/nvim/lua/chronoziel/plugins/markview.lua @@ -0,0 +1,4 @@ +return { + "OXY2DEV/markview.nvim", + lazy = false +}; diff --git a/.config/nvim/lua/chronoziel/plugins/noice.lua b/.config/nvim/lua/chronoziel/plugins/noice.lua new file mode 100644 index 0000000..dc9de97 --- /dev/null +++ b/.config/nvim/lua/chronoziel/plugins/noice.lua @@ -0,0 +1,36 @@ +return { +-- "folke/noice.nvim", +-- event = "VeryLazy", +-- opts = { +-- -- add any options here +-- }, +-- dependencies = { +-- -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries +-- "MunifTanjim/nui.nvim", +-- -- OPTIONAL: +-- -- `nvim-notify` is only needed, if you want to use the notification view. +-- -- If not available, we use `mini` as the fallback +-- "rcarriga/nvim-notify", +-- }, +-- config = function() +-- require("noice").setup({ +-- lsp = { +-- -- override markdown rendering so that **cmp** and other plugins use **Treesitter** +-- override = { +-- ["vim.lsp.util.convert_input_to_markdown_lines"] = true, +-- ["vim.lsp.util.stylize_markdown"] = true, +-- ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp +-- }, +-- }, +-- -- you can enable a preset for easier configuration +-- presets = { +-- bottom_search = true, -- use a classic bottom cmdline for search +-- command_palette = true, -- position the cmdline and popupmenu together +-- long_message_to_split = true, -- long messages will be sent to a split +-- inc_rename = false, -- enables an input dialog for inc-rename.nvim +-- lsp_doc_border = false, -- add a border to hover docs and signature help +-- }, +-- }) +-- vim.keymap.set("n", "<leader>nd", "<cmd>NoiceDismiss<CR>") +-- end +} diff --git a/.config/nvim/lua/chronoziel/plugins/nvim-surround.lua b/.config/nvim/lua/chronoziel/plugins/nvim-surround.lua new file mode 100644 index 0000000..2e2e019 --- /dev/null +++ b/.config/nvim/lua/chronoziel/plugins/nvim-surround.lua @@ -0,0 +1,3 @@ +return { + "kylechui/nvim-surround", +} diff --git a/.config/nvim/lua/chronoziel/plugins/telescope.lua b/.config/nvim/lua/chronoziel/plugins/telescope.lua new file mode 100644 index 0000000..7740e83 --- /dev/null +++ b/.config/nvim/lua/chronoziel/plugins/telescope.lua @@ -0,0 +1,16 @@ +return { + "nvim-telescope/telescope.nvim", + dependencies = { + "nvim-lua/plenary.nvim" + }, + config = function() + local builtin = require('telescope.builtin') + + -- PRIMEAGEN KEYBINDS + vim.keymap.set('n', '<leader>pf', builtin.find_files, {}) + vim.keymap.set('n', '<C-p>', builtin.git_files, {}) + vim.keymap.set('n', '<leader>ps', function() + builtin.grep_string({ search = vim.fn.input("Grep > ") }); + end) + end +} diff --git a/.config/nvim/lua/chronoziel/plugins/treesitter.lua b/.config/nvim/lua/chronoziel/plugins/treesitter.lua new file mode 100644 index 0000000..710a6f4 --- /dev/null +++ b/.config/nvim/lua/chronoziel/plugins/treesitter.lua @@ -0,0 +1,26 @@ +return { + "nvim-treesitter/nvim-treesitter", + config = function() + require'nvim-treesitter.configs'.setup { + -- A list of parser names, or "all" (the listed parsers MUST always be installed) + ensure_installed = { "c", "lua", "java", "rust", "vim", "vimdoc", "query", "markdown", "markdown_inline" }, + + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, + + highlight = { + enable = true, + + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, + } + end +} diff --git a/.config/nvim/lua/chronoziel/plugins/undotree.lua b/.config/nvim/lua/chronoziel/plugins/undotree.lua new file mode 100644 index 0000000..1404add --- /dev/null +++ b/.config/nvim/lua/chronoziel/plugins/undotree.lua @@ -0,0 +1,6 @@ +return { + "mbbill/undotree", + config = function() + vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle) + end +} diff --git a/.config/nvim/lua/chronoziel/plugins/vim-be-good.lua b/.config/nvim/lua/chronoziel/plugins/vim-be-good.lua new file mode 100644 index 0000000..e27b7b1 --- /dev/null +++ b/.config/nvim/lua/chronoziel/plugins/vim-be-good.lua @@ -0,0 +1,3 @@ +return { + "ThePrimeagen/vim-be-good" +} diff --git a/.config/nvim/lua/chronoziel/remap.lua b/.config/nvim/lua/chronoziel/remap.lua new file mode 100644 index 0000000..edf5d7b --- /dev/null +++ b/.config/nvim/lua/chronoziel/remap.lua @@ -0,0 +1,57 @@ +vim.g.mapleader = " " + +--PERSONAL ADDITIONS + +--Allows Control Delete +vim.keymap.set("i", "<C-H>", "<C-W>") + +--Java compile and run mappings +vim.keymap.set("n", "<leader>jc", ":!javac %:p<CR>", { noremap = true }) +vim.keymap.set("n", "<leader>jr", ":!javac %:t:r<CR>", { noremap = true }) + +--Open terminal +vim.keymap.set("n", "<leader>t", ":term<CR>a") + +--Show properties from LSP +vim.keymap.set("n", "<leader>1", ":lua vim.lsp.buf.hover()<CR>", { noremap = true }) + +--Toggle cursor hover auto-show properties +vim.keymap.set("n", "<leader>2", ":lua ToggleHoverAutocmd()<CR>", { noremap = true, silent = true}); + +--PRIMEAGEN KEYBINDS + +vim.keymap.set("n", "<leader>pv", vim.cmd.Ex) +--cool moving and auto-indent with visual mode +vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv") +vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv") + + +--keeps cursor in same place when removing newline +vim.keymap.set("n", "J", "mzJ`z") + +--centers cursor on half page jumps +vim.keymap.set("n", "<C-d>", "<C-d>zz") +vim.keymap.set("n", "<C-u>", "<C-u>zz") + +--centers cursor on search terms +vim.keymap.set("n", "n", "nzzzv") +vim.keymap.set("n", "N", "Nzzzv") + +--pastes and preserves current paste buffer +vim.keymap.set("x", "<leader>pp", "\"_dP") + +--copying to system clipboard : asbjornHaland +vim.keymap.set("n", "<leader>y", "\"+y") +vim.keymap.set("v", "<leader>y", "\"+y") +vim.keymap.set("n", "<leader>Y", "\"+Y") + +--deleting to void register : asbjornHaland +vim.keymap.set("n", "<leader>d", "\"_d") +vim.keymap.set("v", "<leader>d", "\"_d") + +--annex capital Q +vim.keymap.set("n", "Q", "<nop>") + +--edit all instances of selected word in file +vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]]) + diff --git a/.config/nvim/lua/chronoziel/set.lua b/.config/nvim/lua/chronoziel/set.lua new file mode 100644 index 0000000..b42c4a8 --- /dev/null +++ b/.config/nvim/lua/chronoziel/set.lua @@ -0,0 +1,41 @@ + +--changes the directory for cmd to the directory in netrw +vim.g.netrw_keepdir = 0 + +--allows clipboard to work +vim.opt.clipboard = "unnamedplus" + +--primeagen keys +vim.opt.nu = true +vim.opt.relativenumber = true + +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true + +vim.opt.smartindent = true + +vim.opt.wrap = false +vim.opt.linebreak = true + +vim.opt.swapfile = false +vim.opt.backup = false +vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" +vim.opt.undofile = true + +vim.opt.hlsearch = false +vim.opt.incsearch = true + +vim.opt.termguicolors = true + +vim.opt.scrolloff = 8 +vim.opt.signcolumn = "yes" +vim.opt.isfname:append("@-@") + +vim.opt.updatetime = 50 + +vim.opt.colorcolumn = "100" + +vim.g.mapleader = " " + |