adapted config to latest version

This commit is contained in:
λmolinae 2025-05-20 20:56:11 -06:00
parent cf52bb4d5b
commit 1f1479385b
16 changed files with 146 additions and 214 deletions

17
lua/plugins/autopairs.lua Normal file
View file

@ -0,0 +1,17 @@
return {
{
"windwp/nvim-autopairs",
event = "InsertEnter",
opts = {
fast_wrap = {},
disable_filetype = { "TelescopePrompt", "vim" },
map_cr = true,
},
config = function(opts)
require("nvim-autopairs").setup(opts)
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
local cmp = require('cmp')
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
end
}
}

View file

@ -1,20 +0,0 @@
return {
{
"okuuva/auto-save.nvim",
version = '^1.0.0',
cmd = "ASToggle",
event = { "InsertLeave", "TextChanged" },
opts = {
enabled = true,
trigger_events = {
immediate_save = {
{ "BufLeave", pattern = { "*.typ", "*.tex" } }
},
defer_save = {
{ "BufLeave", pattern = { "*.typ", "*.tex"} }
},
cancel_deferred_save = { "InsertEnter" },
},
}
}
}

View file

@ -7,21 +7,6 @@ return {
{ "hrsh7th/cmp-cmdline" },
{ "hrsh7th/cmp-path" },
{ "hrsh7th/cmp-buffer" },
{
"windwp/nvim-autopairs",
event = "InsertEnter",
opts = {
fast_wrap = {},
disable_filetype = { "TelescopePrompt", "vim" },
map_cr = true,
},
config = function(opts)
require("nvim-autopairs").setup(opts)
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
local cmp = require('cmp')
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
end
},
},
opts = function()
require "config.plugins.cmp"
@ -30,40 +15,15 @@ return {
{
"hrsh7th/cmp-nvim-lsp",
dependencies = {},
config = function ()
config = function()
local lspconfig = require('lspconfig')
local capabilities = require('cmp_nvim_lsp').default_capabilities()
lspconfig.lua_ls.setup({
capabilities = capabilities,
})
lspconfig.clangd.setup({
capabilities = capabilities,
})
lspconfig.tinymist.setup({
capabilities = capabilities,
})
lspconfig.texlab.setup({
capabilities = capabilities,
})
lspconfig.cssls.setup({
capabilities = capabilities,
})
lspconfig.html.setup({
capabilities = capabilities,
})
lspconfig.pyright.setup({
capabilities = capabilities,
})
lspconfig.arduino_language_server.setup({
capabilities = capabilities,
})
end,
},
{
"L3MON4D3/LuaSnip",
dependencies = {
"saadparwaiz1/cmp_luasnip",
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets"
},
opts = {}

View file

@ -3,30 +3,7 @@ return {
"neovim/nvim-lspconfig",
dependencies= {},
config = function()
require "config.plugins.lsp"
local lspconfig = require("lspconfig")
end,
},
{
"williamboman/mason.nvim",
dependencies = {},
opts = function ()
require "config.plugins.mason"
end
},
{
"williamboman/mason-lspconfig.nvim",
dependencies = {},
config = function()
require("mason-lspconfig").setup {
ensure_installed = {
"lua_ls",
"tinymist",
"arduino_language_server",
"pylsp",
"texlab",
"clangd"
},
}
end,
}
}

23
lua/plugins/mason.lua Normal file
View file

@ -0,0 +1,23 @@
return {
{
"mason-org/mason.nvim",
opts = {
ui = {
icons = {
package_installed = "󰏖",
package_pending = "󰏗",
package_uninstalled = "󱧖"
}
}
}
},
{
"mason-org/mason-lspconfig.nvim",
dependencies = {
"neovim/nvim-lspconfig",
},
opts = {
automatic_enable = true
},
},
}

View file

@ -1,14 +0,0 @@
return {
{
"nvimtools/none-ls.nvim",
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.completion.spell,
},
})
end,
},
}

View file

@ -18,3 +18,4 @@ return {
end,
}
}

View file

@ -5,61 +5,40 @@ return {
},
{
"folke/tokyonight.nvim",
priority = 1000,
opts = {
transparent = false,
styles = {
sidebars = "transparent",
floats = "transparent",
},
},
opts = {}
},
{
"norcalli/nvim-colorizer.lua",
opts = {
'css';
'javascript';
html = {
mode = 'foreground';
}
}
opts = { 'css'; 'javascript'; html = {mode = 'foreground';} },
},
{
-- Lua status-bar
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
options = {
icons_enabled = true,
theme = 'pywal16-nvim',
component_separators = { left = "|", right = "|"},
section_separators = { left = "", right = ""},
}
component_separators = { left = "|", right = "|" },
section_separators = { left = "", right = "" },
},
}
},
{
'akinsho/bufferline.nvim',
"akinsho/bufferline.nvim",
version = "*",
dependencies = {'nvim-tree/nvim-web-devicons'},
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
options = {
mode = "buffers",
diagnostics = "nvim_lsp",
offsets = {
{
filetype = "neo-tree",
text = "File Explorer",
text_align = "center",
separator = true
{
filetype = "neo-tree", text = "File Explorer",
text_align = "center", separator = true
}
},
themable = false,
},
}
},
{
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPost", "BufNewFile" },
opts = {}
},
},
}