chore: some improvements
This commit is contained in:
parent
70f5f3c859
commit
d69fb57aa6
10 changed files with 182 additions and 59 deletions
|
|
@ -7,3 +7,4 @@ vim.keymap.set("n", "<M-BS>", "<CMD>e#<CR>", { desc = "Previous file" })
|
|||
|
||||
require("config.maps.maven")
|
||||
require("config.maps.cpp")
|
||||
require("config.maps.vue")
|
||||
|
|
|
|||
26
lua/config/maps/vue.lua
Normal file
26
lua/config/maps/vue.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
-- Function to check if pom.xml exists in current or parent directories
|
||||
local function is_npm_project()
|
||||
local uv = vim.loop
|
||||
local dir = uv.fs_realpath(vim.fn.expand("%:p:h"))
|
||||
while dir do
|
||||
if uv.fs_stat(dir .. "/package-lock.json") then
|
||||
return true
|
||||
end
|
||||
local parent_dir = uv.fs_realpath(dir .. "/..")
|
||||
if parent_dir == dir then
|
||||
break
|
||||
end
|
||||
dir = parent_dir
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- Create autocommand on FileType java or whatever filetype you want
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "typescript",
|
||||
callback = function()
|
||||
if is_npm_project() then
|
||||
vim.keymap.set("n", "<leader><F5>", "<CMD>! npm run format<CR>", { desc = "Prettier" })
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"ramilito/kubectl.nvim",
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = "2.*",
|
||||
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
|
||||
-- build = 'cargo build --release',
|
||||
dependencies = "saghen/blink.download",
|
||||
config = function()
|
||||
require("kubectl").setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
65
lua/plugins/lualine.lua
Normal file
65
lua/plugins/lualine.lua
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
return {
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
local colors = {
|
||||
blue = "#80a0ff",
|
||||
cyan = "#79dac8",
|
||||
black = "#080808",
|
||||
white = "#c6c6c6",
|
||||
red = "#ff5189",
|
||||
violet = "#d183e8",
|
||||
grey = "#303030",
|
||||
}
|
||||
|
||||
local bubbles_theme = {
|
||||
normal = {
|
||||
a = { fg = colors.black, bg = colors.violet },
|
||||
b = { fg = colors.white, bg = colors.grey },
|
||||
c = { fg = colors.white },
|
||||
},
|
||||
|
||||
insert = { a = { fg = colors.black, bg = colors.blue } },
|
||||
visual = { a = { fg = colors.black, bg = colors.cyan } },
|
||||
replace = { a = { fg = colors.black, bg = colors.red } },
|
||||
|
||||
inactive = {
|
||||
a = { fg = colors.white, bg = colors.black },
|
||||
b = { fg = colors.white, bg = colors.black },
|
||||
c = { fg = colors.white },
|
||||
},
|
||||
}
|
||||
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = bubbles_theme,
|
||||
component_separators = "",
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { { "mode", right_padding = 2 } },
|
||||
lualine_b = { "branch", "filename" },
|
||||
lualine_c = {
|
||||
"%=",
|
||||
},
|
||||
lualine_x = {},
|
||||
lualine_y = { "filetype", "progress" },
|
||||
lualine_z = {
|
||||
{ "location", left_padding = 2 },
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = { "filename" },
|
||||
lualine_b = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,9 +1,4 @@
|
|||
return {
|
||||
{
|
||||
"echasnovski/mini.statusline",
|
||||
version = false,
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.misc",
|
||||
version = false,
|
||||
|
|
@ -13,4 +8,11 @@ return {
|
|||
mini.setup_auto_root()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-mini/mini.diff",
|
||||
version = "*",
|
||||
config = function()
|
||||
require("mini.diff").setup({})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,22 +15,33 @@ return {
|
|||
dashboard = {
|
||||
enabled = true,
|
||||
preset = {
|
||||
header = header_string
|
||||
}
|
||||
header = header_string,
|
||||
},
|
||||
},
|
||||
explorer = { enabled = true },
|
||||
explorer = { enabled = false },
|
||||
input = { enabled = true },
|
||||
notifier = {
|
||||
enabled = true,
|
||||
timeout = 10000
|
||||
timeout = 10000,
|
||||
},
|
||||
lazygit = {
|
||||
enabled = true
|
||||
}
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>n", function() Snacks.picker.notifications() end, desc = "Notification History" },
|
||||
{ "<leader>e", function() Snacks.explorer() end, desc = "File Explorer" },
|
||||
{ "<leader>gg", function() Snacks.lazygit() end, desc = "Lazygit" },
|
||||
}
|
||||
{
|
||||
"<leader>n",
|
||||
function()
|
||||
Snacks.picker.notifications()
|
||||
end,
|
||||
desc = "Notification History",
|
||||
},
|
||||
{
|
||||
"<leader>gg",
|
||||
function()
|
||||
Snacks.lazygit()
|
||||
end,
|
||||
desc = "Lazygit",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
"rebelot/kanagawa.nvim",
|
||||
config = function()
|
||||
require('kanagawa').setup({
|
||||
require("kanagawa").setup({
|
||||
compile = true,
|
||||
transparent = true,
|
||||
colors = {
|
||||
|
|
@ -12,25 +12,31 @@ return {
|
|||
float = {
|
||||
bg = "none",
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
overrides = function(colors)
|
||||
local theme = colors.theme
|
||||
return {
|
||||
["@markup.link.url.markdown_inline"] = { link = "Special" }, -- (url)
|
||||
["@markup.link.url.markdown_inline"] = { link = "Special" }, -- (url)
|
||||
["@markup.link.label.markdown_inline"] = { link = "WarningMsg" }, -- [label]
|
||||
["@markup.italic.markdown_inline"] = { link = "Exception" }, -- *italic*
|
||||
["@markup.raw.markdown_inline"] = { link = "String" }, -- `code`
|
||||
["@markup.list.markdown"] = { link = "Function" }, -- + list
|
||||
["@markup.quote.markdown"] = { link = "Error" }, -- > blockcode
|
||||
["@markup.list.checked.markdown_inline"] = { link = "Error" } -- - [X] checked list item
|
||||
["@markup.italic.markdown_inline"] = { link = "Exception" }, -- *italic*
|
||||
["@markup.raw.markdown_inline"] = { link = "String" }, -- `code`
|
||||
["@markup.list.markdown"] = { link = "Function" }, -- + list
|
||||
["@markup.quote.markdown"] = { link = "Error" }, -- > blockcode
|
||||
["@markup.list.checked.markdown_inline"] = { link = "Error" }, -- - [X] checked list item
|
||||
NormalFloat = { bg = "none" },
|
||||
FloatBorder = { bg = "none" },
|
||||
FloatTitle = { bg = "none" },
|
||||
LazyNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },
|
||||
MasonNormal = { bg = theme.ui.bg_m3, fg = theme.ui.fg_dim },
|
||||
}
|
||||
end
|
||||
end,
|
||||
})
|
||||
vim.cmd("colorscheme kanagawa")
|
||||
end,
|
||||
build = function()
|
||||
vim.cmd("KanagawaCompile")
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
22
lua/plugins/tree.lua
Normal file
22
lua/plugins/tree.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
return {
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
version = "*",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup({})
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>e",
|
||||
function()
|
||||
vim.cmd("NvimTreeToggle")
|
||||
end,
|
||||
desc = "File Explorer",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -5,6 +5,8 @@ return {
|
|||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
preset = "modern",
|
||||
delay = 100,
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue