diff options
| -rw-r--r-- | config/nvim/init.lua | 52 | ||||
| -rw-r--r-- | config/nvim/lua/mappings.lua | 3 | ||||
| -rw-r--r-- | config/nvim/lua/plugins.lua | 2 |
3 files changed, 29 insertions, 28 deletions
diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 7bfc3f7..e74bb37 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -1,48 +1,47 @@ require('plugins') -- common -vim.g.mapleader = ' ' -- set leader key to space -vim.g.maplocalleader = '-' -- set file local leader key to backslash -vim.opt.compatible = false -- not compatible with vi -vim.opt.number = true -- line number -vim.opt.numberwidth = 1 -- line numbers gutter autowidth -vim.opt.cursorline = true -- highlight current line -vim.opt.showmatch = false -- dont jump to pair bracket -vim.opt.autoread = true -- reload files when changes happen outside vim -vim.opt.autowrite = true -- auto write buf on certain events -vim.opt.hidden = true -- keep change in buffer when quitting window -vim.opt.swapfile = false -- disable swap files -vim.opt.scrolloff = 2 -- line padding when scrolling -vim.opt.textwidth = 0 -- when line wrap occurs -vim.opt.wrapmargin = 0 -- disable auto line wrapping +vim.g.mapleader = ' ' -- set leader key to space +vim.g.maplocalleader = '-' -- set file local leader key to backslash +vim.opt.compatible = false -- not compatible with vi +vim.opt.number = true -- line number +vim.opt.numberwidth = 1 -- line numbers gutter autowidth +vim.opt.cursorline = true -- highlight current line +vim.opt.showmatch = false -- dont jump to pair bracket +vim.opt.autoread = true -- reload files when changes happen outside vim +vim.opt.autowrite = true -- auto write buf on certain events +vim.opt.hidden = true -- keep change in buffer when quitting window +vim.opt.swapfile = false -- disable swap files +vim.opt.scrolloff = 2 -- line padding when scrolling +vim.opt.textwidth = 0 -- when line wrap occurs +vim.opt.wrapmargin = 0 -- disable auto line wrapping vim.opt.clipboard = 'unnamedplus' -- use system clipboard -vim.g.c_syntax_for_h = 1 -- .h file use C filetype instead of C++ -vim.opt.encoding = "utf-8" -- utf-8 encoding --- filetype plugin indent on -- allow to add specific rules for certain type of file --- set mouse=a " mouse scrolling (heretic) -vim.opt.shellredir = ">" -- don't inclue stderr when reading a command +vim.g.c_syntax_for_h = 1 -- .h file use C filetype instead of C++ +vim.opt.encoding = "utf-8" -- utf-8 encoding +vim.opt.shellredir = ">" -- don't inclue stderr when reading a command + -- intuitif split opening vim.opt.splitbelow = true vim.opt.splitright = true -- tab -vim.opt.expandtab = true -- tab to space -vim.opt.tabstop = 4 -- tab size +vim.opt.expandtab = true -- tab to space +vim.opt.tabstop = 4 -- tab size vim.opt.shiftwidth = 4 vim.opt.smarttab = true vim.opt.autoindent = true vim.opt.smartindent = true -- file search -vim.opt.ignorecase = true -- case insensitive +vim.opt.ignorecase = true -- case insensitive vim.opt.smartcase = true -vim.opt.hlsearch = true -- match highlight +vim.opt.hlsearch = true -- match highlight vim.opt.incsearch = true -- status -vim.opt.laststatus=2 -- always a statusline (all window) -vim.opt.showcmd = true -- show current partial command in the bottom right -vim.opt.showmode = false -- dont show current mode (i.e --INSERT--) +vim.opt.laststatus=2 -- always a statusline (all window) +vim.opt.showcmd = true -- show current partial command in the bottom right +vim.opt.showmode = false -- dont show current mode (i.e --INSERT--) -- colorscheme vim.opt.termguicolors = true @@ -55,6 +54,7 @@ vim.g.gruvbox_contrast_dark = 'medium' vim.g.gruvbox_contrast_light = 'hard' vim.g.gruvbox_invert_selection = 0 + local actions = require('telescope.actions') require('telescope').setup { defaults = { diff --git a/config/nvim/lua/mappings.lua b/config/nvim/lua/mappings.lua index 566b647..ef6d8d6 100644 --- a/config/nvim/lua/mappings.lua +++ b/config/nvim/lua/mappings.lua @@ -3,7 +3,7 @@ local map = vim.api.nvim_set_keymap map('', 'Y', 'y$', {}) -- 'Y' yank to the end of the line map('i', 'kj', '<ESC>', {}) -- kj to exit insert mode map('', 'Q', '<nop>', {}) -- remove visual mode keybinding -map('n', '<leader>sc', ':source $MYVIMRC<cr>', {}) -- source vimrc +map('n', '<leader>sc', ':source $MYVIMRC<CR>', {}) -- source vimrc map('n', '<leader>;', 'mqA;<ESC>`q', {}) -- put semicolon at the end of line map('n', 'cu', 'ct_', {}) -- common change until @@ -54,4 +54,3 @@ map('n', 'ga', ':EasyAlign<CR>', {}) map('n', '<C-p>', ':Telescope git_files<CR>', {}) map('n', '<C-h>', ':Telescope help_tags<CR>', {}) - diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index a37dd64..406404d 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -7,6 +7,8 @@ return require('packer').startup(function() use 'AndrewRadev/sideways.vim' -- Move arguments sideways use 'FooSoft/vim-argwrap' -- Put arguments on multiple lines use 'tpope/vim-eunuch' -- basic commands on current file (Rename/Remove) + use 'romainl/vim-cool' -- only highlight search matches when searching + -- color scheme use {'ellisonleao/gruvbox.nvim', requires = {'rktjmp/lush.nvim'}} -- status line |
