From f45504df545576c621ea9a3f7bee964e9eec6b13 Mon Sep 17 00:00:00 2001 From: McMassiveNZ Date: Tue, 23 Jun 2026 16:07:07 +0200 Subject: [PATCH] updated the config files --- install.bat | 14 +++++++++ nvim/init.lua | 18 ++--------- nvim/lazy-lock.json | 14 --------- nvim/lua/colorschemes.lua | 23 ++++++++++++++ nvim/lua/options.lua | 56 +++++++++++++++++++++++++++++++++ nvim/lua/plugins.lua | 18 +++++++++++ nvim/lua/plugins/catppuccin.lua | 9 ------ nvim/lua/plugins/lsp-config.lua | 36 --------------------- nvim/lua/plugins/lualine.lua | 10 ------ nvim/lua/plugins/neotree.lua | 12 ------- nvim/lua/plugins/telescope.lua | 28 ----------------- nvim/lua/plugins/treesitter.lua | 20 ------------ nvim/lua/settings.lua | 9 ------ 13 files changed, 114 insertions(+), 153 deletions(-) delete mode 100644 nvim/lazy-lock.json create mode 100644 nvim/lua/colorschemes.lua create mode 100644 nvim/lua/options.lua create mode 100644 nvim/lua/plugins.lua delete mode 100644 nvim/lua/plugins/catppuccin.lua delete mode 100644 nvim/lua/plugins/lsp-config.lua delete mode 100644 nvim/lua/plugins/lualine.lua delete mode 100644 nvim/lua/plugins/neotree.lua delete mode 100644 nvim/lua/plugins/telescope.lua delete mode 100644 nvim/lua/plugins/treesitter.lua delete mode 100644 nvim/lua/settings.lua diff --git a/install.bat b/install.bat index 85d2f4d..d5ad0b0 100644 --- a/install.bat +++ b/install.bat @@ -1 +1,15 @@ +@echo off + +if "%1"=="--clean" ( + if exist "%LOCALAPPDATA%\nvim" ( + fsutil reparsepoint query "%LOCALAPPDATA%\nvim" >nul 2>&1 + if errorlevel 1 ( + echo Deleting existing nvim directory... + rmdir /s /q "%LOCALAPPDATA%\nvim" + ) else ( + echo Symlink already exists, skipping clean. + ) + ) +) + mklink /J %LOCALAPPDATA%\nvim .\nvim diff --git a/nvim/init.lua b/nvim/init.lua index 7a21467..1a9b967 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,15 +1,3 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) - -require("settings") -require("lazy").setup("plugins") +require("options") +require("plugins") +require("colorschemes") diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json deleted file mode 100644 index 5ad198c..0000000 --- a/nvim/lazy-lock.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "catppuccin": { "branch": "main", "commit": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" }, - "mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "77d9f484b88fd380386b46ed9206e5374d69d9d8" }, - "nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" }, - "nvim-lspconfig": { "branch": "master", "commit": "796394fd19fb878e8dbc4fd1e9c9c186ed07a5f4" }, - "nvim-web-devicons": { "branch": "master", "commit": "db0c864375c198cacc171ff373e76bfce2a85045" }, - "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, - "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" } -} \ No newline at end of file diff --git a/nvim/lua/colorschemes.lua b/nvim/lua/colorschemes.lua new file mode 100644 index 0000000..5b6b43c --- /dev/null +++ b/nvim/lua/colorschemes.lua @@ -0,0 +1,23 @@ +vim.pack.add({ + { + src = "https://github.com/rose-pine/neovim", + name = "rose-pine", + }, +}) +require("rose-pine").setup() + +vim.pack.add({ + { + src = "https://github.com/folke/tokyonight.nvim", + name = "tokyo-night", + }, +}) + +vim.pack.add({ + { + src = "https://github.com/rebelot/kanagawa.nvim", + name = "kanagawa", + }, +}) + +vim.cmd("colorscheme kanagawa") diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua new file mode 100644 index 0000000..3cb8615 --- /dev/null +++ b/nvim/lua/options.lua @@ -0,0 +1,56 @@ +--options +vim.opt.number = 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 = true +vim.opt.termguicolors = true +vim.opt.signcolumn = "yes" +vim.opt.updatetime = 200 +vim.opt.clipboard = "unnamedplus" + +-- search +vim.opt.ignorecase = true +vim.opt.hlsearch = true +vim.opt.incsearch = true + +-- window splits +vim.opt.splitbelow = true +vim.opt.splitright = true + +-- keep the context around the cursor when scrolling +vim.opt.scrolloff = 10 + +-- leader +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +-- keymappings +local map = vim.keymap.set + +map("n", "", "nohlsearch") + +-- window navigation +map("n", "", "h") +map("n", "", "l") +map("n", "", "j") +map("n", "", "k") + +-- move selected lines up/down in visual mode +map("v", "J", ":m '>+1gv=gv") +map("v", "K", ":m '<-2gv=gv") + +-- keep cursor centred when jumping +map("n", "", "zz") +map("n", "", "zz") +map("n", "n", "nzzzv") +map("n", "N", "Nzzzv") + +-- quickfix navigation (for build errors) +map("n", "qo", "copen") +map("n", "qc", "cclose") +map("n", "]q", "cnext") +map("n", "[q", "cprev") diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua new file mode 100644 index 0000000..f13da73 --- /dev/null +++ b/nvim/lua/plugins.lua @@ -0,0 +1,18 @@ +-- Install mini.nvim +vim.pack.add({ 'https://github.com/nvim-mini/mini.nvim' }) + +-- Fuzzy finder +require('mini.pick').setup() + +-- File explorer +require('mini.files').setup() + +-- Keymaps for the above +local map = vim.keymap.set + +map('n', '', 'Pick files') -- find file +map('n', '', 'Pick grep_live') -- live grep +map('n', '', 'Pick buffers') -- buffer list +map('n', 'fe', MiniFiles.open) -- file explorer + + diff --git a/nvim/lua/plugins/catppuccin.lua b/nvim/lua/plugins/catppuccin.lua deleted file mode 100644 index bc3460d..0000000 --- a/nvim/lua/plugins/catppuccin.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "catppuccin/nvim", - lazy = false, - name = "catppuccin", - priority = 1000, - config = function() - vim.cmd.colorscheme "catppuccin" - end -} diff --git a/nvim/lua/plugins/lsp-config.lua b/nvim/lua/plugins/lsp-config.lua deleted file mode 100644 index 8036f07..0000000 --- a/nvim/lua/plugins/lsp-config.lua +++ /dev/null @@ -1,36 +0,0 @@ -return -{ - { - "williamboman/mason.nvim", - config = function() - require("mason").setup({ - path = "append", - ui = { - icons = { - package_installed = "✓", - package_pending = "➜", - package_uninstalled = "✗" - } - } - }) - end - }, - { - "williamboman/mason-lspconfig.nvim", - config = function() - require("mason-lspconfig").setup { - ensure_installed = { "lua_ls" }, - } - end - }, - { - "neovim/nvim-lspconfig", - config = function() - local lspconfig = require("lspconfig") - lspconfig.lua_ls.setup({}) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) - vim.keymap.set({'n', 'v'}, 'ca', vim.lsp.buf.code_action, {}) - end - } -} diff --git a/nvim/lua/plugins/lualine.lua b/nvim/lua/plugins/lualine.lua deleted file mode 100644 index a2e9f59..0000000 --- a/nvim/lua/plugins/lualine.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - "nvim-lualine/lualine.nvim", - config = function() - require('lualine').setup({ - options = { - theme = 'catppuccin' - } - }) - end -} diff --git a/nvim/lua/plugins/neotree.lua b/nvim/lua/plugins/neotree.lua deleted file mode 100644 index 30302ce..0000000 --- a/nvim/lua/plugins/neotree.lua +++ /dev/null @@ -1,12 +0,0 @@ - return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function() - vim.keymap.set('n', 'p', ':Neotree filesystem reveal left', {}) - end - } diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua deleted file mode 100644 index 636ae0c..0000000 --- a/nvim/lua/plugins/telescope.lua +++ /dev/null @@ -1,28 +0,0 @@ -return { - { - 'nvim-telescope/telescope.nvim', tag = '0.1.5', - dependencies = { 'nvim-lua/plenary.nvim' }, - config = function() - local builtin = require("telescope.builtin") - vim.keymap.set('n', '', builtin.find_files, {}) - vim.keymap.set('n', '', builtin.live_grep, {}) - end - }, - { - 'nvim-telescope/telescope-ui-select.nvim', - config = function() - require("telescope").setup { - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown { - } - } - } - } - - -- To get ui-select loaded and working with telescope, you need to call - -- load_extension, somewhere after setup function: - require("telescope").load_extension("ui-select") - end - } -} diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua deleted file mode 100644 index fb40e2e..0000000 --- a/nvim/lua/plugins/treesitter.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - -- "nvim-treesitter/nvim-treesitter", - -- build = ":TSUpdate", - -- config = function() - -- local install = require("nvim-treesitter.install") - -- local configs = require("nvim-treesitter.configs") - - -- install = { - -- compilers = { clang }, - -- prefer_git = false, - -- } - - -- configs.setup({ - -- ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc", "cmake", "query" }, - -- sync_install = false, - -- highlight = { enable = true }, - -- indent = { enable = true }, - -- }) - -- end -} diff --git a/nvim/lua/settings.lua b/nvim/lua/settings.lua deleted file mode 100644 index 5002474..0000000 --- a/nvim/lua/settings.lua +++ /dev/null @@ -1,9 +0,0 @@ -vim.cmd("syntax on") -vim.cmd("set expandtab") -vim.cmd("set tabstop=4") -vim.cmd("set softtabstop=4") -vim.cmd("set shiftwidth=4") -vim.cmd("set nu") - -vim.g.mapleader = " " -