codex fix
This commit is contained in:
parent
ffd426471d
commit
0286a405dc
2 changed files with 22 additions and 6 deletions
|
|
@ -9,6 +9,19 @@ return {
|
||||||
config = function()
|
config = function()
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
-- vim.env.FLUTTER_FORCE_COLOR = "1"
|
-- vim.env.FLUTTER_FORCE_COLOR = "1"
|
||||||
|
local project_root = vim.fn.getcwd()
|
||||||
|
local analysis_excluded_folders = {
|
||||||
|
project_root .. "/.dart_tool",
|
||||||
|
project_root .. "/build",
|
||||||
|
project_root .. "/ios/Pods",
|
||||||
|
project_root .. "/android/.gradle",
|
||||||
|
}
|
||||||
|
local flutter_bin = vim.fn.exepath("flutter")
|
||||||
|
if flutter_bin ~= "" then
|
||||||
|
local flutter_sdk = vim.fn.fnamemodify(vim.fn.resolve(flutter_bin), ":h:h")
|
||||||
|
table.insert(analysis_excluded_folders, flutter_sdk .. "/packages")
|
||||||
|
table.insert(analysis_excluded_folders, flutter_sdk .. "/.pub-cache")
|
||||||
|
end
|
||||||
|
|
||||||
-- Auto scroll & Color logs when new logs appear
|
-- Auto scroll & Color logs when new logs appear
|
||||||
vim.api.nvim_create_autocmd({ "TextChanged", "BufWinEnter" }, {
|
vim.api.nvim_create_autocmd({ "TextChanged", "BufWinEnter" }, {
|
||||||
|
|
@ -45,12 +58,16 @@ return {
|
||||||
end,
|
end,
|
||||||
settings = {
|
settings = {
|
||||||
showTodos = true,
|
showTodos = true,
|
||||||
completeFunctionCalls = true,
|
completeFunctionCalls = false,
|
||||||
updateImportsOnRename = true,
|
updateImportsOnRename = true,
|
||||||
|
analysisExcludedFolders = analysis_excluded_folders,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
widget_guides = {
|
widget_guides = {
|
||||||
enabled = true,
|
enabled = false,
|
||||||
|
},
|
||||||
|
closing_tags = {
|
||||||
|
enabled = false,
|
||||||
},
|
},
|
||||||
dev_log = {
|
dev_log = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,6 @@ return {
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
fallback()
|
|
||||||
end,
|
end,
|
||||||
}),
|
}),
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
|
@ -126,11 +125,11 @@ return {
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "nvim_lsp", keyword_length = 1 },
|
{ name = "nvim_lsp", keyword_length = 2 },
|
||||||
{ name = "luasnip", keyword_length = 1 },
|
{ name = "luasnip", keyword_length = 2 },
|
||||||
{
|
{
|
||||||
name = "buffer",
|
name = "buffer",
|
||||||
keyword_length = 2,
|
keyword_length = 3,
|
||||||
-- Limit indexing to only the active visible buffer to stop lag on Enter
|
-- Limit indexing to only the active visible buffer to stop lag on Enter
|
||||||
option = {
|
option = {
|
||||||
get_bufnrs = function()
|
get_bufnrs = function()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue