Still trying to get LazyVim to match basic-ide

This commit is contained in:
Andy Teijelo 2023-05-20 13:27:54 -04:00
parent 2a9cc31e40
commit ef84dd7069
9 changed files with 181 additions and 47 deletions

View file

@ -1,44 +1,47 @@
{
"LazyVim": { "branch": "main", "commit": "9f2010a8b9fa88ef77d1acf362bab59db4baaef9" },
"LuaSnip": { "branch": "master", "commit": "b4bc24c4925aeb05fd47d2ee9b24b7f73f5d7e32" },
"LazyVim": { "branch": "main", "commit": "23410a4594f4a5332efbccb1f5dd0c989f1a8e09" },
"LuaSnip": { "branch": "master", "commit": "2f78933799ef1a8558057ea7d06d6ccb11140711" },
"bufferline.nvim": { "branch": "main", "commit": "1952c33e425ede785d26aa9e250addfe304a8510" },
"catppuccin": { "branch": "main", "commit": "57b421ee5f7380f816791fa451e86f213b625ece" },
"catppuccin": { "branch": "main", "commit": "8338b02e9a8ffcb999520de7f15943712618760f" },
"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": "f674dae71b9daf5ba4a4daf0734f7780417237b1" },
"gitsigns.nvim": { "branch": "main", "commit": "c18b7ca0b5b50596722f3a1572eb9b8eb520c0f1" },
"lazy.nvim": { "branch": "main", "commit": "c711b4f8a6211a8ea3f3c35f0962ac0b6b8550cc" },
"leap.nvim": { "branch": "main", "commit": "2950d4826fb92ec3b56c59b5d4f2d575a84cb3fa" },
"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": "c55d18f3947562e699d34d89681edbf9f0e250d3" },
"mason.nvim": { "branch": "main", "commit": "08b2fd308e0107eab9f0b59d570b69089fd0b522" },
"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.comment": { "branch": "main", "commit": "923cc39dc2d276e988268c353feb8c24627d180d" },
"mini.nvim": { "branch": "main", "commit": "b3cea506e02226cefbc6bc9ff01175a95c525506" },
"mini.surround": { "branch": "main", "commit": "ea2e9c4cdbddc826dc6eeac69b035f8220f65de5" },
"neoconf.nvim": { "branch": "main", "commit": "4b82da74f904de5aed43ee4320f0f89a703128ec" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "e5594d53986b34e584e8afe2ea6ad99d6f6d2105" },
"neoconf.nvim": { "branch": "main", "commit": "bbf98ce53481e6e8d6507de5a6f18d3264fb0df7" },
"neodev.nvim": { "branch": "main", "commit": "0c5d6c2ac2fadebedf08282d9403ef6c3dc31896" },
"noice.nvim": { "branch": "main", "commit": "c2a745a26ae562f1faecbf6177ac53377d2658d5" },
"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" },
"null-ls.nvim": { "branch": "main", "commit": "77e53bc3bac34cc273be8ed9eb9ab78bcf67fa48" },
"nvim-cmp": { "branch": "main", "commit": "3ac8d6cd29c74ff482d8ea47d45e5081bfc3f5ad" },
"nvim-lspconfig": { "branch": "master", "commit": "6f1d124bbcf03c4c410c093143a86415f46d16a0" },
"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": { "branch": "master", "commit": "3d5fe8caf85ff1e18963b0c6ded1cf6d3a648ffa" },
"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" },
"tokyonight.nvim": { "branch": "main", "commit": "029dca9a40260788d495929d8cc83a9a8ebb6763" },
"trouble.nvim": { "branch": "main", "commit": "2173dffe91fc0914b3b833c6a2f6fe1d3fac2e17" },
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-startuptime": { "branch": "master", "commit": "01b67169c3ebe41f163c07bf6853555ca19bc27f" },
"vim-startuptime": { "branch": "master", "commit": "5ddaf24df23f4d151970987c1322eaa247f08e69" },
"which-key.nvim": { "branch": "main", "commit": "5a6c954a5a46023c19acc03a8b6d7c3e57964fc5" }
}

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

@ -6,3 +6,5 @@ vim.opt.relativenumber = false
vim.opt.conceallevel = 0
vim.opt.completeopt = { "menuone", "noselect" }
vim.opt.timeoutlen = 1000
vim.opt.list = false
vim.opt.pumblend = 0

View file

@ -1,3 +1,6 @@
local cmp = require("cmp")
local luasnip = require("luasnip")
return {
{
"LazyVim/LazyVim",
@ -5,4 +8,110 @@ return {
colorscheme = "catppuccin",
},
},
{
"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,3 +1,3 @@
return {
{ "j-hui/fidget.nvim" },
{ "j-hui/fidget.nvim", lazy = false },
}

10
lua/plugins/lspconfig.lua Normal file
View file

@ -0,0 +1,10 @@
return {}
-- return {
-- "neovim/nvim-lspconfig",
-- config = function(_, opts)
-- -- local Util = require("lazyvim.util")
-- local float = { focusable = true, style = "minimal", border = "rounded" }
-- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, float)
-- vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, float)
-- end,
-- }

View file

@ -1,9 +1,9 @@
return {
"folke/noice.nvim",
enabled = false,
enabled = true,
opts = {
cmdline = {
enabled = true,
-- enabled = true,
view = "cmdline",
format = {
cmdline = false,
@ -15,29 +15,33 @@ return {
},
},
messages = {
enabled = false,
enabled = true,
},
popupmenu = {
enabled = false,
backend = "cmp",
enabled = true,
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,
},
},
-- 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",
-- },
}