fix: remove tab binding

This commit is contained in:
Fabio Lenherr 2023-03-06 14:53:27 +01:00
parent c63ca7ccf6
commit 1873746e77
8 changed files with 85 additions and 63 deletions

View file

@ -2,7 +2,8 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable",
lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
@ -19,7 +20,7 @@ require("lazy").setup({
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
-- If you
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
@ -27,7 +28,8 @@ require("lazy").setup({
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = { enabled = true }, -- automatically check for plugin updates
checker = { enabled = true, notify = false },
change_detection = { enabled = true, notify = false }, --know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
performance = {
rtp = {
-- disable some rtp plugins

View file

@ -1,7 +1,30 @@
return {
{
"L3MON4D3/LuaSnip",
build = (not jit.os:find("Windows"))
and "echo -e 'NOTE: jsregexp is optional, so not a big deal if it fails to build\n'; make install_jsregexp"
or nil,
dependencies = {
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
end,
},
opts = {
history = true,
delete_check_events = "TextChanged",
updateevents = "TextChanged,TextChangedI",
enable_autosnippets = true,
},
keys = function()
return {}
end,
config = function(_, opts)
require("luasnip").setup(opts)
end,
},
{
"hrsh7th/nvim-cmp",
version = false, -- last release is way too old
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
@ -15,13 +38,12 @@ return {
local luasnip = require("luasnip")
return {
preselect = cmp.PreselectMode.None,
-- completion = {
-- completeopt = "menu,menuone,noinsert",
-- },
completion = {
completeopt = "menu,menuone,noinsert",
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
luasnip.lsp_expand(args.body)
end,
},
mapping = {
@ -77,12 +99,12 @@ return {
{ name = "path" },
}),
formatting = {
format = function(_, item)
format = function(entry, item)
local icons = require("lazyvim.config").icons.kinds
if icons[item.kind] then
item.kind = icons[item.kind] .. item.kind
end
return item
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
end,
},
experimental = {
@ -92,20 +114,10 @@ return {
},
}
end,
},
{
"hrsh7th/nvim-cmp",
lazy = true,
dependencies = {
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
},
opts = function(_, opts)
local format_kinds = opts.formatting.format
opts.formatting.format = function(entry, item)
format_kinds(entry, item)
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
end
config = function(_, opts)
local cmp = require("cmp")
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
cmp.setup(opts)
end,
},
}

View file

@ -0,0 +1,4 @@
return {
-- { "L3MON4D3/LuaSnip", enabled = false },
-- { "hrsh7th/nvim-cmp", enabled = false },
}

View file

@ -181,7 +181,7 @@ return {
require("mason-lspconfig").setup({ ensure_installed = ensure_installed })
require("mason-lspconfig").setup_handlers({ setup })
vim.cmd([[highlight LspInlayHint guibg=#192330]])
vim.cmd([[highlight LspInlayHint guibg=#1A1B26]])
end,
},
}

View file

@ -117,6 +117,8 @@ return {
mappings = {
["f"] = "close_window",
},
position = "right",
scan_mode = "deep",
},
},
},