mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 11:40:36 +00:00
feat(dap.lua): add virtual text setup for better debugging experience
feat(dap.lua): add support for process.env.PORT environment variable to be able to run app on a configurable port feat(lsp-config.lua): add support for detecting python environment using DPE module feat(lualine.lua): add support for noice statusline component feat(mason.lua): update installed language servers list feat(noice.lua): add configuration for noice plugin feat(none-ls.lua): remove black and mypy formatters from null-ls setup fix(nvim-cmp.lua): change completeopt value to "menu,menuone,preview,noinsert" and add autocomplete trigger event on text change feat(nvim-cmp.lua): add border and winhighlight settings for documentation window to improve visual appearance feat(nvim-cmp.lua): add 'nvim_lsp_signature_help' as a source for autocompletion refactor(colorscheme.lua): refactor SetupWindowPreferences function to dynamically set blend values for highlight groups feat(init.lua): add setting for 'completeopt' to "menuone" feat(plugins/noice.lua): add configuration for 'noice.nvim' plugin with dependencies and event trigger feat(plugins/nvim-treesitter.lua): update configuration to run TSUpdate command silently feat(utils): add Lua utility functions to detect and manage Lua versions and paths feat(utils): add Python utility functions to check and resolve Python environments style(theme): update current theme to 'catppuccin' in Lua script
This commit is contained in:
@@ -1,37 +1,27 @@
|
||||
local cmp = require("cmp")
|
||||
local types = require('cmp.types')
|
||||
local luasnip = require("luasnip")
|
||||
local lspkind = require("lspkind")
|
||||
|
||||
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
local function border(hl_name)
|
||||
return {
|
||||
{ "╭", hl_name },
|
||||
{ "─", hl_name },
|
||||
{ "╮", hl_name },
|
||||
{ "│", hl_name },
|
||||
{ "╯", hl_name },
|
||||
{ "─", hl_name },
|
||||
{ "╰", hl_name },
|
||||
{ "│", hl_name },
|
||||
}
|
||||
end
|
||||
|
||||
cmp.setup({
|
||||
completion = {
|
||||
completeopt = "menu,menuone,preview,noselect",
|
||||
completeopt = "menu,menuone,preview,noinsert",
|
||||
autocomplete = { types.cmp.TriggerEvent.TextChanged },
|
||||
},
|
||||
window = {
|
||||
documentation = {
|
||||
border = { '┌', '─', '┐', '│', '┘', '─', '└', '│' },
|
||||
winhighlight = 'Normal:CmpPmenu,FloatBorder:CmpPmenuBorder,CursorLine:PmenuSel,Search:None',
|
||||
},
|
||||
completion = {
|
||||
side_padding = 1,
|
||||
winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:None",
|
||||
border = { '┌', '─', '┐', '│', '┘', '─', '└', '│' },
|
||||
winhighlight = 'Normal:CmpPmenu,FloatBorder:CmpPmenuBorder,CursorLine:PmenuSel,Search:None',
|
||||
scrollbar = false,
|
||||
},
|
||||
documentation = {
|
||||
border = border "CmpDocBorder",
|
||||
winhighlight = "Normal:CmpDoc",
|
||||
},
|
||||
},
|
||||
snippet = { -- configure how nvim-cmp interacts with snippet engine
|
||||
expand = function(args)
|
||||
@@ -39,16 +29,17 @@ cmp.setup({
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||
["<C-o>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||
["<C-e>"] = cmp.mapping.abort(), -- close completion menu
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- accept current selection
|
||||
}),
|
||||
-- sources for autocompletion
|
||||
sources = cmp.config.sources({
|
||||
{ name = "otter" }, -- custom source for otter completion
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" }, -- snippets
|
||||
{ name = "buffer" }, -- text within current buffer
|
||||
{ name = "path" }, -- file system paths
|
||||
{ name = "path" }, -- file system paths,
|
||||
{ name = 'nvim_lsp_signature_help' },
|
||||
}),
|
||||
-- configure lspkind for vs-code like pictograms in completion menu
|
||||
formatting = {
|
||||
|
||||
Reference in New Issue
Block a user