diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-07-07 18:19:24 +0200 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-07-07 18:19:24 +0200 |
| commit | 4e0fc600e79668c500552a83e68094a4083c89ac (patch) | |
| tree | 27be0f1cb6a6af2d0985c4a95f9ce6bcf709fd3e | |
| parent | d7693f1e7532b584eb5e4c13b0adac177e8d5153 (diff) | |
| download | dotfiles-4e0fc600e79668c500552a83e68094a4083c89ac.tar.gz dotfiles-4e0fc600e79668c500552a83e68094a4083c89ac.zip | |
add minimal-nvim config and make it default
| -rwxr-xr-x | install.sh | 2 | ||||
| -rw-r--r-- | minimal-nvim/.config/nvim/.gitignore | 1 | ||||
| -rw-r--r-- | minimal-nvim/.config/nvim/init.lua | 46 |
3 files changed, 48 insertions, 1 deletions
diff --git a/install.sh b/install.sh index e67a35a..d0b9878 100755 --- a/install.sh +++ b/install.sh @@ -6,7 +6,7 @@ SCRIPTPATH=$(dirname "$SCRIPT") cd $SCRIPTPATH # Ignore list -IGNORE=("bin" "wallpaper" "install.sh" ".git" "scripts" "git") +IGNORE=("bin" "wallpaper" "install.sh" ".git" "scripts" "git" "nvim") printf "Start installing dotfiles\n\n" printf "Ignore: %s\n" "${IGNORE[@]}" diff --git a/minimal-nvim/.config/nvim/.gitignore b/minimal-nvim/.config/nvim/.gitignore new file mode 100644 index 0000000..33dbcf7 --- /dev/null +++ b/minimal-nvim/.config/nvim/.gitignore @@ -0,0 +1 @@ +pack diff --git a/minimal-nvim/.config/nvim/init.lua b/minimal-nvim/.config/nvim/init.lua new file mode 100644 index 0000000..c41fa05 --- /dev/null +++ b/minimal-nvim/.config/nvim/init.lua @@ -0,0 +1,46 @@ +vim.opt.clipboard = 'unnamedplus' +vim.opt.mouse = 'a' +vim.opt.shell='/bin/bash' +vim.opt.undofile = true + +vim.opt.backup=false +vim.opt.writebackup=false +vim.opt.updatetime=300 +vim.opt.signcolumn="yes" + +vim.opt.tabstop = 4 -- number of visual spaces per TAB +vim.opt.softtabstop = 4 -- number of spacesin tab when editing +vim.opt.shiftwidth = 4 -- insert 4 spaces on a tab +vim.opt.expandtab = true -- tabs are spaces, mainly because of python +vim.opt.smartindent=true +vim.opt.autoindent=true +vim.opt.smarttab=true + +vim.opt.number = true -- show absolute number +vim.opt.relativenumber = true -- add numbers to each line on the left side +vim.opt.splitbelow = true -- open new vertical split bottom +vim.opt.splitright = true -- open new horizontal splits right +vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI + +vim.opt.incsearch = true -- search as characters are entered +vim.opt.ignorecase = true -- ignore case in searches by default +vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered + +vim.o.laststatus = 0 + +vim.keymap.set("i", "jk", "<Esc>", {}) + +vim.keymap.set('n', '<space>y', function() vim.fn.setreg('+', vim.fn.expand('%:p')) end) +vim.keymap.set("n", "<space>c", function() vim.ui.input({}, function(c) if c and c~="" then + vim.cmd("noswapfile vnew") vim.bo.buftype = "nofile" vim.bo.bufhidden = "wipe" + vim.api.nvim_buf_set_lines(0, 0, -1, false, vim.fn.systemlist(c)) end end) end) + +local plugin_dir = vim.fn.stdpath('config') .. '/pack/vendor/start/everforest-nvim/' +local command = {'git', 'clone', 'https://github.com/neanias/everforest-nvim.git', plugin_dir} + +local on_done = function() + vim.cmd('packloadall! | helptags ALL') + vim.cmd("colorscheme everforest") +end + +vim.fn.jobstart(command, {on_exit = on_done}) |