From 9365a8e96827cbf7bc5adad6d29bcd05b4d761b2 Mon Sep 17 00:00:00 2001 From: bee Date: Tue, 5 May 2026 22:37:10 +0530 Subject: Migrate from nixcats to nix-wrapper-modules --- lua/config/init.lua | 4 --- lua/config/keys.lua | 35 ------------------- lua/config/lsp.lua | 92 -------------------------------------------------- lua/config/options.lua | 52 ---------------------------- 4 files changed, 183 deletions(-) delete mode 100644 lua/config/init.lua delete mode 100644 lua/config/keys.lua delete mode 100644 lua/config/lsp.lua delete mode 100644 lua/config/options.lua (limited to 'lua/config') diff --git a/lua/config/init.lua b/lua/config/init.lua deleted file mode 100644 index afc9d18..0000000 --- a/lua/config/init.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("config.options") --- require("colors.colorschemes") -require("config.keys") -require("config.lsp") diff --git a/lua/config/keys.lua b/lua/config/keys.lua deleted file mode 100644 index 518b9c1..0000000 --- a/lua/config/keys.lua +++ /dev/null @@ -1,35 +0,0 @@ -vim.keymap.set("v", "J", ":m '>+1gv=gv", { silent = true }) -vim.keymap.set("v", "K", ":m '<-2gv=gv", { silent = true }) - -vim.keymap.set("n", "J", "mzJ`z", { silent = true }) -vim.keymap.set("n", "", "zz", { silent = true }) -vim.keymap.set("n", "", "zz", { silent = true }) -vim.keymap.set("n", "n", "nzzzv", { silent = true }) -vim.keymap.set("n", "N", "Nzzzv", { silent = true }) -vim.keymap.set({ "n", "v" }, "y", [["+y]]) -vim.keymap.set({ "n", "v" }, "d", [["_d"]]) - -vim.keymap.set("n", "q:", "") -- disable that annoying cmd history buffer thingy - -vim.keymap.set("n", "", "cnextzz") -vim.keymap.set("n", "", "cprevzz") -vim.keymap.set("n", "k", "lnextzz") -vim.keymap.set("n", "j", "lprevzz") -vim.keymap.set("n", "bn", "bn") -vim.keymap.set("n", "bp", "bp") - -vim.keymap.set("n", "u", [[:%s/\<\>//gI]]) -vim.keymap.set("n", "px", "!chmod +x %") -vim.keymap.set("n", "", "nohlsearch") - -local function hover_cap(opts) - opts = vim.tbl_deep_extend("force", opts or {}, { - max_width = 100, - max_height = 25, - wrap = true, - }) - return vim.lsp.buf.hover(opts) -end - -vim.keymap.set("n", "K", hover_cap, { silent = true }) --- vim.keymap.set("n", "rn", vim.lsp.buf.rename, { desc = "Rename Symbol" }) diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua deleted file mode 100644 index ab35b80..0000000 --- a/lua/config/lsp.lua +++ /dev/null @@ -1,92 +0,0 @@ -vim.lsp.inlay_hint.enable(true) -vim.lsp.enable({ - "clangd", - "lua_ls", - "nixd", - "nil_ls", - "zls", - "pyrefly", - "marksman", - "harper", - "tinymist", - "gopls", - "tombi", - "qmlls", -}) - -vim.lsp.config("nil_ls", { - settings = { - formatting = { - command = { "nixfmt" }, - }, - }, -}) - -vim.lsp.config("lua_ls", { - settings = { - Lua = { - codeLens = { enable = true }, - hint = { - enable = false, - semicolon = "Disable", - }, - workspace = { - checkThirdParty = false, - -- IMPORTANT: Leave library empty here. - -- lazydev will inject the correct Nix store paths dynamically. - library = {}, - }, - runtime = { - version = "LuaJIT", - -- Setting this to false allows lazydev to find files - -- outside your immediate workspace (like Nix store plugins) - pathStrict = false, - }, - }, - }, -}) - -vim.lsp.config("*", { - capabilities = { textDocument = { semanticTokens = { multilineTokenSupport = true } } }, - root_markers = { ".git", ".editorconfig", "flake.nix", "shell.nix" }, -}) - -vim.diagnostic.config({ - severity_sort = true, - severity_sort_priority = { - Error = 100, - Warn = 90, - Hint = 50, - Info = 10, - }, -}) - -local RustLsp = function(mode, keymap, action, bufnr) - vim.keymap.set(mode, keymap, function() - vim.cmd.RustLsp(action) - end, { silent = true, buffer = bufnr }) -end - -vim.g.rustaceanvim = { - tools = {}, - server = { - on_attach = function(client, bufnr) - RustLsp({ "n", "x" }, "gra", "codeAction", bufnr) - RustLsp("n", "ee", "explainError", bufnr) - RustLsp("n", "K", { "hover", "actions" }, bufnr) - RustLsp("n", "L", { "hover", "range" }, bufnr) - end, - default_settings = { - ["rust-analyzer"] = { - checkOnSave = { - enable = true, - command = "clippy", - }, - procMacro = { - enable = true, - }, - }, - }, - }, - dap = {}, -} diff --git a/lua/config/options.lua b/lua/config/options.lua deleted file mode 100644 index d0e2b40..0000000 --- a/lua/config/options.lua +++ /dev/null @@ -1,52 +0,0 @@ -vim.loader.enable() -vim.g.mapleader = " " -vim.g.maplocalleader = " " -vim.o.updatetime = 1500 - -vim.o.inccommand = "split" - -vim.o.undofile = false -vim.o.undodir = vim.fn.expand("~/.local/share/nvim/undo") - -vim.o.termguicolors = true -vim.o.guicursor = "n-v-c-sm:block,ci-ve:ver25,r-cr-o:hor20" -vim.o.showmode = false -vim.o.showcmd = false -vim.o.signcolumn = "yes" -vim.o.cursorline = true --- vim.o.cursorlineopt = "number" -- Restricts the highlight ONLY to the number column --- vim.o.background = "dark" -vim.o.winborder = "single" -vim.o.conceallevel = 2 -vim.o.autoread = true - -vim.o.nu = true -vim.o.relativenumber = true - -vim.o.mouse = "" -vim.o.scrolloff = 21 -vim.g.loaded_netrwPlugin = 1 -vim.g.loaded_netrw = 1 - -vim.o.expandtab = true -vim.o.tabstop = 4 -vim.o.softtabstop = 4 -vim.o.shiftwidth = 4 -vim.o.smartindent = false -vim.o.smarttab = true -vim.o.breakindent = true -vim.o.autoindent = true - -vim.o.wrap = false -vim.o.linebreak = false - -vim.o.hlsearch = true -vim.o.incsearch = true - -vim.o.title = true -vim.o.swapfile = false - -vim.o.foldlevel = 99 -vim.o.foldlevelstart = 99 -vim.o.foldenable = true -vim.o.foldmethod = "expr" -- cgit v1.3.1