Compare commits

...

5 commits

10 changed files with 207 additions and 322 deletions

1
after/ftplugin/help.lua Normal file
View file

@ -0,0 +1 @@
vim.opt_local.conceallevel = 0

View file

@ -1,44 +1,48 @@
{
"LazyVim": { "branch": "main", "commit": "9f2010a8b9fa88ef77d1acf362bab59db4baaef9" },
"LuaSnip": { "branch": "master", "commit": "b4bc24c4925aeb05fd47d2ee9b24b7f73f5d7e32" },
"bufferline.nvim": { "branch": "main", "commit": "1952c33e425ede785d26aa9e250addfe304a8510" },
"catppuccin": { "branch": "main", "commit": "57b421ee5f7380f816791fa451e86f213b625ece" },
"LazyVim": { "branch": "main", "commit": "7c593dce1f37647fddca3a6b5caaf7a94324a064" },
"LuaSnip": { "branch": "master", "commit": "a13af80734eb28f744de6c875330c9d3c24b5f3b" },
"bufferline.nvim": { "branch": "main", "commit": "02d795081e6a24ec1fd506c513491543793d0780" },
"catppuccin": { "branch": "main", "commit": "233c4175780d9b4e39ae4fe4535c1e4c14bd76ed" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
"friendly-snippets": { "branch": "main", "commit": "1d0dac346de7c6895ac72528df3276386c6b149b" },
"gitsigns.nvim": { "branch": "main", "commit": "814158f6c4b1724c039fcefe79b0be72c9131c2d" },
"lazy.nvim": { "branch": "main", "commit": "aba872ec78ffe7f7367764ab0fff6f0170421fde" },
"leap.nvim": { "branch": "main", "commit": "6f2912755c9c4ae790abd829f0cf1b07c037b2a4" },
"friendly-snippets": { "branch": "main", "commit": "b471f5419155ce832eff71ad8920ea8cfbd54840" },
"gitsigns.nvim": { "branch": "main", "commit": "4455bb5364d29ff86639dfd5533d4fe4b48192d4" },
"lazy.nvim": { "branch": "main", "commit": "f145e6f42a56306c5536e9efbfe41f7efbec285d" },
"leap.nvim": { "branch": "main", "commit": "14b5a65190fe69388a8f59c695ed3394a10d6af8" },
"lsp_signature.nvim": { "branch": "master", "commit": "17ff7a405fea8376b015b8ea7910d2e59958bf68" },
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" },
"mason.nvim": { "branch": "main", "commit": "e634134312bb936f472468a401c9cae6485ab54b" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "5230617372e656d4a2e1e236e03bf7e7b4b97273" },
"mason.nvim": { "branch": "main", "commit": "7d7efc738e08fc5bee822857db45cb6103f0b0c1" },
"mini.ai": { "branch": "main", "commit": "44d7df1340b16b16b27b67fba07028cb57f45408" },
"mini.bufremove": { "branch": "main", "commit": "14805473144fffbd019d07e51bed2d176e065ee9" },
"mini.comment": { "branch": "main", "commit": "6fbcd1294fa516dafc97e25e2f316de851f680d3" },
"mini.pairs": { "branch": "main", "commit": "963b800d0524eadd297199207011b98684205ada" },
"mini.surround": { "branch": "main", "commit": "ea2e9c4cdbddc826dc6eeac69b035f8220f65de5" },
"neoconf.nvim": { "branch": "main", "commit": "4b82da74f904de5aed43ee4320f0f89a703128ec" },
"nui.nvim": { "branch": "main", "commit": "698e75814cd7c56b0dd8af4936bcef2d13807f3c" },
"null-ls.nvim": { "branch": "main", "commit": "08bb00c7c2cd58c72e02cf54e4b9cbfe14b03e09" },
"nvim-cmp": { "branch": "main", "commit": "768548bf4980fd6d635193a9320545bb46fcb6d8" },
"nvim-lspconfig": { "branch": "master", "commit": "30a232052b3e1c0c51d190d5f5a12ad9b42c5ebc" },
"mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" },
"mini.nvim": { "branch": "main", "commit": "296ebbbd3e5ba5e43f5125efe18ad76fe3b632cc" },
"mini.surround": { "branch": "main", "commit": "eeaf96562947f75afa51a6266e066529369ca7ef" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "d883632bf8f92f1d5abea4a9c28fb2f90aa795aa" },
"neoconf.nvim": { "branch": "main", "commit": "4cfa8a11e4de565c95636643db77b44f926f4f25" },
"neodev.nvim": { "branch": "main", "commit": "a24a910ad0842be997f34a4811c10b4f92aa53af" },
"nui.nvim": { "branch": "main", "commit": "d5a82aae64426a805e19d8ef5a379292f9dc55d3" },
"null-ls.nvim": { "branch": "main", "commit": "a138b14099e9623832027ea12b4631ddd2a49256" },
"nvim-cmp": { "branch": "main", "commit": "b5a636d46c69bb371995c22d7a10ee1544004879" },
"nvim-lspconfig": { "branch": "master", "commit": "0f598b9ab9f2a6d7e137074be99c8d89af44b990" },
"nvim-navic": { "branch": "master", "commit": "15704c607569d6c5cfeab486d3ef9459645a70ce" },
"nvim-spectre": { "branch": "master", "commit": "1abe23ec9b7bc3082164f4cb842d521ef70e080e" },
"nvim-tree.lua": { "branch": "master", "commit": "736c7ff59065275f0483af4b7f07a9bc41449ad0" },
"nvim-treesitter": { "branch": "master", "commit": "d2b78324f2191db72e9bc063ff435278c36bf06b" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "35a60f093fa15a303874975f963428a5cd24e4a0" },
"nvim-web-devicons": { "branch": "master", "commit": "986875b7364095d6535e28bd4aac3a9357e91bbe" },
"persistence.nvim": { "branch": "main", "commit": "c814fae5c37aa0aba9cd9da05df6e52b88d612c3" },
"plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" },
"telescope.nvim": { "branch": "master", "commit": "40c31fdde93bcd85aeb3447bb3e2a3208395a868" },
"todo-comments.nvim": { "branch": "main", "commit": "8febc60a76feefd8203077ef78b6a262ea1a41f9" },
"tokyonight.nvim": { "branch": "main", "commit": "df13e3268a44f142999fa166572fe95a650a0b37" },
"trouble.nvim": { "branch": "main", "commit": "d56bfc0c501ced4002a57cb60433362fb2ce9c4d" },
"nvim-treesitter": { "branch": "master", "commit": "2c59e0ff3da6514b03d853ebecb6c36c515a5d7d" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "2d6d3c7e49a24f6ffbbf7898241fefe9784f61bd" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" },
"nvim-web-devicons": { "branch": "master", "commit": "2a125024a137677930efcfdf720f205504c97268" },
"persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" },
"plenary.nvim": { "branch": "master", "commit": "499e0743cf5e8075cd32af68baa3946a1c76adf1" },
"telescope.nvim": { "branch": "master", "commit": "991d5db62451ee7a50944b84aaad4b58c3447b60" },
"todo-comments.nvim": { "branch": "main", "commit": "09b0b17d824d2d56f02ff15967e8a2499a89c731" },
"tokyonight.nvim": { "branch": "main", "commit": "161114bd39b990995e08dbf941f6821afbdcd666" },
"trouble.nvim": { "branch": "main", "commit": "2af0dd9767526410c88c628f1cbfcb6cf22dd683" },
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-startuptime": { "branch": "master", "commit": "01b67169c3ebe41f163c07bf6853555ca19bc27f" },
"which-key.nvim": { "branch": "main", "commit": "5a6c954a5a46023c19acc03a8b6d7c3e57964fc5" }
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
"which-key.nvim": { "branch": "main", "commit": "e271c28118998c93a14d189af3395812a1aa646c" }
}

View file

@ -39,6 +39,11 @@ keymap("n", "<Leader>lz", "<cmd>:Lazy<cr>", { desc = "Lazy" })
-- Navigate buffers
keymap("n", "<M-l>", ":BufferLineCycleNext<CR>", opts)
keymap("n", "<M-h>", ":BufferLineCyclePrev<CR>", opts)
keymap("i", "<M-l>", ":BufferLineCycleNext<CR>", opts)
keymap("i", "<M-h>", ":BufferLineCyclePrev<CR>", opts)
keymap("x", "<M-l>", ":BufferLineCycleNext<CR>", opts)
keymap("x", "<M-h>", ":BufferLineCyclePrev<CR>", opts)
keymap("n", "<H>", "<Nop>", opts)
keymap("n", "<L>", "<Nop>", opts)
keymap("n", "<M-L>", ":BufferLineMoveNext<CR>", opts)
@ -71,14 +76,14 @@ keymap("n", "<M-Q>", "<cmd>Bdelete!<CR>", opts)
-- keymap("v", "<", "<gv", opts)
-- keymap("v", ">", ">gv", opts)
--
-- search with '-', for my LatinAmerican layour
-- search with '-', for my LatinAmerican layout
keymap("n", "-", "/", opts)
keymap("x", "-", "/", opts)
--
-- -- Plugins --
--
-- NvimTree
keymap("n", "<leader>e", ":NvimTreeToggle<CR>", opts)
-- keymap("n", "<leader>e", ":NvimTreeToggle<CR>", opts)
--
-- -- Telescope
-- keymap("n", "<leader>fa", ":Telescope find_files<CR>", opts)

View file

@ -4,5 +4,8 @@
vim.opt.relativenumber = false
vim.opt.conceallevel = 0
vim.opt.completeopt = { "menuone", "noselect" }
-- vim.opt.completeopt = { "menuone", "noselect" }
vim.opt.timeoutlen = 1000
vim.opt.list = false
vim.opt.pumblend = 0
-- vim.opt.cmdheight = 1

View file

@ -1,3 +1,6 @@
local cmp = require("cmp")
local luasnip = require("luasnip")
return {
{
"LazyVim/LazyVim",
@ -5,4 +8,128 @@ return {
colorscheme = "catppuccin",
},
},
{
"nvim-lualine/lualine.nvim",
opts = {
sections = {
lualine_z = {},
},
},
},
{
"nvim-neo-tree/neo-tree.nvim",
opts = {
window = {
mappings = {
["l"] = "open",
},
},
},
},
{
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-emoji",
},
opts = function(_, opts)
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-j>"] = cmp.mapping.select_next_item(),
-- ["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
-- ["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
-- ["<C-e>"] = cmp.mapping({
-- i = cmp.mapping.abort(),
-- c = cmp.mapping.close(),
-- }),
-- Accept currently selected item. If none selected, `select` first item.
-- Set `select` to `false` to only confirm explicitly selected items.
["<CR>"] = cmp.mapping.confirm({ select = false }),
-- ["<Tab>"] = cmp.mapping(function(fallback)
-- if cmp.visible() then
-- cmp.select_next_item()
-- elseif luasnip.expandable() then
-- luasnip.expand()
-- elseif luasnip.expand_or_jumpable() then
-- luasnip.expand_or_jump()
-- elseif check_backspace() then
-- fallback()
-- else
-- fallback()
-- end
-- end, {
-- "i",
-- "s",
-- }),
-- ["<S-Tab>"] = cmp.mapping(function(fallback)
-- if cmp.visible() then
-- cmp.select_prev_item()
-- elseif luasnip.jumpable(-1) then
-- luasnip.jump(-1)
-- else
-- fallback()
-- end
-- end, {
-- "i",
-- "s",
-- }),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
-- this way you will only jump inside the snippet region
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
})
opts.window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
}
opts.preselect = cmp.PreselectMode.None
opts.completion = {
completeopt = "noselect",
}
-- opts.formatting = {
-- fields = { "kind", "abbr", "menu" },
-- -- format = function(entry, vim_item)
-- -- -- vim_item.kind = kind_icons[vim_item.kind]
-- -- vim_item.menu = ({
-- -- nvim_lsp = "",
-- -- nvim_lua = "",
-- -- luasnip = "",
-- -- buffer = "",
-- -- path = "",
-- -- emoji = "",
-- -- })[entry.source.name]
-- -- return vim_item
-- -- end,
-- }
-- opts.confirm_opts = {
-- behavior = cmp.ConfirmBehavior.Replace,
-- select = false,
-- }
end,
},
}

View file

@ -1,11 +1,12 @@
return {
{ "echasnovski/mini.nvim", enabled = false },
{ "echasnovski/mini.nvim", enabled = true },
{ "echasnovski/mini.pairs", enabled = false },
{ "echasnovski/mini.indentscope", enabled = false },
{ "lukas-reineke/indent-blankline.nvim", enabled = false },
{ "goolord/alpha-nvim", enabled = false },
{ "rcarriga/nvim-notify", enabled = false },
{ "ggandor/flit.nvim", enabled = false },
{ "stevearc/dressing.nvim", enabled = false },
{ "folke/neodev.nvim", enabled = false },
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
-- { "folke/neodev.nvim", enabled = false },
-- { "nvim-neo-tree/neo-tree.nvim", enabled = false },
}

View file

@ -1,267 +0,0 @@
-- since this is just an example spec, don't actually load anything here and return an empty spec
-- stylua: ignore
if true then return {} end
-- every spec file under config.plugins will be loaded automatically by lazy.nvim
--
-- In your plugin files, you can:
-- * add extra plugins
-- * disable/enabled LazyVim plugins
-- * override the configuration of LazyVim plugins
return {
-- add gruvbox
{ "ellisonleao/gruvbox.nvim" },
-- Configure LazyVim to load gruvbox
{
"LazyVim/LazyVim",
opts = {
colorscheme = "gruvbox",
},
},
-- change trouble config
{
"folke/trouble.nvim",
-- opts will be merged with the parent spec
opts = { use_diagnostic_signs = true },
},
-- disable trouble
{ "folke/trouble.nvim", enabled = false },
-- add symbols-outline
{
"simrat39/symbols-outline.nvim",
cmd = "SymbolsOutline",
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
config = true,
},
-- override nvim-cmp and add cmp-emoji
{
"hrsh7th/nvim-cmp",
dependencies = { "hrsh7th/cmp-emoji" },
---@param opts cmp.ConfigSchema
opts = function(_, opts)
local cmp = require("cmp")
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
end,
},
-- change some telescope options and a keymap to browse plugin files
{
"nvim-telescope/telescope.nvim",
keys = {
-- add a keymap to browse plugin files
-- stylua: ignore
{
"<leader>fp",
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
desc = "Find Plugin File",
},
},
-- change some options
opts = {
defaults = {
layout_strategy = "horizontal",
layout_config = { prompt_position = "top" },
sorting_strategy = "ascending",
winblend = 0,
},
},
},
-- add telescope-fzf-native
{
"telescope.nvim",
dependencies = {
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
config = function()
require("telescope").load_extension("fzf")
end,
},
},
-- add pyright to lspconfig
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- pyright will be automatically installed with mason and loaded with lspconfig
pyright = {},
},
},
},
-- add tsserver and setup with typescript.nvim instead of lspconfig
{
"neovim/nvim-lspconfig",
dependencies = {
"jose-elias-alvarez/typescript.nvim",
init = function()
require("lazyvim.util").on_attach(function(_, buffer)
-- stylua: ignore
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
end)
end,
},
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- tsserver will be automatically installed with mason and loaded with lspconfig
tsserver = {},
},
-- you can do any additional lsp server setup here
-- return true if you don't want this server to be setup with lspconfig
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
setup = {
-- example to setup with typescript.nvim
tsserver = function(_, opts)
require("typescript").setup({ server = opts })
return true
end,
-- Specify * to use this function as a fallback for any server
-- ["*"] = function(server, opts) end,
},
},
},
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
{ import = "lazyvim.plugins.extras.lang.typescript" },
-- add more treesitter parsers
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"help",
"html",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"tsx",
"typescript",
"vim",
"yaml",
},
},
},
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
-- would overwrite `ensure_installed` with the new value.
-- If you'd rather extend the default config, use the code below instead:
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- add tsx and treesitter
vim.list_extend(opts.ensure_installed, {
"tsx",
"typescript",
})
end,
},
-- the opts function can also be used to change the default opts:
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
table.insert(opts.sections.lualine_x, "😄")
end,
},
-- or you can return new options to override all the defaults
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function()
return {
--[[add your custom lualine config here]]
}
end,
},
-- use mini.starter instead of alpha
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
-- add jsonls and schemastore ans setup treesitter for json, json5 and jsonc
{ import = "lazyvim.plugins.extras.lang.json" },
-- add any tools you want to have installed below
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
},
},
},
-- Use <tab> for completion and snippets (supertab)
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
{
"L3MON4D3/LuaSnip",
keys = function()
return {}
end,
},
-- then: setup supertab in cmp
{
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-emoji",
},
---@param opts cmp.ConfigSchema
opts = function(_, opts)
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local luasnip = require("luasnip")
local cmp = require("cmp")
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
-- they way you will only jump inside the snippet region
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
})
end,
},
}

View file

@ -1,3 +1,9 @@
return {
{ "j-hui/fidget.nvim" },
{
"j-hui/fidget.nvim",
enabled = true,
init = function()
require("fidget").setup()
end,
},
}

View file

@ -15,29 +15,34 @@ return {
},
},
messages = {
enabled = false,
enabled = true,
},
popupmenu = {
enabled = false,
backend = "cmp",
backend = "nui",
},
presets = {
bottom_search = true,
command_palette = false,
long_message_to_split = true,
inc_rename = false,
lsp_doc_border = true,
},
lsp = {
progress = {
enabled = false,
},
},
views = {
popupmenu = {
relative = "cursor",
position = {
row = 0,
col = 0,
},
enabled = true,
},
},
status = {},
-- views = {
-- popupmenu = {
-- relative = "cursor",
-- position = {
-- row = 0,
-- col = 0,
-- },
-- },
-- },
-- routes = {
-- view = "cmdline",
-- filter = {

View file

@ -1,8 +1,8 @@
return {
{
"nvim-tree/nvim-tree.lua",
},
{
"nvim-tree/nvim-web-devicons",
},
-- {
-- "nvim-tree/nvim-tree.lua",
-- },
-- {
-- "nvim-tree/nvim-web-devicons",
-- },
}