clean up nvim config

This commit is contained in:
2025-10-18 02:06:28 -03:00
parent 77dc9a8732
commit ffcadcce9b
7 changed files with 103 additions and 142 deletions

View File

@@ -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 },
})

View File

@@ -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', '<CR>', 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", "<C-n>", ":NvimTreeToggle<CR>", { 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", "<leader>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,
}
}

View File

@@ -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", "<leader>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",
},
}

View File

@@ -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"),
}

46
nvim/lua/plugins/ui.lua Normal file
View File

@@ -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', '<CR>', 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", "<C-n>", ":NvimTreeToggle<CR>", { 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,
}
}