diff options
Diffstat (limited to 'lua/core')
-rw-r--r-- | lua/core/init.lua | 2 | ||||
-rw-r--r-- | lua/core/maps.lua | 24 | ||||
-rw-r--r-- | lua/core/opts.lua | 25 |
3 files changed, 51 insertions, 0 deletions
diff --git a/lua/core/init.lua b/lua/core/init.lua new file mode 100644 index 0000000..c296ffb --- /dev/null +++ b/lua/core/init.lua @@ -0,0 +1,2 @@ +require "core.opts" +require "core.maps" diff --git a/lua/core/maps.lua b/lua/core/maps.lua new file mode 100644 index 0000000..57c9b94 --- /dev/null +++ b/lua/core/maps.lua @@ -0,0 +1,24 @@ +local maps = { + n = { + ["<Esc>"] = { "<cmd> noh <CR>", "Clear highlights" }, + }, + + t = { + ["<C-x>"] = { + vim.api.nvim_replace_termcodes("<C-\\><C-N>", true, true, true), + "Escape terminal mode" + }, + }, + + v = { + ["<"] = { "<gv", "Indent line" }, + [">"] = { ">gv", "Indent line" }, + }, +} + + +for mode, keytab in pairs(maps) do + for key, fun in pairs(keytab) do + vim.keymap.set(mode, key, fun[1], { desc = fun[2] }) + end +end diff --git a/lua/core/opts.lua b/lua/core/opts.lua new file mode 100644 index 0000000..11c8413 --- /dev/null +++ b/lua/core/opts.lua @@ -0,0 +1,25 @@ +-- functional +vim.g.mapleader = " " +vim.o.ignorecase = true +vim.o.smartcase = true +vim.o.clipboard = "unnamedplus" +vim.o.undofile = true +vim.o.mouse = false +vim.o.number = true +vim.o.relativenumber = true +vim.o.signcolumn = "yes" + +-- termux like +vim.o.splitright = true +vim.o.splitbelow = true + +-- non-functional +vim.g.netrw_banner = 0 +vim.g.netrw_liststyle = 3 +vim.g.netrw_winsize = 25 +vim.o.breakindent = true +vim.o.termguicolors = true +vim.o.guicursor = false +vim.o.showmode = false +vim.o.numberwidth = 2 +vim.o.ruler = false |