From ffcadcce9b2b6d2e93a1ff9d1b2bfcf480201f8d Mon Sep 17 00:00:00 2001 From: caiowakamatsu Date: Sat, 18 Oct 2025 02:06:28 -0300 Subject: [PATCH] clean up nvim config --- kitty/kitty.conf | 2 +- nvim/lazy-lock.json | 7 +- nvim/lua/config/lazy.lua | 13 +--- nvim/lua/plugins/base.lua | 127 ------------------------------------ nvim/lua/plugins/coding.lua | 34 ++++++++++ nvim/lua/plugins/colors.lua | 16 +++++ nvim/lua/plugins/ui.lua | 46 +++++++++++++ 7 files changed, 103 insertions(+), 142 deletions(-) delete mode 100644 nvim/lua/plugins/base.lua create mode 100644 nvim/lua/plugins/coding.lua create mode 100644 nvim/lua/plugins/colors.lua create mode 100644 nvim/lua/plugins/ui.lua diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 4645fc6..2b5277c 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -1,2 +1,2 @@ -background_opacity 0.9 +background_opacity 0.8 background_blur 32 diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 024db5b..4b39e35 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,9 +1,9 @@ { - "LuaSnip": { "branch": "master", "commit": "21e9fecfc07fb2cd707b6c7c3fa148550a34d053" }, + "LuaSnip": { "branch": "master", "commit": "f958d9837c8fa7816bb8fb54977e658affc63c31" }, "cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" }, - "lualine.nvim": { "branch": "master", "commit": "e533fac71bc361768f90004af695cd1f1aa1900a" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" }, "monochrome.nvim": { "branch": "main", "commit": "2de78d9688ea4a177bcd9be554ab9192337d35ff" }, "nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" }, "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, @@ -17,6 +17,5 @@ "smear-cursor.nvim": { "branch": "main", "commit": "abfa5835920b1d76c0e24e1465a618ad914be90a" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "tokyodark.nvim": { "branch": "master", "commit": "cc70a2fb809d5376f2bd8e5836f9bb3f5fb8ef43" }, - "tokyonight.nvim": { "branch": "main", "commit": "d14614cbfc63b6037bfccd48bb982d2ad2003352" }, "transparent.nvim": { "branch": "main", "commit": "8ac59883de84e9cd1850ea25cf087031c5ba7d54" } } diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua index f5ee74c..46b6dba 100644 --- a/nvim/lua/config/lazy.lua +++ b/nvim/lua/config/lazy.lua @@ -1,4 +1,3 @@ --- 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" @@ -15,21 +14,15 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then 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) vim.g.mapleader = " " vim.g.maplocalleader = "\\" --- Setup lazy.nvim require("lazy").setup({ spec = { - -- import your plugins - { import = "plugins" }, + { import = "plugins.coding" }, + { import = "plugins.colors" }, + { import = "plugins.ui" }, }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates checker = { enabled = true }, }) diff --git a/nvim/lua/plugins/base.lua b/nvim/lua/plugins/base.lua deleted file mode 100644 index 73ac15e..0000000 --- a/nvim/lua/plugins/base.lua +++ /dev/null @@ -1,127 +0,0 @@ -return { - { - "sphamba/smear-cursor.nvim", - opts = {}, - }, - - { - "xiyaowong/transparent.nvim", - lazy = false, - }, - - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - config = function() - -- load the colorscheme here - -- vim.cmd([[colorscheme tokyonight]]) - end, - }, - - { - "nyoom-engineering/oxocarbon.nvim", - lazy = false, - priority = 1001, - config = function() - --vim.opt.background = "light" - --vim.cmd([[colorscheme oxocarbon]]) - end, - }, - - { - "tiagovla/tokyodark.nvim", - opts = { - -- custom options here - }, - config = function(_, opts) - require("tokyodark").setup(opts) -- calling setup is optional - vim.cmd [[colorscheme tokyodark]] - end, - }, - - { - "kdheepak/monochrome.nvim", - lazy = false, - priority = 1002, - config = function() --- vim.cmd([[colorscheme monochrome]]) - end, - }, - - { - "nvim-treesitter/nvim-treesitter", - branch = 'master', - lazy = false, - build = ":TSUpdate", - }, - - { - "nvim-tree/nvim-tree.lua", - dependencies = { "nvim-tree/nvim-web-devicons" }, - config = function() - require("nvim-tree").setup({ - on_attach = function(bufnr) - local api = require("nvim-tree.api") - - api.config.mappings.default_on_attach(bufnr) - vim.keymap.set('n', '', function() - local node = api.tree.get_node_under_cursor() - api.node.open.edit() - - if not node or node.nodes == nil then - api.tree.close() - end - - end, { buffer = bufnr, noremap = true, silent = true }) - end, - }) - - vim.keymap.set("n", "", ":NvimTreeToggle", { noremap = true, silent = true }) - end, - }, - - { - "nvim-telescope/telescope.nvim", - tag = "0.1.8", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - local builtin = require('telescope.builtin') - vim.keymap.set("n", "f", builtin.find_files, { desc = "Telescope find files" }) - end, - }, - - { - "nvim-lualine/lualine.nvim", - config = function() - require("lualine").setup() - end, - }, - - { - "windwp/nvim-autopairs", - config = function() - require("nvim-autopairs").setup() - end, - }, - - { - "neovim/nvim-lspconfig", - }, - - { - "hrsh7th/nvim-cmp", - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip", - }, - }, - - { - "rcarriga/nvim-notify", - config = function() - vim.notify = require("notify") - end, - } -} diff --git a/nvim/lua/plugins/coding.lua b/nvim/lua/plugins/coding.lua new file mode 100644 index 0000000..65387dc --- /dev/null +++ b/nvim/lua/plugins/coding.lua @@ -0,0 +1,34 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + branch = 'master', + lazy = false, + build = ":TSUpdate", + }, + { + "nvim-telescope/telescope.nvim", + tag = "0.1.8", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + local builtin = require('telescope.builtin') + vim.keymap.set("n", "f", builtin.find_files, { desc = "Telescope find files" }) + end, + }, + { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + }, + }, + { + "windwp/nvim-autopairs", + config = function() + require("nvim-autopairs").setup() + end, + }, + { + "neovim/nvim-lspconfig", + }, +} diff --git a/nvim/lua/plugins/colors.lua b/nvim/lua/plugins/colors.lua new file mode 100644 index 0000000..462cb79 --- /dev/null +++ b/nvim/lua/plugins/colors.lua @@ -0,0 +1,16 @@ +function theme(repo, opts) + opts = opts or {} + + local theme = { + repo, + lazy = false, + } + + return theme +end + +return { + theme("nyoom-engineering/oxocarbon.nvim"), + theme("tiagovla/tokyodark.nvim"), + theme("kdheepak/monochrome.nvim"), +} diff --git a/nvim/lua/plugins/ui.lua b/nvim/lua/plugins/ui.lua new file mode 100644 index 0000000..69d5648 --- /dev/null +++ b/nvim/lua/plugins/ui.lua @@ -0,0 +1,46 @@ +return { + { + "xiyaowong/transparent.nvim", + lazy = false, + }, + { + "sphamba/smear-cursor.nvim", + opts = {}, + }, + { + "nvim-tree/nvim-tree.lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("nvim-tree").setup({ + on_attach = function(bufnr) + local api = require("nvim-tree.api") + + api.config.mappings.default_on_attach(bufnr) + vim.keymap.set('n', '', function() + local node = api.tree.get_node_under_cursor() + api.node.open.edit() + + if not node or node.nodes == nil then + api.tree.close() + end + + end, { buffer = bufnr, noremap = true, silent = true }) + end, + }) + + vim.keymap.set("n", "", ":NvimTreeToggle", { noremap = true, silent = true }) + end, + }, + { + "nvim-lualine/lualine.nvim", + config = function() + require("lualine").setup() + end, + }, + { + "rcarriga/nvim-notify", + config = function() + vim.notify = require("notify") + end, + } +}