add some basic plugins and keymap

This commit is contained in:
2025-11-15 12:14:03 -05:00
parent 2c2804273c
commit 5f6a4907f3
16 changed files with 183 additions and 26 deletions

23
lua/config/clipboard.lua Normal file
View File

@@ -0,0 +1,23 @@
local function paste()
return {
vim.fn.split(vim.fn.getreg(""), "\n"),
vim.fn.getregtype(""),
}
end
vim.g.clipboard = {
name = "OSC 52",
copy = {
["+"] = require("vim.ui.clipboard.osc52").copy("+"),
["*"] = require("vim.ui.clipboard.osc52").copy("*"),
},
paste = {
["+"] = paste,
["*"] = paste,
},
}
vim.opt.clipboard:append { 'unnamed', 'unnamedplus' }

View File

@@ -1,3 +1,11 @@
local km = vim.keymap.set
--remaps
vim.g.mapleader = " "
vim.g.maplocalleader = ","
-- oil
vim.keymap.set('n', "-", "<cmd>Oil --float<CR>", { desc ="Enter file explorer (Oil)" })
vim.keymap.set('n', "w", "<cmd>w<CR>", { desc = "Save" } )
@@ -8,6 +16,12 @@ vim.keymap.set('n', "<leader>wq", "<cmd>wq<CR>", { desc = "Save and quit" } )
vim.keymap.set('n', "<leader>qq", "<cmd>q!<CR>", { desc = "Force to quit without saving" } )
-- TERMINAL
-- exit t mode
km("t", "<Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode"})
km("n", "<leader>t" , "<cmd>term<CR>", { desc = "Create a terminal" } )
-- todo: this is not robust... add autocompletion and verify that file exists
vim.keymap.set("n", "<leader>e", function()
local file_name = vim.fn.input("Open file: ")
@@ -16,11 +30,14 @@ vim.keymap.set("n", "<leader>e", function()
end
end, { desc = "edit a file"})
-- BUFFERS navigation and manipulation
vim.keymap.set("n","<leader>ls", "<cmd>ls<CR>", { desc = "list buffers" })
vim.keymap.set("n","<leader>f", "<cmd>bnext<CR>", { desc = "goto next buffers" })
vim.keymap.set("n","<leader>d", "<cmd>bprevious<CR>", { desc = "goto previous buffers" })
vim.keymap.set("n","<leader>c", "<cmd>bd<CR>", { desc = "close buffers" })
-- CUSTOM HELP FILES
vim.keymap.set("n", "<leader>h", function()
local config_path = vim.fn.stdpath('config')
local readme_path = config_path .. '/CHEATSHEET.md'

View File

@@ -18,8 +18,6 @@ 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({
@@ -34,5 +32,3 @@ require("lazy").setup({
checker = { enabled = true },
})
require("config.keymap")
require("config.options")

View File

@@ -22,5 +22,23 @@ vim.o.signcolumn = "yes"
vim.o.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
--[[
-- Set options
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.mouse = 'a'
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.hlsearch = true
vim.opt.wrap = true
vim.opt.breakindent = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.signcolumn = "yes"
vim.opt.termguicolors = true
vim.opt.updatetime = 250
vim.opt.timeoutlen = 300
vim.opt.undofile = true
vim.opt.completeopt = "menu,menuone,noselect"
]]

View File

@@ -1,14 +1,13 @@
return {
"rebelot/kanagawa.nvim", opt = {},
config = function()
require("kanagawa").setup({
compile = true,
transparent = true
});
vim.cmd("colorscheme kanagawa");
end,
build = function()
vim.cmd("KanagawaCompile"); -- this line fail at first install
end,
require("kanagawa").setup({
compile = true,
transparent = true
});
vim.cmd("colorscheme kanagawa");
end,
build = function()
vim.cmd("KanagawaCompile"); -- this line fail at first install
end,
}

View File

@@ -8,4 +8,11 @@ return {
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
lazy = false,
config = function()
require("oil").setup({
view_options = {
show_hidden = true;
},
});
end
}

10
lua/plugins/showkeys.lua Normal file
View File

@@ -0,0 +1,10 @@
return {
"nvzone/showkeys",
enabled = false,
cmd = "ShowkeysToggle",
opts = {
timeout = 1,
maxkeys = 5,
-- more opts
}
}

View File

@@ -0,0 +1,4 @@
return {
"sphamba/smear-cursor.nvim",
opts = {},
}

View File

@@ -0,0 +1,33 @@
-- treesitter
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
-- treesitter config
local config = require("nvim-treesitter.configs")
config.setup({
ignore_install = {},
ensure_installed = {
"vimdoc",
"go",
"rust",
"c",
"lua",
"python",
"html",
"css",
"javascript",
"typescript",
"sql",
"markdown",
},
highlight = {
enable = true,
},
indent = { enable = true },
modules = {},
sync_install = true,
auto_install = true,
})
end
}

19
lua/plugins/zenbone.lua Normal file
View File

@@ -0,0 +1,19 @@
return {
"zenbones-theme/zenbones.nvim",
-- Optionally install Lush. Allows for more configuration or extending the colorscheme
-- If you don't want to install lush, make sure to set g:zenbones_compat = 1
-- In Vim, compat mode is turned on as Lush only works in Neovim.
-- dependencies = "rktjmp/lush.nvim",
lazy = false,
priority = 1000,
config = function()
-- set g:zenbones_compat = 1
vim.g.zenbones_compat = 1
end
-- you can set set configuration options here
-- config = function()
-- vim.g.zenbones_darken_comments = 45
-- vim.cmd.colorscheme('zenbones')
-- end
}