cleanup some vim configs, highlight long parts of lines
This commit is contained in:
parent
82339f122b
commit
8600e668c5
3 changed files with 32 additions and 25 deletions
|
|
@ -1,15 +1,5 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
vim-goyo = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "vim-goyo";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "junegunn";
|
|
||||||
repo = "goyo.vim";
|
|
||||||
rev = "6b6ed2734084fdbb6315357ddcaecf9c8e6f143d";
|
|
||||||
sha256 = "1ywlz1hn54kxyp5q0angriaarimq7ys7m6sk6l4x8jr1g2yh0afz";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
vim-nix = pkgs.vimUtils.buildVimPlugin {
|
vim-nix = pkgs.vimUtils.buildVimPlugin {
|
||||||
name = "vim-nix";
|
name = "vim-nix";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
|
|
@ -74,7 +64,6 @@ with builtins;
|
||||||
vim-javascript
|
vim-javascript
|
||||||
vim-json
|
vim-json
|
||||||
vim-jsx-pretty
|
vim-jsx-pretty
|
||||||
vim-prisma
|
|
||||||
|
|
||||||
vim-commentary
|
vim-commentary
|
||||||
vim-airline
|
vim-airline
|
||||||
|
|
@ -125,9 +114,25 @@ with builtins;
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
undotree
|
{
|
||||||
vim-goyo
|
plugin = undotree;
|
||||||
luasnip
|
config = ''
|
||||||
|
nnoremap <leader>u :UndotreeToggle<CR>
|
||||||
|
let g:undotree_SetFocusWhenToggle = 1
|
||||||
|
if has("persistent_undo")
|
||||||
|
let target_path = expand('~/.undodir')
|
||||||
|
|
||||||
|
" create the directory and any parent directories
|
||||||
|
" if the location does not exist.
|
||||||
|
if !isdirectory(target_path)
|
||||||
|
call mkdir(target_path, "p", 0700)
|
||||||
|
endif
|
||||||
|
|
||||||
|
let &undodir=target_path
|
||||||
|
set undofile
|
||||||
|
endif
|
||||||
|
'';
|
||||||
|
}
|
||||||
cmp-nvim-lsp
|
cmp-nvim-lsp
|
||||||
{
|
{
|
||||||
plugin = nvim-lspconfig;
|
plugin = nvim-lspconfig;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ filetype plugin indent on
|
||||||
let g:netrw_liststyle = 3
|
let g:netrw_liststyle = 3
|
||||||
set nobackup
|
set nobackup
|
||||||
set noswapfile
|
set noswapfile
|
||||||
set pastetoggle=<F2>
|
set pastetoggle=<F3>
|
||||||
set nowrap
|
set nowrap
|
||||||
|
|
||||||
set background=dark
|
set background=dark
|
||||||
|
|
@ -17,8 +17,10 @@ set number relativenumber
|
||||||
set numberwidth=1
|
set numberwidth=1
|
||||||
set cursorline
|
set cursorline
|
||||||
set cursorcolumn
|
set cursorcolumn
|
||||||
|
autocmd WinEnter * if !exists('w:overLengthMatchId') | let w:overLengthMatchId = matchadd('OverLength', '\%81v.\+\%<122v') | endif
|
||||||
|
autocmd WinEnter * if !exists('w:reallyOverLengthMatchId') | let w:reallyOverLengthMatchId = matchadd('ReallyOverLength', '\%121v.\+') | endif
|
||||||
highlight OverLength ctermbg=DarkRed ctermfg=white guibg=#352e10
|
highlight OverLength ctermbg=DarkRed ctermfg=white guibg=#352e10
|
||||||
match OverLength /\%81v.\+/
|
highlight ReallyOverLength ctermbg=Red ctermfg=white guibg=#330000
|
||||||
set termguicolors
|
set termguicolors
|
||||||
set ruler
|
set ruler
|
||||||
set list
|
set list
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
snippet = {
|
-- snippet = {
|
||||||
-- REQUIRED - you must specify a snippet engine
|
-- -- REQUIRED - you must specify a snippet engine
|
||||||
expand = function(args)
|
-- expand = function(args)
|
||||||
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
-- -- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||||
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
-- -- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
-- -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||||
end,
|
-- end,
|
||||||
},
|
-- },
|
||||||
window = {
|
window = {
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered(),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue