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

Adding line causes repeatable freeze in neovim #91

Open
kpence opened this issue Mar 29, 2023 · 0 comments
Open

Adding line causes repeatable freeze in neovim #91

kpence opened this issue Mar 29, 2023 · 0 comments

Comments

@kpence
Copy link

kpence commented Mar 29, 2023

If I open a file with this in my nvim:

const std = @import("std");

const Register = struct {
    string: []const u8,
    value: packed union {
        u16: u16,
        split_u8s: packed struct {
            high: u8,
            low: u8,
        },
    },
    fn create(new_string: []const u8) Self {
        return .{
            new_string,
            .{
                .u16 = 0
            },
        };
    }
};

pub fn main() !void {
    const stdout = std.io.getStdOut().writer();
    stdout.writeAll("Hello world");
}

And then add the following line:

@@ -1,6 +1,7 @@
 const std = @import("std");
 
 const Register = struct {
+    const Self = @This;
     string: []const u8,
     value: packed union {
         u16: u16,

This causes my nvim to freeze.

Here is my .vimrc

syntax on
filetype plugin indent on

" Obligatory settings
set autoindent
set cindent
set sw=4
set ts=4
set et
set number
set clipboard=unnamed

" vim plugins
" let g:zig_fmt_autosave = 0
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'tpope/vim-surround'
Plug 'ziglang/zig.vim'
call plug#end()

This is my nvim version:

$ nvim --version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
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

1 participant