diff options
| -rw-r--r-- | .vim/init.lua | 7 | ||||
| -rw-r--r-- | .vim/lua/colors.lua | 14 | ||||
| -rw-r--r-- | .vim/lua/plugins/_lsp.lua | 16 | ||||
| -rw-r--r-- | .vim/lua/plugins/_signify.lua | 14 |
4 files changed, 27 insertions, 24 deletions
diff --git a/.vim/init.lua b/.vim/init.lua index 3e06bc9..576ea14 100644 --- a/.vim/init.lua +++ b/.vim/init.lua @@ -47,17 +47,16 @@ u.opt('o', 'showcmd', false) u.opt('o', 'laststatus', 2) u.opt('o', 'ruler', true) u.opt('o', 'mouse', 'a') -u.opt('o', 'spell', true) +u.opt('o', 'spell', false) +u.opt('o', 'spelloptions', 'camel') u.opt('o', 'lazyredraw', true) u.opt('o', 'backspace', 'indent,eol,start') u.opt('o', 'undolevels', 1000) u.opt('o', 'updatetime', 300) -u.opt('o', 'signcolumn', 'auto:2') - +u.opt('o', 'signcolumn', 'auto:1') u.opt('w', 'cursorline', true) u.opt('w', 'conceallevel', 2) u.opt('w', 'concealcursor', '') - u.opt('o', 'expandtab', true) -- }}} diff --git a/.vim/lua/colors.lua b/.vim/lua/colors.lua index de4a997..ac6109f 100644 --- a/.vim/lua/colors.lua +++ b/.vim/lua/colors.lua @@ -71,9 +71,9 @@ return lush(function() CursorColumn { ColorColumn }, -- Screen-column at the cursor, when 'cursorcolumn' is set. CursorLine { ColorColumn }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set. -- Directory { }, -- directory names (and other special names in listings) - DiffAdd { fg = hsl(p.bright.green) }, -- diff mode: Added line |diff.txt| - DiffChange { fg = hsl(p.bright.cyan) }, -- diff mode: Changed line |diff.txt| - DiffDelete { fg = hsl(p.bright.red) }, -- diff mode: Deleted line |diff.txt| + DiffAdd { fg = hsl(p.bright.black), bg = hsl(p.bright.green) }, -- diff mode: Added line |diff.txt| + DiffChange { fg = hsl(p.bright.black), bg = hsl(p.bright.cyan) }, -- diff mode: Changed line |diff.txt| + DiffDelete { fg = hsl(p.bright.black), bg = hsl(p.bright.red) }, -- diff mode: Deleted line |diff.txt| DiffText { fg = hsl(p.normal.white) }, -- diff mode: Changed text within a changed line |diff.txt| EndOfBuffer { fg = hsl(p.bright.blue) }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. TermCursor { Cursor }, -- cursor in a focused terminal @@ -282,11 +282,11 @@ return lush(function() IndentGuidesEven { bg = hsl(p.dim.white).darken(40) }, SignifyLineChange { DiffChange }, - SignifySignChange { SignifyLineChange }, SignifyLineAdd { DiffAdd }, - SignifySignAdd { SignifyLineAdd }, SignifyLineDelete { DiffDelete }, - SignifySignDelete { SignifyLineDelete }, + SignifySignChange { fg = SignifyLineChange.bg }, + SignifySignAdd { fg = SignifyLineAdd.bg }, + SignifySignDelete { fg = SignifyLineDelete.bg }, -- git gitcommitSummary { Bold }, @@ -296,7 +296,7 @@ return lush(function() -- gitcommitUntrackedFile {}, -- gitcommitBranch {}, -- gitcommitDiscardedType {}, - gitcommitDiff { fg = hsl(p.dim.white) }, + gitcommitDiff { Comment }, diffFile { fg = hsl(p.bright.yellow) }, diffSubname { diffFile }, diffIndexLine { diffFile }, diff --git a/.vim/lua/plugins/_lsp.lua b/.vim/lua/plugins/_lsp.lua index 9c52998..39a10b9 100644 --- a/.vim/lua/plugins/_lsp.lua +++ b/.vim/lua/plugins/_lsp.lua @@ -32,9 +32,9 @@ local my_attach = function(client) u.augroup2 { lsp_user = { - {'BufWritePre', '*', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}, - {'BufWritePre', '*.go', 'lua vim.lsp.buf.code_action({ source = { organizeImports = true } })'}, - {'CursorHold', '*', 'lua vim.lsp.diagnostic.show_line_diagnostics()'}, + {'BufWritePre' , '*' , 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}, + {'BufWritePre' , '*.go' , 'lua vim.lsp.buf.code_action({ source = { organizeImports = true } })'}, + -- {'CursorHold' , '*' , 'lua vim.lsp.diagnostic.show_line_diagnostics()'}, } } end @@ -43,10 +43,10 @@ end -- configure builtin diagnositcs vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( -- {{{ vim.lsp.diagnostic.on_publish_diagnostics, { - virtual_text = false, - signs = true, - underline = true, - update_in_insert = true, + virtual_text = false, + signs = true, + underline = true, + update_in_insert = false, } ) -- }}} @@ -148,7 +148,7 @@ lsp.efm.setup{ on_attach = my_attach, root_dir = util.root_pattern('.git', '.editorconfig'), init_options = { documentFormatting = true }, - filetypes = { "sh" }, + -- filetypes = { "sh", "c" }, settings = { -- rootMarkers = {".git/"}, languages = { diff --git a/.vim/lua/plugins/_signify.lua b/.vim/lua/plugins/_signify.lua index a91ecb6..41ced80 100644 --- a/.vim/lua/plugins/_signify.lua +++ b/.vim/lua/plugins/_signify.lua @@ -1,6 +1,10 @@ +local def = require('utils').def +local nnoremap = require('astronauta.keymap').nnoremap + vim.g.signify_sign_change = '~' -require('utils').map('n', ']h', '<plug>(signify-next-hunk)', {silent=false}) -require('utils').map('n', '[h', '<plug>(signify-prev-hunk)') -vim.cmd('hi SignifySignChange guibg=NONE ctermbg=NONE') -vim.cmd('hi SignifySignAdd guibg=NONE ctermbg=NONE') -vim.cmd('hi SignifySignDelete guibg=NONE ctermbg=NONE') + +nnoremap { ']h', function() vim.fn['sy#jump#next_hunk'](1) end } +nnoremap { '[h', function() vim.fn['sy#jump#prev_hunk'](1) end } + +def("SignifyNextHunk", [[ call sy#jump#next_hunk(1) ]]) +def("SignifyPrevHunk", [[ call sy#jump#prev_hunk(1) ]]) |