mirror of https://github.com/LazyVim/starter
feat(plugins): configure blink.cmp to enable conditionally
parent
0d5bd8fe34
commit
27663b8ed6
|
@ -8,3 +8,4 @@ foo.*
|
|||
data
|
||||
lua/plugins/.example.lua.swp
|
||||
lua/plugins/.example.lua.swp
|
||||
blink-disabled
|
||||
|
|
|
@ -54,17 +54,23 @@ keyset("n", "<leader>rn", "<Plug>(coc-rename)", { desc = "Coc: Rename" })
|
|||
|
||||
keyset("v", "\\r", "<Plug>(coc-codeaction-refactor-selected)", { desc = "Coc: Refactor Selected" })
|
||||
keyset("n", "\\cl", "<Plug>(coc-codelens-action)", { desc = "Coc: CodeLens Action" })
|
||||
-- Resolve Coc conflicting keymaps
|
||||
keyset("i", "<C-e>", "<End>", { desc = "Goto end" })
|
||||
|
||||
-- Now configure shortcuts for MacOS
|
||||
-- if vim.g.neovide then
|
||||
map_all_mode("<D-s>", '<Cmd>w<CR>') -- Save
|
||||
map_all_mode("<D-s>", "<Cmd>w<CR>") -- Save
|
||||
map_all_mode("<D-w>", function()
|
||||
local success, _ = pcall(function() vim.cmd('tabclose') end)
|
||||
local success, _ = pcall(function()
|
||||
vim.cmd("tabclose")
|
||||
end)
|
||||
if not success then
|
||||
vim.notify("Cannot close the last tab page", vim.log.levels.WARN)
|
||||
end
|
||||
end, { desc = "Close current tab" })
|
||||
map_all_mode("<D-z>", function() vim.cmd("undo") end)
|
||||
map_all_mode("<D-z>", function()
|
||||
vim.cmd("undo")
|
||||
end)
|
||||
keyset("i", "<D-v>", '<C-O>"+P')
|
||||
keyset("c", "<D-v>", "<C-R>+")
|
||||
keyset("n", "<D-v>", '"+p', { desc = "Paste from clipboard" })
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-- Add any additional options here
|
||||
vim.o.clipboard = ""
|
||||
vim.o.guifont = "Monaco:h16"
|
||||
vim.cmd('set wrap')
|
||||
vim.cmd("set wrap")
|
||||
local dap = require("dap")
|
||||
|
||||
dap.adapters.python = {
|
||||
|
|
|
@ -11,11 +11,11 @@ return {
|
|||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
kind_filter = { tex = true }
|
||||
}
|
||||
kind_filter = { tex = true },
|
||||
},
|
||||
},
|
||||
{
|
||||
'tomasr/molokai', -- colorscheme
|
||||
"tomasr/molokai", -- colorscheme
|
||||
config = function()
|
||||
vim.cmd.colorscheme("molokai")
|
||||
end,
|
||||
|
@ -49,14 +49,15 @@ return {
|
|||
"-file-line-error", -- file line error messages
|
||||
},
|
||||
}
|
||||
-- TODO: This seems not used
|
||||
-- Ensuring custom matchers are used
|
||||
vim.g.vimtex_toc_custom_matchers = {
|
||||
{ title = "Theorem", re = [[\v^\s*\\begin\{theorem\}]] },
|
||||
{ title = "Lemma", re = [[\v^\s*\\begin\{lemma\}]] },
|
||||
{ title = "Corollary", re = [[\v^\s*\\begin\{corollary\}]] },
|
||||
{ title = "Definition", re = [[\v^\s*\\begin\{definition\}]] },
|
||||
}
|
||||
end
|
||||
vim.g.vimtex_toc_matchers = vim.g.vimtex_toc_custom_matchers
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
|
@ -68,8 +69,8 @@ return {
|
|||
},
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
lint.linters.ruff.args = { "--ignore=E401", }
|
||||
end
|
||||
lint.linters.ruff.args = { "--ignore=E401" }
|
||||
end,
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
|
@ -80,16 +81,15 @@ return {
|
|||
lua = { "/opt/homebrew/bin/lua" },
|
||||
tex = { "latexindent" },
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
pyright = {
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
"neoclide/coc.nvim",
|
||||
|
@ -139,10 +139,10 @@ return {
|
|||
explorer = {
|
||||
ignored = true,
|
||||
exclude = excluded_list,
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"mbbill/undotree",
|
||||
|
@ -174,7 +174,7 @@ return {
|
|||
{
|
||||
"<leader>du",
|
||||
function()
|
||||
require("dapui").toggle {}
|
||||
require("dapui").toggle({})
|
||||
end,
|
||||
desc = "Dap UI",
|
||||
},
|
||||
|
@ -189,8 +189,8 @@ return {
|
|||
},
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
local dap = require "dap"
|
||||
local dapui = require "dapui"
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
dapui.setup(opts)
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dap.repl.open()
|
||||
|
@ -258,7 +258,7 @@ return {
|
|||
},
|
||||
{
|
||||
-- Make sure to set this up properly if you have lazy=true
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
opts = {
|
||||
file_types = { "markdown", "Avante" },
|
||||
},
|
||||
|
@ -268,7 +268,20 @@ return {
|
|||
},
|
||||
{
|
||||
"flin16/vim-overleaf",
|
||||
}
|
||||
},
|
||||
{
|
||||
"Saghen/blink.cmp",
|
||||
opts = {
|
||||
enabled = function()
|
||||
-- Enable when there is no file ~/.config/nvim-options/blink-disabled
|
||||
local path = vim.fn.stdpath("config") .. "/blink-disabled"
|
||||
return not vim.loop.fs_stat(path)
|
||||
end,
|
||||
},
|
||||
},
|
||||
{
|
||||
"giuxtaposition/blink-cmp-copilot",
|
||||
},
|
||||
}
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
|
|
Loading…
Reference in New Issue