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>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 >────────────────────────────────────────────────────────────
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
@ -15,7 +15,7 @@ o.softtabstop = 2
o.expandtab = true -- expand tab to spaces
o.autoindent = true -- copy indent from current line when starting new one
o.mouse = 'a'
o.mouse = "a"
o.wrap = false
-- search settings
@ -30,14 +30,14 @@ o.showmode = false
-- turn on termguicolors for tokyonight colorscheme to work
-- (have to use iterm2 or any other true color terminal)
o.termguicolors = true
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.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
-- 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
o.clipboard:append 'unnamedplus' -- use system clipboard as default register
o.clipboard:append("unnamedplus") -- use system clipboard as default register
-- split windows
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
o.swapfile = false
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
vim.api.nvim_create_autocmd("TextYankPost", {
desc = "Highlight when yanking (copying) text",
group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})
-- Set cursor to beam when entering Neovim
vim.cmd [[
vim.cmd([[
augroup ChangeCursorShape
autocmd!
autocmd VimEnter * set guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20
autocmd VimLeave * set guicursor=a:ver25
augroup END
]]
]])

View file

@ -1,10 +1,22 @@
return {
"akinsho/bufferline.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
version = "*",
opts = {
options = {
mode = "tabs",
},
},
"akinsho/bufferline.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
version = "*",
opts = {
options = {
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 {
'ribru17/bamboo.nvim',
lazy = false,
priority = 1000, -- Make sure to load this before all the other start plugins.
config = function()
require('bamboo').setup {
-- optional configuration here
}
require('bamboo').load()
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,
"ribru17/bamboo.nvim",
lazy = false,
priority = 1000, -- Make sure to load this before all the other start plugins.
config = function()
require("bamboo").setup({
-- ────────────────────────────< optional configuration here >─────────────────────────
code_style = {
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,
}

View file

@ -1,54 +1,54 @@
return {
"williamboman/mason.nvim",
dependencies = {
"williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim",
},
config = function()
-- import mason
local mason = require("mason")
"williamboman/mason.nvim",
dependencies = {
"williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim",
},
config = function()
-- import mason
local mason = require("mason")
-- import mason-lspconfig
local mason_lspconfig = require("mason-lspconfig")
-- import mason-lspconfig
local mason_lspconfig = require("mason-lspconfig")
local mason_tool_installer = require("mason-tool-installer")
local mason_tool_installer = require("mason-tool-installer")
-- enable mason and configure icons
mason.setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
})
-- enable mason and configure icons
mason.setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
})
mason_lspconfig.setup({
-- list of servers for mason to install
ensure_installed = {
"tsserver",
"html",
"cssls",
"tailwindcss",
"svelte",
"lua_ls",
"graphql",
"emmet_ls",
"prismals",
"pyright",
},
})
mason_lspconfig.setup({
-- list of servers for mason to install
ensure_installed = {
"tsserver",
"html",
"cssls",
"tailwindcss",
"svelte",
"lua_ls",
"graphql",
"emmet_ls",
"prismals",
"pyright",
},
})
mason_tool_installer.setup({
ensure_installed = {
"prettier", -- prettier formatter
"stylua", -- lua formatter
"isort", -- python formatter
"black", -- python formatter
"pylint",
"eslint_d",
},
})
end,
mason_tool_installer.setup({
ensure_installed = {
"prettier", -- prettier formatter
"stylua", -- lua formatter
-- "isort", -- python formatter
-- "black", -- python formatter
"pylint",
"eslint_d",
},
})
end,
}

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