diff --git a/neovim/default.nix b/neovim/default.nix index 3829ece..11e7109 100644 --- a/neovim/default.nix +++ b/neovim/default.nix @@ -6,7 +6,7 @@ viAlias = true; vimAlias = true; defaultEditor = true; - plugins = with pkgs.vimPlugins; [ vim-nix ]; + plugins = with pkgs.vimPlugins; [ vim-nix vim-markdown ]; extraConfig = builtins.readFile ./vimrc; }; } diff --git a/neovim/vimrc b/neovim/vimrc index 50b4ca7..024d2fd 100644 --- a/neovim/vimrc +++ b/neovim/vimrc @@ -1,7 +1,5 @@ " Temporary configuration for editing Nix files -syntax on -set autoindent -set expandtab +syntax on set autoindent set expandtab set tabstop=2 set shiftwidth=2 @@ -19,5 +17,11 @@ map s :vsplit set clipboard+=unnamedplus " Markdown configuration -autocmd FileType markdown setlocal spell -autocmd FileType markdown setlocal linebreak +autocmd FileType markdown setlocal spell spelllang+=cjk linebreak expandtab +let g:vim_markdown_fenced_languages = ['rs=rust', 'RS=rust'] " https://github.com/preservim/vim-markdown/issues/618 +let g:vim_markdown_frontmatter = 1 + +" Tegaki Tuesday formatting +autocmd BufRead,BufNewFile */tegakituesday.com/content/** set formatoptions-=r +" prevent automatically adding new hyphen on enter, though causes some issues +" https://stackoverflow.com/a/4896097