1
0

only show autocomplete on prompt

This commit is contained in:
Rokas Puzonas 2026-08-10 21:08:58 +03:00
parent 80186c9a54
commit 66c7ccb813
2 changed files with 31 additions and 9 deletions

View File

@ -212,6 +212,16 @@ do
end, end,
}) })
vim.api.nvim_create_autocmd('BufWritePre', {
pattern = { '*.zig', '*.zon' },
callback = function(ev)
vim.lsp.buf.code_action {
context = { only = { 'source.fixAll' } },
apply = true,
}
end,
})
-- Add abbreviation for != => ~= in lua files -- Add abbreviation for != => ~= in lua files
vim.api.nvim_create_autocmd('BufEnter', { vim.api.nvim_create_autocmd('BufEnter', {
group = vim.api.nvim_create_augroup('MyTermOpen', { clear = true }), group = vim.api.nvim_create_augroup('MyTermOpen', { clear = true }),
@ -412,15 +422,11 @@ do
vim.pack.add { gh 'catgoose/nvim-colorizer.lua' } vim.pack.add { gh 'catgoose/nvim-colorizer.lua' }
require('colorizer').setup({ require('colorizer').setup({
RGB = true, parsers = {
RRGGBB = true, names = { enable = false },
names = false, rgb = { enable = true },
RRGGBBAA = true, hsl = { enable = true }
rgb_fn = true, }
hsl_fn = true,
css = false,
css_fn = false,
mode = 'background',
}) })
vim.pack.add { gh 'stevearc/oil.nvim' } vim.pack.add { gh 'stevearc/oil.nvim' }
@ -614,6 +620,8 @@ do
-- stylua = {}, -- Used to format Lua code -- stylua = {}, -- Used to format Lua code
zls = {},
-- Special Lua Config, as recommended by neovim help docs -- Special Lua Config, as recommended by neovim help docs
lua_ls = { lua_ls = {
on_init = function(client) on_init = function(client)
@ -763,6 +771,12 @@ do
-- See `:help blink-cmp-config-keymap` for defining your own keymap -- See `:help blink-cmp-config-keymap` for defining your own keymap
preset = 'default', preset = 'default',
['<C-Space>'] = {
function(cmp)
cmp.show()
end,
},
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
}, },
@ -777,6 +791,10 @@ do
-- By default, you may press `<c-space>` to show the documentation. -- By default, you may press `<c-space>` to show the documentation.
-- Optionally, set `auto_show = true` to show the documentation after a delay. -- Optionally, set `auto_show = true` to show the documentation after a delay.
documentation = { auto_show = false, auto_show_delay_ms = 500 }, documentation = { auto_show = false, auto_show_delay_ms = 500 },
trigger = {
show_on_keyword = false,
show_on_trigger_character = false,
},
}, },
sources = { sources = {

View File

@ -9,6 +9,10 @@
"src": "https://github.com/L3MON4D3/LuaSnip", "src": "https://github.com/L3MON4D3/LuaSnip",
"version": "2.0.0 - 3.0.0" "version": "2.0.0 - 3.0.0"
}, },
"alpha-nvim": {
"rev": "6c6a89d5b068b5251c8bdf0dd57bb921bcfeeb09",
"src": "https://github.com/goolord/alpha-nvim"
},
"blink.cmp": { "blink.cmp": {
"rev": "78336bc89ee5365633bcf754d93df01678b5c08f", "rev": "78336bc89ee5365633bcf754d93df01678b5c08f",
"src": "https://github.com/saghen/blink.cmp", "src": "https://github.com/saghen/blink.cmp",