Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
720b17f970 | |||
b9a2aa868b | |||
502d32490b | |||
51e25a94b4 | |||
1eac633c4f |
@ -24,7 +24,7 @@ opt.pumblend = 10 -- Popup blend
|
||||
opt.pumheight = 10 -- Maximum number of entries in a popup
|
||||
opt.relativenumber = true -- Relative line numbers
|
||||
opt.scrolloff = 4 -- Lines of context
|
||||
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
|
||||
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp" }
|
||||
opt.shiftround = true -- Round indent
|
||||
opt.shiftwidth = 2 -- Size of an indent
|
||||
opt.shortmess:append({ W = true, I = true, c = true, C = true })
|
||||
|
@ -67,12 +67,12 @@ return {
|
||||
select = true,
|
||||
}), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}),
|
||||
sources = {
|
||||
{ name = "nvim_lsp", group_index = 1 },
|
||||
{ name = "luasnip", group_index = 1 },
|
||||
{ name = "buffer", group_index = 2 },
|
||||
{ name = "path", group_index = 2 },
|
||||
},
|
||||
formatting = {
|
||||
format = function(_, item)
|
||||
local icons = require("lazyvim.config").icons.kinds
|
||||
|
@ -17,9 +17,8 @@ return {
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, 1, { name = "codeium", group_index = 2 })
|
||||
table.insert(opts.sources, 1, { name = "codeium", group_index = 1 })
|
||||
opts.sorting = opts.sorting or require("cmp.config.default")().sorting
|
||||
end,
|
||||
},
|
||||
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ return {
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, 1, { name = "copilot", group_index = 2 })
|
||||
table.insert(opts.sources, 1, { name = "copilot", group_index = 1 })
|
||||
opts.sorting = opts.sorting or require("cmp.config.default")().sorting
|
||||
table.insert(opts.sorting.comparators, 1, require("copilot_cmp.comparators").prioritize)
|
||||
end,
|
||||
|
@ -82,6 +82,17 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("bufferline").setup(opts)
|
||||
-- Fix bufferline when restoring a session
|
||||
vim.api.nvim_create_autocmd("BufAdd", {
|
||||
callback = function()
|
||||
vim.schedule(function()
|
||||
pcall(nvim_bufferline)
|
||||
end)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- statusline
|
||||
|
@ -3,6 +3,10 @@ local Util = require("lazy.core.util")
|
||||
local M = {}
|
||||
|
||||
M.root_patterns = { ".git", "lua" }
|
||||
function M.get_clients(...)
|
||||
local fn = vim.lsp.get_clients or vim.lsp.get_active_clients
|
||||
return fn(...)
|
||||
end
|
||||
|
||||
---@param on_attach fun(client, buffer)
|
||||
function M.on_attach(on_attach)
|
||||
@ -49,8 +53,6 @@ function M.opts(name)
|
||||
return Plugin.values(plugin, "opts", false)
|
||||
end
|
||||
|
||||
M.get_clients = vim.lsp.get_clients or vim.lsp.get_active_clients
|
||||
|
||||
-- returns the root directory based on:
|
||||
-- * lsp workspace folders
|
||||
-- * lsp root_dir
|
||||
|
Reference in New Issue
Block a user