Add a few extra features
This commit is contained in:
parent
ac1591b035
commit
666d8cefce
22
.config/nvim/lua/plugins/barbar.lua
Normal file
22
.config/nvim/lua/plugins/barbar.lua
Normal file
@ -0,0 +1,22 @@
|
||||
return {
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = {
|
||||
"lewis6991/gitsigns.nvim", -- OPTIONAL: for git status
|
||||
"nvim-tree/nvim-web-devicons", -- OPTIONAL: for file icons
|
||||
},
|
||||
keys = {
|
||||
{ "<Tab>", "<cmd>BufferNext<cr>", desc = "next tab" },
|
||||
{ "<S-Tab>", "<cmd>BufferPrevious<cr>", desc = "previous tab" },
|
||||
{ "<leader>x", "<cmd>BufferClose<cr>", desc = "close tab" },
|
||||
},
|
||||
init = function()
|
||||
vim.g.barbar_auto_setup = false
|
||||
end,
|
||||
config = function()
|
||||
require("barbar").setup({
|
||||
animation = true,
|
||||
auto_hide = true,
|
||||
clickable = true,
|
||||
})
|
||||
end,
|
||||
}
|
||||
16
.config/nvim/lua/plugins/conform.lua
Normal file
16
.config/nvim/lua/plugins/conform.lua
Normal file
@ -0,0 +1,16 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
},
|
||||
format_on_save = {
|
||||
-- Enable or disable auto-formatting on save
|
||||
lua = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
44
.config/nvim/lua/plugins/mason.lua
Normal file
44
.config/nvim/lua/plugins/mason.lua
Normal file
@ -0,0 +1,44 @@
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
},
|
||||
config = function()
|
||||
local mason = require("mason")
|
||||
local mason_lspconfig = require("mason-lspconfig")
|
||||
local mason_tool_installer = require("mason-tool-installer")
|
||||
|
||||
-- Enable mason and configure icons
|
||||
mason.setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Combine the setup for mason-lspconfig and mason-tool-installer
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = {
|
||||
"cssls",
|
||||
"dockerls",
|
||||
"html",
|
||||
"jsonls",
|
||||
"lua_ls",
|
||||
"vimls",
|
||||
"yamlls",
|
||||
},
|
||||
})
|
||||
|
||||
mason_tool_installer.setup({
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
12
.config/nvim/lua/plugins/nvim-treesitter.lua
Normal file
12
.config/nvim/lua/plugins/nvim-treesitter.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
},
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end,
|
||||
}
|
||||
9
.config/nvim/lua/plugins/theme.lua
Normal file
9
.config/nvim/lua/plugins/theme.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
"rebelot/kanagawa.nvim",
|
||||
lazy = false, -- Ensure the plugin is loaded on startup
|
||||
priority = 1000, -- Load this plugin first to apply the color scheme early
|
||||
config = function()
|
||||
-- Set the Kanagawa color scheme
|
||||
vim.cmd("colorscheme kanagawa")
|
||||
end,
|
||||
}
|
||||
18
.config/nvim/lua/plugins/which-key.lua
Normal file
18
.config/nvim/lua/plugins/which-key.lua
Normal file
@ -0,0 +1,18 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user