restructure and more plugins
This commit is contained in:
3
init.lua
3
init.lua
@@ -5,7 +5,10 @@ require("config.lazy")
|
|||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
vim.opt.splitright = true
|
vim.opt.splitright = true
|
||||||
|
|
||||||
|
vim.o.winborder = "rounded"
|
||||||
|
|
||||||
vim.keymap.set("i", "jj", "<Esc>")
|
vim.keymap.set("i", "jj", "<Esc>")
|
||||||
|
vim.keymap.set("n", "q:", ":", { noremap = true, silent = true })
|
||||||
|
|
||||||
vim.opt.tabstop = 4
|
vim.opt.tabstop = 4
|
||||||
vim.opt.softtabstop = 4
|
vim.opt.softtabstop = 4
|
||||||
|
|||||||
@@ -27,10 +27,15 @@ require("lazy").setup({
|
|||||||
-- import your plugins
|
-- import your plugins
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
{ import = "plugins.completion" },
|
{ import = "plugins.completion" },
|
||||||
|
{ import = "plugins.ui" },
|
||||||
|
{ import = "plugins.functional" },
|
||||||
},
|
},
|
||||||
-- Configure any other settings here. See the documentation for more details.
|
-- Configure any other settings here. See the documentation for more details.
|
||||||
-- colorscheme that will be used when installing plugins.
|
-- colorscheme that will be used when installing plugins.
|
||||||
install = { colorscheme = { "catppuccin" } },
|
install = { colorscheme = { "catppuccin" } },
|
||||||
|
ui = {
|
||||||
|
border = "rounded",
|
||||||
|
},
|
||||||
-- automatically check for plugin updates
|
-- automatically check for plugin updates
|
||||||
checker = { enabled = true },
|
checker = { enabled = true },
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,34 +1,24 @@
|
|||||||
return {
|
return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
config = function()
|
||||||
require("mason").setup()
|
|
||||||
require("mason-lspconfig").setup({
|
|
||||||
ensure_installed = { "ts_ls", "lua_ls", "pyright", "rust_analyzer", "eslint" }, -- Add your desired LSPs
|
|
||||||
automatic_installation = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
lspconfig.lua_ls.setup({})
|
|
||||||
--Enable (broadcasting) snippet capability for completion
|
-- Enable snippet capability for completion
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
|
|
||||||
vim.lsp.config("cssls", {
|
lspconfig.lua_ls.setup({})
|
||||||
|
lspconfig.pyright.setup({})
|
||||||
|
lspconfig.cssls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
lspconfig.pyright.setup({})
|
|
||||||
lspconfig.cssls.setup({})
|
|
||||||
lspconfig.ts_ls.setup({
|
lspconfig.ts_ls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
lspconfig.rust_analyzer.setup({})
|
lspconfig.rust_analyzer.setup({})
|
||||||
lspconfig.emmet_ls.setup({
|
lspconfig.emmet_ls.setup({
|
||||||
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
||||||
filetypes = { "html", "css", "javascriptreact", "typescriptreact" }, -- Add more if needed
|
filetypes = { "html", "css", "javascriptreact", "typescriptreact" },
|
||||||
init_options = {
|
init_options = {
|
||||||
html = {
|
html = {
|
||||||
options = {
|
options = {
|
||||||
@@ -38,4 +28,4 @@ return {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
48
lua/plugins/functional/flash.lua
Normal file
48
lua/plugins/functional/flash.lua
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
return {
|
||||||
|
"folke/flash.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
---@type Flash.Config
|
||||||
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>s",
|
||||||
|
mode = { "n", "x", "o" },
|
||||||
|
function()
|
||||||
|
require("flash").jump()
|
||||||
|
end,
|
||||||
|
desc = "Flash",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>S",
|
||||||
|
mode = { "n", "x", "o" },
|
||||||
|
function()
|
||||||
|
require("flash").treesitter()
|
||||||
|
end,
|
||||||
|
desc = "Flash Treesitter",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>r",
|
||||||
|
mode = "o",
|
||||||
|
function()
|
||||||
|
require("flash").remote()
|
||||||
|
end,
|
||||||
|
desc = "Remote Flash",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>R",
|
||||||
|
mode = { "o", "x" },
|
||||||
|
function()
|
||||||
|
require("flash").treesitter_search()
|
||||||
|
end,
|
||||||
|
desc = "Treesitter Search",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader><c-s>",
|
||||||
|
mode = { "c" },
|
||||||
|
function()
|
||||||
|
require("flash").toggle()
|
||||||
|
end,
|
||||||
|
desc = "Toggle Flash Search",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
18
lua/plugins/functional/mini.lua
Normal file
18
lua/plugins/functional/mini.lua
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
return {
|
||||||
|
"echasnovski/mini.nvim",
|
||||||
|
version = "",
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
require("mini.pairs").setup() -- Bracket pairs and stuff
|
||||||
|
require("mini.ai").setup() -- Around and In extension for visual mode
|
||||||
|
require("mini.surround").setup() -- Suround selections with characters
|
||||||
|
require("mini.move").setup({
|
||||||
|
mappings = {
|
||||||
|
down = "J",
|
||||||
|
up = "K",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
require("mini.icons").setup() -- Icon provider
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
return {
|
|
||||||
"echasnovski/mini.nvim",
|
|
||||||
version = "",
|
|
||||||
config = function()
|
|
||||||
require('mini.pairs').setup() -- Bracket pairs and stuff
|
|
||||||
require("mini.ai").setup() -- Around and In extension for visual mode
|
|
||||||
require("mini.surround").setup() -- Suround selections with characters
|
|
||||||
|
|
||||||
require("mini.icons").setup() -- Icon provider
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
60
lua/plugins/ui/lualine.lua
Normal file
60
lua/plugins/ui/lualine.lua
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
return {
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
config = function()
|
||||||
|
require("lualine").setup({
|
||||||
|
options = {
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = "auto",
|
||||||
|
component_separators = { left = "", right = "" },
|
||||||
|
section_separators = { left = "", right = "" },
|
||||||
|
disabled_filetypes = {
|
||||||
|
statusline = {},
|
||||||
|
winbar = {},
|
||||||
|
},
|
||||||
|
ignore_focus = {},
|
||||||
|
always_divide_middle = true,
|
||||||
|
always_show_tabline = true,
|
||||||
|
globalstatus = false,
|
||||||
|
refresh = {
|
||||||
|
statusline = 1000,
|
||||||
|
tabline = 1000,
|
||||||
|
winbar = 1000,
|
||||||
|
refresh_time = 16, -- ~60fps
|
||||||
|
events = {
|
||||||
|
"WinEnter",
|
||||||
|
"BufEnter",
|
||||||
|
"BufWritePost",
|
||||||
|
"SessionLoadPost",
|
||||||
|
"FileChangedShellPost",
|
||||||
|
"VimResized",
|
||||||
|
"Filetype",
|
||||||
|
"CursorMoved",
|
||||||
|
"CursorMovedI",
|
||||||
|
"ModeChanged",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = { "mode" },
|
||||||
|
lualine_b = { "branch", "diff", "diagnostics" },
|
||||||
|
lualine_c = { "filename" },
|
||||||
|
lualine_x = { "encoding", "fileformat", "filetype" },
|
||||||
|
lualine_y = { "lsp_status" },
|
||||||
|
lualine_z = { "location" },
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = { "branch", "diff", "diagnostics" },
|
||||||
|
lualine_c = { "filename" },
|
||||||
|
lualine_x = { "location" },
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {},
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
winbar = {},
|
||||||
|
inactive_winbar = {},
|
||||||
|
extensions = {},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
6
lua/plugins/ui/tint.lua
Normal file
6
lua/plugins/ui/tint.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
"levouh/tint.nvim",
|
||||||
|
config = function()
|
||||||
|
require("tint").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user