From 0f4e7e23239e94e5c40230eb4b2d0b2f013347db Mon Sep 17 00:00:00 2001 From: Philippe Zwietering Date: Tue, 13 Jan 2026 22:47:18 +0100 Subject: [PATCH] Removing all the old junk --- lua/flip/init.lua | 3 - lua/flip/lazy.lua | 27 -------- lua/flip/remap.lua | 71 --------------------- lua/flip/set.lua | 35 ----------- lua/plugins/colors.lua | 27 -------- lua/plugins/harpoon.lua | 15 ----- lua/plugins/init.lua | 8 --- lua/plugins/lsp.lua | 116 ----------------------------------- lua/plugins/telescope.lua | 29 --------- lua/plugins/treesitter.lua | 37 ----------- lua/plugins/undotree.lua | 7 --- lua/plugins/vim-fugitive.lua | 6 -- 12 files changed, 381 deletions(-) delete mode 100644 lua/flip/init.lua delete mode 100644 lua/flip/lazy.lua delete mode 100644 lua/flip/remap.lua delete mode 100644 lua/flip/set.lua delete mode 100644 lua/plugins/colors.lua delete mode 100644 lua/plugins/harpoon.lua delete mode 100644 lua/plugins/init.lua delete mode 100644 lua/plugins/lsp.lua delete mode 100644 lua/plugins/telescope.lua delete mode 100644 lua/plugins/treesitter.lua delete mode 100644 lua/plugins/undotree.lua delete mode 100644 lua/plugins/vim-fugitive.lua diff --git a/lua/flip/init.lua b/lua/flip/init.lua deleted file mode 100644 index a3d288f..0000000 --- a/lua/flip/init.lua +++ /dev/null @@ -1,3 +0,0 @@ -require("flip.remap") -require("flip.set") -require("flip.lazy") diff --git a/lua/flip/lazy.lua b/lua/flip/lazy.lua deleted file mode 100644 index 6f520e4..0000000 --- a/lua/flip/lazy.lua +++ /dev/null @@ -1,27 +0,0 @@ --- 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) - - --- Setup lazy.nvim -require("lazy").setup({ - spec = "plugins", - change_detection = { notify = false }, - -- Configure any other settings here. See documentation for details - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, -}) diff --git a/lua/flip/remap.lua b/lua/flip/remap.lua deleted file mode 100644 index ba36398..0000000 --- a/lua/flip/remap.lua +++ /dev/null @@ -1,71 +0,0 @@ --- Leader is space now -vim.g.mapleader = " " --- Project View instead of :Ex -vim.keymap.set("n", "pv", vim.cmd.Ex) - --- Easily move up and down -vim.keymap.set("v", "J", ":m '>+1gv=gv") -vim.keymap.set("v", "K", ":m '<-2gv=gv") - --- Slide lines below into the current one -vim.keymap.set("n", "J", "mzJ`z") - ---- LSP settings --- --- Show hover text of symbol -vim.keymap.set("n", "K", vim.lsp.buf.hover) - --- Go to definition of symbol -vim.keymap.set("n", "gd", vim.lsp.buf.definition) - --- Go to declaration of symbol -vim.keymap.set("n", "gD", vim.lsp.buf.declaration) - --- List all implementations for symbol in quickfix window -vim.keymap.set("n", "gi", vim.lsp.buf.implementation) - --- Go to definition of type of symbol -vim.keymap.set("n", "go", vim.lsp.buf.type_definition) - --- Go to references of symbol -vim.keymap.set("n", "gr", vim.lsp.buf.references) - --- Select code action at symbol -vim.keymap.set("n", "ca", vim.lsp.buf.code_action) - --- Auto formatting -vim.keymap.set("n", "f", vim.lsp.buf.format) - --- Display type signature -vim.keymap.set("n", "gs", vim.lsp.buf.signature_help) - ---- End of LSP setings --- - --- Greatest remap ever --- Delete visual selection to null and paste latest clipboard entry -vim.keymap.set("x", "p", [["_dP]]) - --- Next greatest remap ever : asbjornHaland --- Copy selection and line respectively to system clipboard -vim.keymap.set({ "n", "v" }, "y", [["+y]]) -vim.keymap.set("n", "Y", [["+Y]]) - --- Delete to null -vim.keymap.set({ "n", "v" }, "d", [["_d]]) - --- Make next and previous a bit smoother -vim.keymap.set("n", "n", "nzzzv") -vim.keymap.set("n", "N", "Nzzzv") - --- Jump to next and previous error -vim.keymap.set("n", "", "cnextzz") -vim.keymap.set("n", "", "cprevzz") - --- Jump to next and previous item in location list -vim.keymap.set("n", "k", "lnextzz") -vim.keymap.set("n", "j", "lprevzz") - --- Substitute word under cursor -vim.keymap.set("n", "s", [[:%s/\<\>//gI]]) - --- Make current file executable -vim.keymap.set("n", "x", "!chmod +x %", { silent = true }) diff --git a/lua/flip/set.lua b/lua/flip/set.lua deleted file mode 100644 index c6cab5e..0000000 --- a/lua/flip/set.lua +++ /dev/null @@ -1,35 +0,0 @@ --- Setting line numbers -vim.opt.nu = true -vim.opt.relativenumber = true - --- Setting tabs correctly -vim.opt.tabstop = 4 -vim.opt.softtabstop = 4 -vim.opt.shiftwidth = 4 -vim.opt.expandtab = true - -vim.opt.smartindent = true - --- Setting backup / undo stuff -vim.opt.swapfile = false -vim.opt.backup = false -vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" -vim.opt.undofile = true - --- Search highlighting -vim.opt.hlsearch = false -vim.opt.incsearch = true - --- Colouring -vim.opt.termguicolors = true - --- Scrolling stuff -vim.opt.scrolloff = 20 -vim.opt.signcolumn = "yes" -vim.opt.isfname:append("@-@") - --- Update time -vim.opt.updatetime = 50 - -vim.opt.colorcolumn = "120" - diff --git a/lua/plugins/colors.lua b/lua/plugins/colors.lua deleted file mode 100644 index 3b44a87..0000000 --- a/lua/plugins/colors.lua +++ /dev/null @@ -1,27 +0,0 @@ -function ColorMyPencils(color) - color = color or "nightfox" - vim.cmd.colorscheme(color) - - vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) - vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) -end - -vim.keymap.set("n", "c", function() ColorMyPencils() end) -vim.opt.termguicolors = true - -return { - "EdenEast/nightfox.nvim", - name = "nightfox", - lazy = false, - options = { - colorblind = { - enable = true, - severity = { - protan = 1, - }, - }, - }, - config = function() - ColorMyPencils() - end -} diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua deleted file mode 100644 index 0ec521e..0000000 --- a/lua/plugins/harpoon.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - "theprimeagen/harpoon", - - config = function() - local mark = require("harpoon.mark") - local ui = require("harpoon.ui") - - vim.keymap.set("n", "a", mark.add_file) - vim.keymap.set("n", "", ui.toggle_quick_menu) - vim.keymap.set("n", "1", function() ui.nav_file(1) end) - vim.keymap.set("n", "2", function() ui.nav_file(2) end) - vim.keymap.set("n", "3", function() ui.nav_file(3) end) - vim.keymap.set("n", "4", function() ui.nav_file(4) end) - end -} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua deleted file mode 100644 index 23a62fe..0000000 --- a/lua/plugins/init.lua +++ /dev/null @@ -1,8 +0,0 @@ --- Load prerequisites for plugins here - -return { - { - "nvim-lua/plenary.nvim", - name = "plenary" - } -} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua deleted file mode 100644 index b5b2a11..0000000 --- a/lua/plugins/lsp.lua +++ /dev/null @@ -1,116 +0,0 @@ -return { - "neovim/nvim-lspconfig", - dependencies = { - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - "hrsh7th/nvim-cmp", - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip", - "j-hui/fidget.nvim", - }, - - config = function() - local cmp = require('cmp') - local cmp_lsp = require("cmp_nvim_lsp") - local capabilities = vim.tbl_deep_extend( - "force", - {}, - vim.lsp.protocol.make_client_capabilities(), - cmp_lsp.default_capabilities()) - - require("fidget").setup({}) - require("mason").setup() - require("mason-lspconfig").setup({ - ensure_installed = { - "clangd", - "lua_ls", - "rust_analyzer", - }, - handlers = { - function(server_name) -- default handler (optional) - require("lspconfig")[server_name].setup { - capabilities = capabilities - } - end, - - zls = function() - local lspconfig = require("lspconfig") - lspconfig.zls.setup({ - root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"), - settings = { - zls = { - enable_inlay_hints = true, - enable_snippets = true, - warn_style = true, - }, - }, - }) - vim.g.zig_fmt_parse_errors = 0 - vim.g.zig_fmt_autosave = 0 - end, - ["lua_ls"] = function() - local lspconfig = require("lspconfig") - lspconfig.lua_ls.setup { - capabilities = capabilities, - settings = { - Lua = { - runtime = { version = "Lua 5.1" }, - diagnostics = { - globals = { "bit", "vim", "it", "describe", "before_each", "after_each" }, - } - } - } - } - end, - } - }) - - local cmp_select = { behavior = cmp.SelectBehavior.Select } - - cmp.setup({ - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) -- For `luasnip` users. - end, - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.select_prev_item(cmp_select), - [''] = cmp.mapping.select_next_item(cmp_select), - [''] = cmp.mapping.confirm({ select = true }), - [""] = cmp.mapping.complete(), - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'luasnip' }, -- For luasnip users. - }, { - { name = 'buffer' }, - }) - }) - - local _border = 'rounded' - - vim.diagnostic.config({ - -- update_in_insert = true, - float = { - focusable = false, - style = "minimal", - border = _border, - source = "always", - header = "", - prefix = "", - }, - }) - - vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( - vim.lsp.handlers.hover, { border = _border } - ) - vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( - vim.lsp.handlers.signature_help, { border = _border } - ) - require('lspconfig.ui.windows').default_options = { border = _border } - end -} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua deleted file mode 100644 index 93b76ac..0000000 --- a/lua/plugins/telescope.lua +++ /dev/null @@ -1,29 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - - tag = "0.1.8", - - dependencies = { - "nvim-lua/plenary.nvim" - }, - - config = function() - require('telescope').setup({}) - - local builtin = require('telescope.builtin') - vim.keymap.set('n', 'pf', builtin.find_files, {}) - vim.keymap.set('n', '', builtin.git_files, {}) - vim.keymap.set('n', 'pws', function() - local word = vim.fn.expand("") - builtin.grep_string({ search = word }) - end) - vim.keymap.set('n', 'pWs', function() - local word = vim.fn.expand("") - builtin.grep_string({ search = word }) - end) - vim.keymap.set('n', 'ps', function() - builtin.grep_string({ search = vim.fn.input("Grep > ") }) - end) - vim.keymap.set('n', 'vh', builtin.help_tags, {}) - end -} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua deleted file mode 100644 index cb15dba..0000000 --- a/lua/plugins/treesitter.lua +++ /dev/null @@ -1,37 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter", - build = function() - require("nvim-treesitter.install").update({ with_sync = true })() - end, - config = function() - require("nvim-treesitter.configs").setup({ - -- List of parsers - ensure_installed = { - "vimdoc", "vim", "lua", "c", "rust", "cpp", "cmake", "latex", "python", "groovy", "bash", "zig", "go", - }, - - sync_install = false, - auto_install = true, - - indent = { - enable = true - }, - - highlight = { - enable = true, - additional_vim_regex_highlighting = { "markdown" }, - }, - }) - - local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs() - treesitter_parser_config.templ = { - install_info = { - url = "https://github.com/vrischmann/tree-sitter-templ.git", - files = { "src/parser.c", "src/scanner.c" }, - branch = "master", - }, - } - - vim.treesitter.language.register("templ", "templ") - end -} diff --git a/lua/plugins/undotree.lua b/lua/plugins/undotree.lua deleted file mode 100644 index 5a3f1c5..0000000 --- a/lua/plugins/undotree.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "mbbill/undotree", - - config = function() - vim.keymap.set("n", "u", vim.cmd.UndoTreeToggle) - end -} diff --git a/lua/plugins/vim-fugitive.lua b/lua/plugins/vim-fugitive.lua deleted file mode 100644 index a5b5b04..0000000 --- a/lua/plugins/vim-fugitive.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - "tpope/vim-fugitive", - config = function() - vim.keymap.set("n", "gs", vim.cmd.Git) - end -}