Comments (1)
I don't believe this has anything to do with LazyVim. It's one of the plugins. Either nvim-cmp
or native snippets
source for nvim-cmp
, not sure which of the 2. However, I managed to reproduce this behavior with this minimal repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
vim.o.shiftwidth = 2
vim.o.tabstop = 2
vim.o.expandtab = true
vim.o.smartindent = true
vim.o.autoindent = true
vim.o.smarttab = true
-- install plugins
local plugins = {
{ "folke/tokyonight.nvim" },
{
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
},
config = function()
local cmp = require("cmp")
cmp.setup({
completion = { completeopt = "menu,menuone,noinsert" },
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "snippets" }, -- For vsnip users.
-- { name = 'luasnip' }, -- For luasnip users.
-- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users.
}, {
{ name = "buffer" },
}),
})
end,
},
{
"neovim/nvim-lspconfig",
dependencies = {
{ "folke/neodev.nvim", opts = {} },
{
"williamboman/mason-lspconfig.nvim",
opts = {
ensure_installed = { "lua_ls" },
},
dependencies = {
"williamboman/mason.nvim",
opts = {},
},
},
},
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
require("lspconfig").lua_ls.setup({
settings = {
Lua = {
completion = {
callSnippet = "Replace",
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME,
"${3rd}/luv/library",
},
},
},
},
})
vim.keymap.set({ "i", "s" }, "<Tab>", function()
if vim.snippet.active({ direction = 1 }) then
return "<cmd>lua vim.snippet.jump(1)<cr>"
else
return "<Tab>"
end
end, { expr = true })
vim.keymap.set({ "i", "s" }, "<S-Tab>", function()
if vim.snippet.active({ direction = -1 }) then
return "<cmd>lua vim.snippet.jump(-1)<cr>"
else
return "<S-Tab>"
end
end, { expr = true })
You can save it in your config folder and then run nvim -u repro.lua
to see the same behavior.
from lazyvim.
Related Issues (20)
- bug: Custom snippets not working after latest update HOT 15
- bug: tab navigation breaks after Lsp initlization HOT 5
- bug: Uninstalling a(ny) plugin will reinstall the plugin on next load. HOT 1
- bug: after LspRestart nvim spams method textDocument/documentHighlight is not supported by any of the servers registered for the current buffer HOT 8
- bug: Windows line-endings in README-DE.md causing upgrade problems HOT 1
- bug: Gitui broke after neovim 0.10.0 update HOT 11
- bug: Svelte files are un-usable after update
- bug: intelephense or php actor doesnt attach to a buffer HOT 3
- bug: attempt to call field 'supports_method' HOT 2
- bug: LazyVim.telescope unexpected behavior in monorepos HOT 1
- bug: snippets broken in Svelte after latest update HOT 12
- bug: which-key hunks prefix does not work HOT 5
- bug: eslint is sometimes extremely slow HOT 1
- bug: Auto Jump Includes Declaration HOT 2
- bug: blade.php isn't loading blade language for treeister
- bug: Errors when editing vue files HOT 44
- bug: extra trouble-v3 has keys conflict with extra outline HOT 1
- feature: add support for tsserver plugins (like vue) HOT 3
- bug: Error message when opening file HOT 2
- bug: Bufferline and layout breaks when opening file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazyvim.