add flash, noice. update to remove coq

This commit is contained in:
Alex Muszynski
2025-04-13 19:10:27 -04:00
parent b14b659204
commit 8fa24ea055
5 changed files with 140 additions and 189 deletions
+110 -85
View File
@@ -1,87 +1,112 @@
return { -- Autocompletion return { -- Autocompletion
-- 'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
-- event = 'InsertEnter', event = 'InsertEnter',
-- dependencies = { dependencies = {
-- -- Snippet Engine & its associated nvim-cmp source -- Snippet Engine & its associated nvim-cmp source
-- 'saadparwaiz1/cmp_luasnip', {
-- 'L3MON4D3/LuaSnip',
-- -- Adds other completion capabilities. build = (function()
-- -- nvim-cmp does not ship with all sources by default. They are split -- Build Step is needed for regex support in snippets.
-- -- into multiple repos for maintenance purposes. -- This step is not supported in many windows environments.
-- 'hrsh7th/cmp-nvim-lsp', -- Remove the below condition to re-enable on windows.
-- 'hrsh7th/cmp-path', if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
-- }, return
-- config = function() end
-- -- See `:help cmp` return 'make install_jsregexp'
-- local cmp = require 'cmp' end)(),
-- local luasnip = require 'luasnip' dependencies = {
-- luasnip.config.setup {} -- `friendly-snippets` contains a variety of premade snippets.
-- -- See the README about individual language/framework/plugin snippets:
-- cmp.setup { -- https://github.com/rafamadriz/friendly-snippets
-- snippet = { -- {
-- expand = function(args) -- 'rafamadriz/friendly-snippets',
-- luasnip.lsp_expand(args.body) -- config = function()
-- end, -- require('luasnip.loaders.from_vscode').load {
-- }, -- exclude = { 'javascript' },
-- completion = { completeopt = 'menu,menuone,noinsert' }, -- }
-- -- end,
-- -- For an understanding of why these mappings were -- },
-- -- chosen, you will need to read `:help ins-completion` },
-- -- },
-- -- No, but seriously. Please read `:help ins-completion`, it is really good! 'saadparwaiz1/cmp_luasnip',
-- mapping = cmp.mapping.preset.insert {
-- -- Select the [n]ext item -- Adds other completion capabilities.
-- ['<C-n>'] = cmp.mapping.select_next_item(), -- nvim-cmp does not ship with all sources by default. They are split
-- -- Select the [p]revious item -- into multiple repos for maintenance purposes.
-- ['<C-p>'] = cmp.mapping.select_prev_item(), 'hrsh7th/cmp-nvim-lsp',
-- 'hrsh7th/cmp-path',
-- -- Scroll the documentation window [b]ack / [f]orward },
-- ['<C-b>'] = cmp.mapping.scroll_docs(-4), config = function()
-- ['<C-f>'] = cmp.mapping.scroll_docs(4), -- See `:help cmp`
-- local cmp = require 'cmp'
-- -- Accept ([y]es) the completion. local luasnip = require 'luasnip'
-- -- This will auto-import if your LSP supports it. luasnip.config.setup {}
-- -- This will expand snippets if the LSP sent a snippet.
-- ['<C-y>'] = cmp.mapping.confirm { select = true }, cmp.setup {
-- snippet = {
-- -- If you prefer more traditional completion keymaps, expand = function(args)
-- -- you can uncomment the following lines luasnip.lsp_expand(args.body)
-- --['<CR>'] = cmp.mapping.confirm { select = true }, end,
-- --['<Tab>'] = cmp.mapping.select_next_item(), },
-- --['<S-Tab>'] = cmp.mapping.select_prev_item(), completion = { completeopt = 'menu,menuone,noinsert' },
--
-- -- Manually trigger a completion from nvim-cmp. -- For an understanding of why these mappings were
-- -- Generally you don't need this, because nvim-cmp will display -- chosen, you will need to read `:help ins-completion`
-- -- completions whenever it has completion options available. --
-- ['<C-Space>'] = cmp.mapping.complete {}, -- No, but seriously. Please read `:help ins-completion`, it is really good!
-- mapping = cmp.mapping.preset.insert {
-- -- Think of <c-l> as moving to the right of your snippet expansion. -- Select the [n]ext item
-- -- So if you have a snippet that's like: ['<C-n>'] = cmp.mapping.select_next_item(),
-- -- function $name($args) -- Select the [p]revious item
-- -- $body ['<C-p>'] = cmp.mapping.select_prev_item(),
-- -- end
-- -- -- Scroll the documentation window [b]ack / [f]orward
-- -- <c-l> will move you to the right of each of the expansion locations. ['<C-b>'] = cmp.mapping.scroll_docs(-4),
-- -- <c-h> is similar, except moving you backwards. ['<C-f>'] = cmp.mapping.scroll_docs(4),
-- ['<C-l>'] = cmp.mapping(function()
-- if luasnip.expand_or_locally_jumpable() then -- Accept ([y]es) the completion.
-- luasnip.expand_or_jump() -- This will auto-import if your LSP supports it.
-- end -- This will expand snippets if the LSP sent a snippet.
-- end, { 'i', 's' }), ['<C-y>'] = cmp.mapping.confirm { select = true },
-- ['<C-h>'] = cmp.mapping(function()
-- if luasnip.locally_jumpable(-1) then -- If you prefer more traditional completion keymaps,
-- luasnip.jump(-1) -- you can uncomment the following lines
-- end --['<CR>'] = cmp.mapping.confirm { select = true },
-- end, { 'i', 's' }), --['<Tab>'] = cmp.mapping.select_next_item(),
-- --['<S-Tab>'] = cmp.mapping.select_prev_item(),
-- -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps -- Manually trigger a completion from nvim-cmp.
-- }, -- Generally you don't need this, because nvim-cmp will display
-- sources = { -- completions whenever it has completion options available.
-- { name = 'nvim_lsp' }, ['<C-Space>'] = cmp.mapping.complete {},
-- { name = 'luasnip' },
-- { name = 'path' }, -- Think of <c-l> as moving to the right of your snippet expansion.
-- }, -- So if you have a snippet that's like:
-- } -- function $name($args)
-- end, -- $body
-- end
--
-- <c-l> will move you to the right of each of the expansion locations.
-- <c-h> is similar, except moving you backwards.
['<C-l>'] = cmp.mapping(function()
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
end
end, { 'i', 's' }),
['<C-h>'] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
end, { 'i', 's' }),
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
},
}
end,
} }
-103
View File
@@ -1,103 +0,0 @@
return {
'neovim/nvim-lspconfig', -- REQUIRED: for native Neovim LSP integration
lazy = false, -- REQUIRED: tell lazy.nvim to start this plugin at startup
dependencies = {
-- main one
{ 'ms-jpq/coq_nvim', branch = 'coq' },
-- 9000+ Snippets
{ 'ms-jpq/coq.artifacts', branch = 'artifacts' },
-- lua & third party sources -- See https://github.com/ms-jpq/coq.thirdparty
-- Need to **configure separately**
{ 'ms-jpq/coq.thirdparty', branch = '3p' },
-- - shell repl
-- - nvim lua api
-- - scientific calculator
-- - comment banner
-- - etc
},
init = function()
vim.g.coq_settings = {
auto_start = true, -- if you want to start COQ at startup
-- Your COQ settings here
display = {
preview = {
border = 'solid',
},
},
}
end,
config = function()
-- See `:help cmp`
local cmp = require 'coq'
local luasnip = require 'luasnip'
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
completion = { completeopt = 'menu,menuone,noinsert' },
-- For an understanding of why these mappings were
-- chosen, you will need to read `:help ins-completion`
--
-- No, but seriously. Please read `:help ins-completion`, it is really good!
mapping = cmp.mapping.preset.insert {
-- Select the [n]ext item
['<C-n>'] = cmp.mapping.select_next_item(),
-- Select the [p]revious item
['<C-p>'] = cmp.mapping.select_prev_item(),
-- Scroll the documentation window [b]ack / [f]orward
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
-- Accept ([y]es) the completion.
-- This will auto-import if your LSP supports it.
-- This will expand snippets if the LSP sent a snippet.
['<C-y>'] = cmp.mapping.confirm { select = true },
-- If you prefer more traditional completion keymaps,
-- you can uncomment the following lines
--['<CR>'] = cmp.mapping.confirm { select = true },
--['<Tab>'] = cmp.mapping.select_next_item(),
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
-- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display
-- completions whenever it has completion options available.
['<C-Space>'] = cmp.mapping.complete {},
-- Think of <c-l> as moving to the right of your snippet expansion.
-- So if you have a snippet that's like:
-- function $name($args)
-- $body
-- end
--
-- <c-l> will move you to the right of each of the expansion locations.
-- <c-h> is similar, except moving you backwards.
['<C-l>'] = cmp.mapping(function()
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
end
end, { 'i', 's' }),
['<C-h>'] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
end, { 'i', 's' }),
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
},
}
end,
}
+14
View File
@@ -0,0 +1,14 @@
return {
'folke/flash.nvim',
event = 'VeryLazy',
---@type Flash.Config
opts = {},
-- stylua: ignore
keys = {
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
},
}
+1 -1
View File
@@ -143,7 +143,7 @@ return { -- LSP Configuration & Plugins
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers. -- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = vim.tbl_deep_extend('force', capabilities, require('coq').lsp_ensure_capabilities()) capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
-- Enable the following language servers -- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed. -- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
+15
View File
@@ -0,0 +1,15 @@
return {
'folke/noice.nvim',
event = 'VeryLazy',
opts = {
-- add any options here
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
'MunifTanjim/nui.nvim',
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
'rcarriga/nvim-notify',
},
}