Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird behavior with rust #17

Open
EricDriussi opened this issue Aug 22, 2023 · 1 comment
Open

Weird behavior with rust #17

EricDriussi opened this issue Aug 22, 2023 · 1 comment

Comments

@EricDriussi
Copy link

Minimal config (using lazy.nvim):

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"--single-branch",
		"https://github.com/folke/lazy.nvim.git",
		lazypath,
	})
end
vim.opt.runtimepath:prepend(lazypath)


plugin_list = {
	{
		"nvim-treesitter/nvim-treesitter",
		dependencies = {
			{ "filNaj/tree-setter" },
		},
		build = ":TSUpdate",
		config = function()
			require("nvim-treesitter.configs").setup({
				tree_setter = { enable = true },
			})
		end,
	},
}

require("lazy").setup(plugin_list, {})

Given a file test.rs, with the following content:

if f(x) {
    let a = true;
}

When I press "o" in line 2 in normal mode, the code gets mangled:

image

The example is a bit silly, it's an over simplified version of the code that produced this behavior originally.

Specific commits involved (lazy-lock.json):

{
  "lazy.nvim": { "branch": "main", "commit": "dac844ed617dda4f9ec85eb88e9629ad2add5e05" },
  "nvim-treesitter": { "branch": "master", "commit": "2ee71c1a2fa74c10692be10ae420ff0c3a02eb3c" },
  "tree-setter": { "branch": "master", "commit": "2cb29fa95d91e8c6c8615587fe4102e518e6b6c0" },
}
@orhnk
Copy link

orhnk commented Aug 25, 2023

I too see some weird behaviors with rust:

satellite-nvim-showcase-2023-08-25_20.39.27.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants