some changes
This commit is contained in:
parent
872a98a430
commit
bf7bdf0060
6 changed files with 108 additions and 134 deletions
|
@ -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 ")
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
]]
|
]])
|
||||||
|
|
|
@ -1,10 +1,22 @@
|
||||||
return {
|
return {
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
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,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 },
|
||||||
end,
|
conditionals = { italic = true },
|
||||||
--
|
keywords = { bold = true },
|
||||||
-- local bg = "#011628"
|
functions = {},
|
||||||
-- local bg_dark = "#011423"
|
namespaces = { italic = true },
|
||||||
-- local bg_highlight = "#143652"
|
parameters = { italic = true },
|
||||||
-- local bg_search = "#0A64AC"
|
strings = {},
|
||||||
-- local bg_visual = "#275378"
|
variables = { bold = true },
|
||||||
-- local fg = "#CBE0F0"
|
},
|
||||||
-- local fg_dark = "#B4D0E9"
|
-- ─< Custom Highlights -- >────────────────────────────────────────────────────────────
|
||||||
-- local fg_gutter = "#627E97"
|
colors = {}, -- Override default colors
|
||||||
-- local border = "#547998"
|
highlights = { -- Override highlight groups
|
||||||
--
|
["@comment"] = { fg = "#555653" },
|
||||||
-- require("tokyonight").setup({
|
},
|
||||||
-- style = "night",
|
})
|
||||||
-- transparent = transparent,
|
require("bamboo").load()
|
||||||
-- styles = {
|
end,
|
||||||
-- 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,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,54 +1,54 @@
|
||||||
return {
|
return {
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- import mason
|
-- import mason
|
||||||
local mason = require("mason")
|
local mason = require("mason")
|
||||||
|
|
||||||
-- import mason-lspconfig
|
-- import mason-lspconfig
|
||||||
local mason_lspconfig = require("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
|
-- enable mason and configure icons
|
||||||
mason.setup({
|
mason.setup({
|
||||||
ui = {
|
ui = {
|
||||||
icons = {
|
icons = {
|
||||||
package_installed = "✓",
|
package_installed = "",
|
||||||
package_pending = "➜",
|
package_pending = "➜",
|
||||||
package_uninstalled = "✗",
|
package_uninstalled = "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
mason_lspconfig.setup({
|
mason_lspconfig.setup({
|
||||||
-- list of servers for mason to install
|
-- list of servers for mason to install
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"tsserver",
|
"tsserver",
|
||||||
"html",
|
"html",
|
||||||
"cssls",
|
"cssls",
|
||||||
"tailwindcss",
|
"tailwindcss",
|
||||||
"svelte",
|
"svelte",
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"graphql",
|
"graphql",
|
||||||
"emmet_ls",
|
"emmet_ls",
|
||||||
"prismals",
|
"prismals",
|
||||||
"pyright",
|
"pyright",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
mason_tool_installer.setup({
|
mason_tool_installer.setup({
|
||||||
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",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue