diff --git a/.config/nvim/after/plugin/colors.lua b/.config/nvim/after/plugin/colors.lua deleted file mode 100755 index 38d7083..0000000 --- a/.config/nvim/after/plugin/colors.lua +++ /dev/null @@ -1,9 +0,0 @@ -function Colors(color) - color = color or "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 - -Colors() diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua old mode 100755 new mode 100644 diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 4253875..200b2f4 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,20 +1,13 @@ { - "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, - "autoclose.nvim": { "branch": "main", "commit": "b2077aa2c83df7ebc19b2a20a3a0654b24ae9c8f" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "bf94626f32fbc3c9987ce2f4aab60d96866587df" }, + "conform.nvim": { "branch": "master", "commit": "f8d743ce333bedc47821de2cd4d23c43856ecbe5" }, "fidget.nvim": { "branch": "main", "commit": "a0abbf18084b77d28bc70e24752e4f4fd54aea17" }, - "harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" }, "lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "e942edf5c85b6a2ab74059ea566cac5b3e1514a4" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "neovim": { "branch": "main", "commit": "42f0724e0bca9f57f0bcfa688787c37b8d4befe8" }, - "nvim-cmp": { "branch": "main", "commit": "8c82d0bd31299dbff7f8e780f5e06d2283de9678" }, + "mini.nvim": { "branch": "main", "commit": "4446e834c30c799627d65691c73d59638e5c965f" }, "nvim-lspconfig": { "branch": "master", "commit": "513f4f0bde469ecb3abe2e1b606f63cf142e751e" }, - "nvim-treesitter": { "branch": "master", "commit": "4862ab0aca21e92771b72e2d7e70424b250f0dd4" }, - "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, + "nvim-treesitter": { "branch": "master", "commit": "6587a5886873cce8698a47477224c30578b33a24" }, "plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" }, + "rose-pine": { "branch": "main", "commit": "42f0724e0bca9f57f0bcfa688787c37b8d4befe8" }, "telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" } } diff --git a/.config/nvim/lua/rocketcamel/config/lazy.lua b/.config/nvim/lua/rocketcamel/config/lazy.lua old mode 100755 new mode 100644 index 7c852d5..ecbce9f --- a/.config/nvim/lua/rocketcamel/config/lazy.lua +++ b/.config/nvim/lua/rocketcamel/config/lazy.lua @@ -1,17 +1,17 @@ -- 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 + 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) @@ -19,11 +19,13 @@ vim.opt.rtp:prepend(lazypath) -- loading lazy.nvim so that mappings are correct. -- This is also a good place to setup other settings (vim.opt) vim.g.mapleader = " " +vim.g.maplocalleader = "\\" -- Setup lazy.nvim require("lazy").setup({ spec = { - { import = "rocketcamel.plugins" } + -- import your plugins + { import = "rocketcamel.plugins" }, }, -- Configure any other settings here. See the documentation for more details. -- colorscheme that will be used when installing plugins. diff --git a/.config/nvim/lua/rocketcamel/init.lua b/.config/nvim/lua/rocketcamel/init.lua old mode 100755 new mode 100644 diff --git a/.config/nvim/lua/rocketcamel/plugins/conform.lua b/.config/nvim/lua/rocketcamel/plugins/conform.lua new file mode 100644 index 0000000..fe74641 --- /dev/null +++ b/.config/nvim/lua/rocketcamel/plugins/conform.lua @@ -0,0 +1,20 @@ +return { + { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + lua = { "stylua" }, + rust = { "rustfmt", lsp_format = "fallback" }, + javascript = { "prettier" }, + typescript = { "prettier" }, + json = { "prettier" }, + tsx = { "prettier" }, + }, + format_on_save = { + -- These options will be passed to conform.format() + timeout_ms = 500, + lsp_format = "fallback", + }, + }, + }, +} diff --git a/.config/nvim/lua/rocketcamel/plugins/init.lua b/.config/nvim/lua/rocketcamel/plugins/init.lua deleted file mode 100755 index e919829..0000000 --- a/.config/nvim/lua/rocketcamel/plugins/init.lua +++ /dev/null @@ -1,193 +0,0 @@ -return { - { - "nvim-telescope/telescope.nvim", - config = function() - local builtin = require("telescope.builtin") - vim.keymap.set("n", "pf", builtin.find_files, {}) - vim.keymap.set("n", "", builtin.git_files, {}) - vim.keymap.set("n", "ps", function() - builtin.grep_string({ search = vim.fn.input("Grep > ") }) - end) - end, - }, - { - "nvim-treesitter/nvim-treesitter", - opts = { - ensure_installed = { - "c", - "lua", - "vim", - "vimdoc", - "query", - "markdown", - "markdown_inline", - "javascript", - "typescript", - "tsx", - "rust", - "zig", - }, - sync_install = true, - auto_install = true, - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - indent = { - enable = true, - }, - }, - }, - { - "neovim/nvim-lspconfig", - dependencies = { - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/nvim-cmp", - "j-hui/fidget.nvim", - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip", - "hrsh7th/cmp-nvim-lsp-signature-help", - }, - config = function() - require("fidget").setup({}) - require("mason").setup() - local capabilities = require("cmp_nvim_lsp").default_capabilities() - require("mason-lspconfig").setup({ - ensure_installed = { - "ts_ls", - "lua_ls", - "rust_analyzer", - }, - handlers = { - function(server) - require("lspconfig")[server].setup({ capabilities = capabilities }) - end, - }, - }) - - local cmp = require("cmp") - - cmp.setup({ - preselect = "item", - completion = { - completeopt = "menu,menuone,noinsert" - }, - snippet = { - -- REQUIRED - you must specify a snippet engine - expand = function(args) - require("luasnip").lsp_expand(args.body) -- For `luasnip` users. - end, - }, - - mapping = cmp.mapping.preset.insert({ - -- Simple tab complete - [""] = cmp.mapping(function(fallback) - local col = vim.fn.col(".") - 1 - - if cmp.visible() then - cmp.select_next_item({ behavior = "select" }) - elseif col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then - fallback() - else - cmp.complete() - end - end, { "i", "s" }), - - -- Go to previous item - [""] = cmp.mapping.select_prev_item({ behavior = "select" }), - [""] = cmp.mapping.confirm({ select = false }), - }), - - sources = cmp.config.sources({ - { name = "nvim_lsp" }, - { name = "nvim_lsp_signature_help" }, - }, { - { name = "buffer" }, - }), - }) - end, - }, - { - "stevearc/conform.nvim", - opts = { - formatters_by_ft = { - lua = { "stylua" }, - rust = { "rustfmt", lsp_format = "fallback" }, - javascript = { "prettier" }, - typescript = { "prettier" }, - json = { "prettier" }, - tsx = { "prettier" }, - }, - format_on_save = { - -- These options will be passed to conform.format() - timeout_ms = 500, - lsp_format = "fallback", - }, - }, - }, - { - "ThePrimeagen/harpoon", - branch = "harpoon2", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - local harpoon = require("harpoon") - harpoon:setup() - vim.keymap.set("n", "a", function() - harpoon:list():add() - end) - vim.keymap.set("n", "", function() - harpoon.ui:toggle_quick_menu(harpoon:list()) - end) - - vim.keymap.set("n", "", function() - harpoon:list():select(1) - end) - vim.keymap.set("n", "", function() - harpoon:list():select(2) - end) - vim.keymap.set("n", "", function() - harpoon:list():select(3) - end) - vim.keymap.set("n", "", function() - harpoon:list():select(4) - end) - - -- Toggle previous & next buffers stored within Harpoon list - vim.keymap.set("n", "", function() - harpoon:list():prev() - end) - vim.keymap.set("n", "", function() - harpoon:list():next() - end) - end, - }, - { - "m4xshen/autoclose.nvim", - opts = { - keys = { - ["("] = { escape = false, close = true, pair = "()" }, - ["["] = { escape = false, close = true, pair = "[]" }, - ["{"] = { escape = false, close = true, pair = "{}" }, - - [">"] = { escape = true, close = false, pair = "<>" }, - [")"] = { escape = true, close = false, pair = "()" }, - ["]"] = { escape = true, close = false, pair = "[]" }, - ["}"] = { escape = true, close = false, pair = "{}" }, - - ['"'] = { escape = true, close = true, pair = '""' }, - ["'"] = { escape = true, close = true, pair = "''" }, - ["`"] = { escape = true, close = true, pair = "``" }, - }, - options = { - disabled_filetypes = { "text", "TelescopePrompt" }, - disable_when_touch = false, - touch_regex = "[%w(%[{]", - pair_spaces = false, - auto_indent = true, - disable_command_mode = false, - }, - }, - }, -} diff --git a/.config/nvim/lua/rocketcamel/plugins/lsp.lua b/.config/nvim/lua/rocketcamel/plugins/lsp.lua new file mode 100644 index 0000000..452fa8e --- /dev/null +++ b/.config/nvim/lua/rocketcamel/plugins/lsp.lua @@ -0,0 +1,26 @@ +return { + { + "neovim/nvim-lspconfig", + dependencies = { + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + "j-hui/fidget.nvim", + }, + config = function() + require("mason").setup() + require("fidget").setup() + require("mason-lspconfig").setup({ + ensure_installed = { + "ts_ls", + "lua_ls", + "rust_analyzer", + }, + handlers = { + function(server) + require("lspconfig")[server].setup({}) + end, + }, + }) + end, + }, +} diff --git a/.config/nvim/lua/rocketcamel/plugins/mini.lua b/.config/nvim/lua/rocketcamel/plugins/mini.lua new file mode 100644 index 0000000..798e80c --- /dev/null +++ b/.config/nvim/lua/rocketcamel/plugins/mini.lua @@ -0,0 +1,11 @@ +return { + { + "echasnovski/mini.nvim", + version = false, + config = function() + require("mini.completion").setup() + require("mini.fuzzy").setup() + require("mini.pairs").setup() + end, + }, +} diff --git a/.config/nvim/lua/rocketcamel/plugins/nvim-ts-autotag.lua b/.config/nvim/lua/rocketcamel/plugins/nvim-ts-autotag.lua deleted file mode 100755 index 08527ab..0000000 --- a/.config/nvim/lua/rocketcamel/plugins/nvim-ts-autotag.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - "windwp/nvim-ts-autotag", - lazy = false, - config = function() - require("nvim-ts-autotag").setup({ - opts = { - enable_close = true, - enable_rename = true, - enable_close_on_slash = false - } - }) - end - -- opts = { - -- per_filetype = { - -- "html", - -- "javascript", - -- "javascriptreact", - -- "typescript", - -- "typescriptreact", - -- } - --} -} diff --git a/.config/nvim/lua/rocketcamel/plugins/rose-pine.lua b/.config/nvim/lua/rocketcamel/plugins/rose-pine.lua old mode 100755 new mode 100644 index 09f203e..6bf228f --- a/.config/nvim/lua/rocketcamel/plugins/rose-pine.lua +++ b/.config/nvim/lua/rocketcamel/plugins/rose-pine.lua @@ -1,6 +1,14 @@ return { - "rose-pine/neovim", - config = function() - vim.cmd("colorscheme rose-pine") - end, + { + "rose-pine/neovim", + name = "rose-pine", + config = function() + require("rose-pine").setup({ + styles = { + transparency = true, + }, + }) + vim.cmd("colorscheme rose-pine") + end, + }, } diff --git a/.config/nvim/lua/rocketcamel/plugins/telescope.lua b/.config/nvim/lua/rocketcamel/plugins/telescope.lua new file mode 100644 index 0000000..8c82d4c --- /dev/null +++ b/.config/nvim/lua/rocketcamel/plugins/telescope.lua @@ -0,0 +1,13 @@ +return { + { + "nvim-telescope/telescope.nvim", + config = function() + local builtin = require("telescope.builtin") + vim.keymap.set("n", "pf", builtin.find_files, {}) + vim.keymap.set("n", "", builtin.git_files, {}) + vim.keymap.set("n", "ps", function() + builtin.grep_string({ search = vim.fn.input("Grep > ") }) + end) + end, + }, +} diff --git a/.config/nvim/lua/rocketcamel/plugins/treesitter.lua b/.config/nvim/lua/rocketcamel/plugins/treesitter.lua new file mode 100644 index 0000000..43ce6c1 --- /dev/null +++ b/.config/nvim/lua/rocketcamel/plugins/treesitter.lua @@ -0,0 +1,30 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "c", + "lua", + "vim", + "vimdoc", + "query", + "markdown", + "markdown_inline", + "javascript", + "typescript", + "tsx", + "rust", + "zig", + }, + sync_install = true, + auto_install = true, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + indent = { + enable = true, + }, + }, + }, +} diff --git a/.config/nvim/lua/rocketcamel/remap.lua b/.config/nvim/lua/rocketcamel/remap.lua old mode 100755 new mode 100644 diff --git a/.config/nvim/lua/rocketcamel/set.lua b/.config/nvim/lua/rocketcamel/set.lua old mode 100755 new mode 100644 diff --git a/nix/modules/commonPackages.nix b/nix/modules/commonPackages.nix index 2e38b8f..70a54f0 100644 --- a/nix/modules/commonPackages.nix +++ b/nix/modules/commonPackages.nix @@ -16,6 +16,8 @@ neovim ripgrep git + gcc + rustup ]; config.programs.nix-ld.enable = true; }