diff --git a/.editorconfig b/.editorconfig index 332c8e7..8184d69 100644 --- a/.editorconfig +++ b/.editorconfig @@ -38,7 +38,7 @@ continuation_indent = 4 # this mean utf8 length , if this is 'unset' then the line width is no longer checked # this option decides when to chopdown the code -max_line_length = 80 +max_line_length = 100 # optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf # in neovim the value 'auto' is not a valid option, please use 'unset' diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index a2293f4..451cca0 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -11,7 +11,6 @@ vim.keymap.set("n", "", function () vim.cmd.write({ mods = { silent = true, }, }) end) -- Cycle buffers --- TODO: change to :bnext and :bprev vim.keymap.set("n", "", vim.cmd.bnext) vim.keymap.set("n", "", vim.cmd.bprev) @@ -20,6 +19,14 @@ vim.keymap.set("n", "", "zz") vim.keymap.set("n", "", "zz") vim.keymap.set("n", "n", "nzzzv") vim.keymap.set("n", "N", "Nzzzv") +-- nnoremap j v:count ? 'j' : 'gj' +-- nnoremap k v:count ? 'k' : 'gk' +vim.keymap.set("n", "j", function () + return vim.v.count == 0 and "gj" or "j" +end, { expr = true }) +vim.keymap.set("n", "k", function () + return vim.v.count == 0 and "gk" or "k" +end, { expr = true }) --- General mappings --- -- yank/put using named register diff --git a/lua/core/options.lua b/lua/core/options.lua index 7287519..5bf9fb6 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -77,7 +77,7 @@ vim.cmd.filetype("plugin on") vim.opt.hlsearch = true vim.opt.laststatus = 3 vim.opt.textwidth = 0 -vim.opt.colorcolumn = "81" +vim.opt.colorcolumn = "101" vim.opt.shortmess:append("a") vim.opt.autoread = true -- vim.opt.cmdheight = 0 -- To hide cmdline when not used. Disabled due to diff --git a/lua/lsp/diagnosticls.lua b/lua/lsp/diagnosticls.lua index ad28787..a0e3995 100644 --- a/lua/lsp/diagnosticls.lua +++ b/lua/lsp/diagnosticls.lua @@ -34,6 +34,8 @@ return { flake8 = { command = "flake8", args = { + "--max-line-length=100", + "--max-doc-length=100", "--format", "%(row)d,%(col)d,%(code).1s,%(code)s: %(text)s", "-", @@ -131,7 +133,7 @@ return { black = { command = "black", args = { - "--line-length", "80", + "--line-length", "100", "--stdin-filename", "%filename", "--quiet",