init
This commit is contained in:
commit
530aeb2ea2
15
README.md
Normal file
15
README.md
Normal file
@ -0,0 +1,15 @@
|
||||
Welcome to my **neovim** config folder
|
||||
|
||||
Through out the years (4 years) of using Neovim, I have came up with a very large neovim configuration. But now I drop most of them. Neovim support for Lua script is on the way, this rewrite will be all (most of) in Lua. I prefer the LISP syntax over Lua syntax, so I use Fennel with aniseed.
|
||||
|
||||
There will be a lightline configuration, everyone loves a nice UI.
|
||||
|
||||
I mostly code in C, C++, Python, Golang, Javascript, Java, Kotlin, Rust, Haskell (ordered by my own usage frequency).
|
||||
|
||||
|
||||
## Change log
|
||||
|
||||
- Initialize the Git Repo
|
||||
- Switch from pure VimL to Lua using Fennel+aniseed
|
||||
- Switch from vim-plug to packer.nvim
|
||||
- Old neovim
|
34
fnl/init.fnl
Normal file
34
fnl/init.fnl
Normal file
@ -0,0 +1,34 @@
|
||||
(module user.config
|
||||
{require {nvim aniseed.nvim}})
|
||||
|
||||
(defn- noremap [mode from to]
|
||||
"Sets a mapping with {:noremap true}."
|
||||
(nvim.set_keymap mode from to {:noremap true}))
|
||||
|
||||
|
||||
(set nvim.g.mapleader ",")
|
||||
(set nvim.g.maplocalleader ",")
|
||||
|
||||
(noremap :i :jj :<esc>)
|
||||
(noremap :n :j :gj)
|
||||
(noremap :n :k :gk)
|
||||
|
||||
(set nvim.o.tabstop 2)
|
||||
(set nvim.bo.tabstop 2)
|
||||
|
||||
(set nvim.o.shiftwidth 2)
|
||||
(set nvim.bo.shiftwidth 2)
|
||||
|
||||
(set nvim.o.softtabstop 2)
|
||||
(set nvim.bo.softtabstop 2)
|
||||
|
||||
(set nvim.o.expandtab true)
|
||||
(set nvim.bo.expandtab true)
|
||||
|
||||
(set nvim.o.number true)
|
||||
(set nvim.wo.number true)
|
||||
|
||||
(set nvim.o.relativenumber true)
|
||||
(set nvim.wo.relativenumber true)
|
||||
|
||||
(require "settings")
|
21
fnl/settings.fnl
Normal file
21
fnl/settings.fnl
Normal file
@ -0,0 +1,21 @@
|
||||
(module user.plugin.settings
|
||||
{require {nvim aniseed.nvim
|
||||
nu aniseed.nvim.util}})
|
||||
|
||||
;; buffergator
|
||||
(set nvim.g.buffergator_display_regime "parentdir")
|
||||
|
||||
;; vaffle
|
||||
(defn open-vaffle []
|
||||
(let [bufname (nvim.fn.bufname "%")]
|
||||
(if (= bufname "")
|
||||
(nvim.fn.vaffle#init)
|
||||
(nvim.fn.vaffle#init (nvim.fn.expand "%:p")))))
|
||||
|
||||
(nu.fn-bridge :OpenVaffle :user.plugin.settings :open-vaffle)
|
||||
(nvim.set_keymap :n :<leader>dd ":call OpenVaffle()<CR>" {:noremap true :silent true})
|
||||
|
||||
;; vim-operator-surround
|
||||
(nvim.set_keymap "" :sa "<Plug>(operator-surround-append)" {:silent true})
|
||||
(nvim.set_keymap "" :sd "<Plug>(operator-surround-delete)" {:silent true})
|
||||
(nvim.set_keymap "" :sr "<Plug>(operator-surround-replace)" {:silent true})
|
5
init.lua
Normal file
5
init.lua
Normal file
@ -0,0 +1,5 @@
|
||||
vim.g['aniseed#env'] = true
|
||||
|
||||
vim.g.polyglot_disabled = {"markdown", "javascript"}
|
||||
|
||||
require('plugins')
|
25
lua/plugins.lua
Normal file
25
lua/plugins.lua
Normal file
@ -0,0 +1,25 @@
|
||||
local packer = require('packer')
|
||||
|
||||
packer.startup(function(use)
|
||||
use 'wbthomason/packer.nvim'
|
||||
use 'Olical/aniseed'
|
||||
|
||||
use 'Yggdroot/indentLine'
|
||||
use 'ntpeters/vim-better-whitespace'
|
||||
use 'valloric/matchtagalways'
|
||||
|
||||
use 'cocopon/vaffle.vim'
|
||||
use 'jeetsukumaran/vim-buffergator'
|
||||
|
||||
use 'tpope/vim-fugitive'
|
||||
|
||||
use 'kana/vim-operator-user'
|
||||
use 'rhysd/vim-operator-surround'
|
||||
use 'chaoren/vim-wordmotion'
|
||||
|
||||
use 'nelstrom/vim-visual-star-search'
|
||||
|
||||
use 'wakatime/vim-wakatime'
|
||||
|
||||
use 'sheerun/vim-polyglot'
|
||||
end)
|
Loading…
Reference in New Issue
Block a user