diff options
author | Johannes Ranke <johannes.ranke@jrwb.de> | 2024-12-07 08:48:56 +0100 |
---|---|---|
committer | Johannes Ranke <johannes.ranke@jrwb.de> | 2024-12-07 08:48:56 +0100 |
commit | 12253d3e7c209f6aa77fe58e95a644eb355e1548 (patch) | |
tree | 28eec5029716e38ce2decda13b6da02f3bfc658b | |
parent | 7574a02db9487ca02b15d17d01066c5d5ea8f83c (diff) |
Configure airline et al., remap <Leader> to backslashnvim-lua
Having <Space> as a <Leader> lead to a large lag (known for neovim
with the configuration).
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | nvim/init.lua | 1 | ||||
-rw-r--r-- | nvim/lazy-lock.json | 5 | ||||
-rw-r--r-- | nvim/lua/config/lazy.lua | 2 | ||||
-rw-r--r-- | nvim/lua/plugins/airline.lua | 15 | ||||
-rw-r--r-- | nvim/lua/plugins/misc.lua | 26 |
7 files changed, 41 insertions, 20 deletions
@@ -2,3 +2,4 @@ bak VimCom colorout test.R +nvim/lazy-lock.json @@ -8,10 +8,7 @@ cd dotfiles make ``` -This will download the [vim-plug](https://github.com/junegunn/vim-plug) plugin -manager from github if not already present at .vim/autoload. To install the -plugins, open vim and type - -```vim -:PlugInstall -``` +If you have previously managed your vim plugins as in the former version of +my dotfiles, i.e. using a link from the `.vim` directory to `.config/nvim`, +you need to remove that link before running `make`, as a new link from +`dotfiles/nvim` to `.config/nvim` will be created. diff --git a/nvim/init.lua b/nvim/init.lua index a9edd2d..551ec67 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,3 +1,2 @@ require("config.lazy") - diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json deleted file mode 100644 index d8bbbbe..0000000 --- a/nvim/lazy-lock.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "R.nvim": { "branch": "main", "commit": "e1655b5616dff71edae0f52a651afc8d7433037c" }, - "lazy.nvim": { "branch": "main", "commit": "a44e9cd165e11fa61ccfbea2a3cc1aaa3bcfc4f1" }, - "nvim-treesitter": { "branch": "master", "commit": "53e20aa728713af5cb4a3e0e2dcfea18975d49fc" } -} diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua index 11d41e0..a4c6f2a 100644 --- a/nvim/lua/config/lazy.lua +++ b/nvim/lua/config/lazy.lua @@ -18,7 +18,7 @@ vim.opt.rtp:prepend(lazypath) -- Make sure to setup `mapleader` and `maplocalleader` before -- loading lazy.nvim so that mappings are correct. -- This is also a good place to setup other settings (vim.opt) -vim.g.mapleader = " " +vim.g.mapleader = "\\" vim.g.maplocalleader = "," -- Create some keymaps for moving between vim windows without <C-w>, as it diff --git a/nvim/lua/plugins/airline.lua b/nvim/lua/plugins/airline.lua new file mode 100644 index 0000000..a52e9be --- /dev/null +++ b/nvim/lua/plugins/airline.lua @@ -0,0 +1,15 @@ +return { + -- airline + { "vim-airline/vim-airline", + init = function() + vim.g.airline_powerline_fonts = 1 + vim.g["airline#extensions#tabline#enabled"] = 1 + vim.g["airline#extensions#branch#enabled"] = 1 + end, + }, + { "vim-airline/vim-airline-themes", + init = function() + vim.g.airline_theme = 'wombat' + end, + } +} diff --git a/nvim/lua/plugins/misc.lua b/nvim/lua/plugins/misc.lua index 431bece..7292e3f 100644 --- a/nvim/lua/plugins/misc.lua +++ b/nvim/lua/plugins/misc.lua @@ -1,8 +1,5 @@ return { - -- airline - { "vim-airline/vim-airline" }, - { "vim-airline/vim-airline-themes" }, - + -- pandoc { "vim-pandoc/vim-pandoc" }, { "vim-pandoc/vim-pandoc-syntax" }, @@ -16,7 +13,12 @@ return { -- Version control { "tpope/vim-fugitive" }, { "airblade/vim-gitgutter" }, - { "samoshkin/vim-mergetool" }, + { "samoshkin/vim-mergetool", + init = function() + vim.g.mergetool_layout = 'mr' + vim.g.mergetool_prefer_revision = 'local' + end, + }, -- Show an manage marks { "kshenoy/vim-signature" }, @@ -25,6 +27,18 @@ return { { "jasonccox/vim-wayland-clipboard" }, -- vimcmdline - { "jalvesaq/vimcmdline" }, + { "jalvesaq/vimcmdline", + init = function() + vim.b.cmdline_map_start = '<LocalLeader>s' + end, + }, + + -- fzf + { "junegunn/fzf" }, + + -- Look up docs in vim scripts with 'K' + { "tpope/vim-scriptease" }, + -- Delete trailing whitespace + { "vim-scripts/DeleteTrailingWhitespace" } } |