some changes

This commit is contained in:
pika 2024-07-05 22:41:44 +02:00
parent 872a98a430
commit bf7bdf0060
6 changed files with 108 additions and 134 deletions

View file

@ -85,6 +85,9 @@ map("v", "<leader>cC", "<Cmd>CBclbox14<CR>", { noremap = true, silent = true, de
map("n", "<leader>cl", "<Cmd>CBllline8<CR>", { noremap = true, silent = true, desc = "[c]reate comment [l]ine" }) map("n", "<leader>cl", "<Cmd>CBllline8<CR>", { noremap = true, silent = true, desc = "[c]reate comment [l]ine" })
map("n", "<leader>cL", "<Cmd>CBlcline8<CR>", { noremap = true, silent = true, desc = "[c]reate comment [L]ine" }) map("n", "<leader>cL", "<Cmd>CBlcline8<CR>", { noremap = true, silent = true, desc = "[c]reate comment [L]ine" })
-- ─< rename word under cursor >───────────────────────────────────────────────────────────
map("n", "<leader>R", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
-- ─< LoremIpsum generator >──────────────────────────────────────────────────────────── -- ─< LoremIpsum generator >────────────────────────────────────────────────────────────
map("n", "<leader>L", ":LoremIpsum ") map("n", "<leader>L", ":LoremIpsum ")

View file

@ -1,4 +1,4 @@
vim.cmd 'let g:netrw_liststyle = 3' vim.cmd("let g:netrw_liststyle = 3")
local o = vim.opt local o = vim.opt
@ -15,7 +15,7 @@ o.softtabstop = 2
o.expandtab = true -- expand tab to spaces o.expandtab = true -- expand tab to spaces
o.autoindent = true -- copy indent from current line when starting new one o.autoindent = true -- copy indent from current line when starting new one
o.mouse = 'a' o.mouse = "a"
o.wrap = false o.wrap = false
-- search settings -- search settings
@ -30,14 +30,14 @@ o.showmode = false
-- turn on termguicolors for tokyonight colorscheme to work -- turn on termguicolors for tokyonight colorscheme to work
-- (have to use iterm2 or any other true color terminal) -- (have to use iterm2 or any other true color terminal)
o.termguicolors = true o.termguicolors = true
o.background = 'dark' -- colorschemes that can be light or dark will be made dark o.background = "dark" -- colorschemes that can be light or dark will be made dark
o.signcolumn = 'yes' -- show sign column so that text doesn't shift o.signcolumn = "yes" -- show sign column so that text doesn't shift
-- backspace -- backspace
o.backspace = 'indent,eol,start' -- allow backspace on indent, end of line or insert mode start position o.backspace = "indent,eol,start" -- allow backspace on indent, end of line or insert mode start position
-- clipboard -- clipboard
o.clipboard:append 'unnamedplus' -- use system clipboard as default register o.clipboard:append("unnamedplus") -- use system clipboard as default register
-- split windows -- split windows
o.splitright = true -- split vertical window to the right o.splitright = true -- split vertical window to the right
@ -46,19 +46,19 @@ o.splitbelow = true -- split horizontal window to the bottom
-- turn off swapfile -- turn off swapfile
o.swapfile = false o.swapfile = false
vim.api.nvim_create_autocmd('TextYankPost', { vim.api.nvim_create_autocmd("TextYankPost", {
desc = 'Highlight when yanking (copying) text', desc = "Highlight when yanking (copying) text",
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
callback = function() callback = function()
vim.highlight.on_yank() vim.highlight.on_yank()
end, end,
}) })
-- Set cursor to beam when entering Neovim -- Set cursor to beam when entering Neovim
vim.cmd [[ vim.cmd([[
augroup ChangeCursorShape augroup ChangeCursorShape
autocmd! autocmd!
autocmd VimEnter * set guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20 autocmd VimEnter * set guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20
autocmd VimLeave * set guicursor=a:ver25 autocmd VimLeave * set guicursor=a:ver25
augroup END augroup END
]] ]])

View file

@ -4,7 +4,19 @@ return {
version = "*", version = "*",
opts = { opts = {
options = { options = {
mode = "tabs", show_buffer_icons = true,
diagnostics = "nvim_lsp",
offsets = { { filetype = "neo-tree", text = "File Explorer", highlight = "Directory" } },
buffers = {
-- You can set buffer_mode to "list" or "tabbed" based on your preference.
buffer_mode = "list",
}, },
}, },
},
config = function(_, opts)
require("bufferline").setup(opts)
-- Remap the tab key for buffer navigation (you can adjust the keys as needed)
vim.keymap.set("n", "<Tab>", "<cmd>BufferLineCycleNext<CR>")
vim.keymap.set("n", "<S-Tab>", "<cmd>BufferLineCyclePrev<CR>")
end,
} }

View file

@ -1,50 +1,26 @@
return { return {
'ribru17/bamboo.nvim', "ribru17/bamboo.nvim",
lazy = false, lazy = false,
priority = 1000, -- Make sure to load this before all the other start plugins. priority = 1000, -- Make sure to load this before all the other start plugins.
config = function() config = function()
require('bamboo').setup { require("bamboo").setup({
-- optional configuration here -- ────────────────────────────< optional configuration here >─────────────────────────
} code_style = {
require('bamboo').load() comments = { italic = false, bold = true },
conditionals = { italic = true },
keywords = { bold = true },
functions = {},
namespaces = { italic = true },
parameters = { italic = true },
strings = {},
variables = { bold = true },
},
-- ─< Custom Highlights -- >────────────────────────────────────────────────────────────
colors = {}, -- Override default colors
highlights = { -- Override highlight groups
["@comment"] = { fg = "#555653" },
},
})
require("bamboo").load()
end, end,
--
-- local bg = "#011628"
-- local bg_dark = "#011423"
-- local bg_highlight = "#143652"
-- local bg_search = "#0A64AC"
-- local bg_visual = "#275378"
-- local fg = "#CBE0F0"
-- local fg_dark = "#B4D0E9"
-- local fg_gutter = "#627E97"
-- local border = "#547998"
--
-- require("tokyonight").setup({
-- style = "night",
-- transparent = transparent,
-- styles = {
-- sidebars = transparent and "transparent" or "dark",
-- floats = transparent and "transparent" or "dark",
-- },
-- on_colors = function(colors)
-- colors.bg = bg
-- colors.bg_dark = transparent and colors.none or bg_dark
-- colors.bg_float = transparent and colors.none or bg_dark
-- colors.bg_highlight = bg_highlight
-- colors.bg_popup = bg_dark
-- colors.bg_search = bg_search
-- colors.bg_sidebar = transparent and colors.none or bg_dark
-- colors.bg_statusline = transparent and colors.none or bg_dark
-- colors.bg_visual = bg_visual
-- colors.border = border
-- colors.fg = fg
-- colors.fg_dark = fg_dark
-- colors.fg_float = fg
-- colors.fg_gutter = fg_gutter
-- colors.fg_sidebar = fg_dark
-- end,
-- })
--
-- vim.cmd("colorscheme tokyonight")
-- end,
} }

View file

@ -17,9 +17,9 @@ return {
mason.setup({ mason.setup({
ui = { ui = {
icons = { icons = {
package_installed = "", package_installed = "",
package_pending = "", package_pending = "",
package_uninstalled = "", package_uninstalled = "",
}, },
}, },
}) })
@ -44,8 +44,8 @@ return {
ensure_installed = { ensure_installed = {
"prettier", -- prettier formatter "prettier", -- prettier formatter
"stylua", -- lua formatter "stylua", -- lua formatter
"isort", -- python formatter -- "isort", -- python formatter
"black", -- python formatter -- "black", -- python formatter
"pylint", "pylint",
"eslint_d", "eslint_d",
}, },

View file

@ -1,17 +0,0 @@
return {
"gbprod/substitute.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function()
local substitute = require("substitute")
substitute.setup()
-- set keymaps
local keymap = vim.keymap -- for conciseness
keymap.set("n", "s", substitute.operator, { desc = "Substitute with motion" })
keymap.set("n", "ss", substitute.line, { desc = "Substitute line" })
keymap.set("n", "S", substitute.eol, { desc = "Substitute to end of line" })
keymap.set("x", "s", substitute.visual, { desc = "Substitute in visual mode" })
end,
}