mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-04 10:05:37 +02:00
auto push
This commit is contained in:
parent
1688fdbe9d
commit
81f3cf18db
6 changed files with 121 additions and 128 deletions
127
README.md
127
README.md
|
@ -1,127 +0,0 @@
|
|||
# Nvim
|
||||
|
||||
Plugging my [blog](chrisatmachine.com)
|
||||
Plugging my [YouTube channel](https://www.youtube.com/channel/UCS97tchJDq17Qms3cux8wcA)
|
||||
|
||||
## Install
|
||||
|
||||
Dependencies:
|
||||
|
||||
- neovim
|
||||
- Node
|
||||
- Python3
|
||||
- Ripgrep
|
||||
- fzf
|
||||
- ranger
|
||||
- hack-nerd-font
|
||||
- ranger
|
||||
- universal-ctags
|
||||
|
||||
### Install dependencies On MacOS
|
||||
|
||||
```
|
||||
brew install node
|
||||
brew install neovim
|
||||
brew install ripgrep
|
||||
brew install fzf
|
||||
brew tap homebrew/cask-fonts
|
||||
brew cask install font-hack-nerd-font
|
||||
brew install ranger
|
||||
brew install --HEAD universal-ctags/universal-ctags/universal-ctags
|
||||
```
|
||||
|
||||
### Install dependencies on Linux
|
||||
|
||||
I assume you can figure it out based on the requirements smart guy
|
||||
|
||||
### Setting Node path and Python3 path
|
||||
|
||||
#### pythonpath
|
||||
|
||||
Create `modules/pythonpath.vim` and point it to a version of python that has neovim installed
|
||||
|
||||
example:
|
||||
|
||||
```
|
||||
let g:python3_host_prog = expand("~/.miniconda/envs/neovim/bin/python3.8")
|
||||
```
|
||||
|
||||
#### nodepath for Coc
|
||||
|
||||
Create `modules/nodepath.vim` and point it to a version of python that has neovim installed
|
||||
|
||||
example:
|
||||
|
||||
```
|
||||
let g:coc_node_path = expand("~/.nvm/versions/node/v12.16.1/bin/node")
|
||||
let g:node_host_prog = expand("~/.nvm/versions/node/v12.16.1/bin/node")
|
||||
```
|
||||
|
||||
## Set up plugin manager
|
||||
|
||||
```
|
||||
sh ~/.config/nvim/utils/installer.sh ~/.config/nvim/dein
|
||||
```
|
||||
|
||||
## Install packages
|
||||
|
||||
You should now run `nvim` and wait while the package manager installs your plugins
|
||||
|
||||
|
||||
## Post install
|
||||
|
||||
After install open Neovim and run the following:
|
||||
|
||||
```
|
||||
:UpdateRemotePlugins
|
||||
|
||||
:checkhealth
|
||||
```
|
||||
|
||||
## CoC Language support
|
||||
|
||||
|
||||
You may need to do this if CoC says it can't find Javascript:
|
||||
|
||||
```
|
||||
cd ~/.cache/dein/repos/github.com/neoclide/coc.nvim
|
||||
git clean -xfd
|
||||
yarn install --frozen-lockfile
|
||||
```
|
||||
|
||||
[Official installation page](https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim)
|
||||
[CoC Extensions](https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions)
|
||||
|
||||
## ALE Linting
|
||||
|
||||
## Markdown Preview
|
||||
|
||||
I had to cd into `dein/repos/github.com/iamcco/markdown-preview.nvim/`
|
||||
|
||||
and run 'npx yarn install'
|
||||
|
||||
## TODO
|
||||
|
||||
- make better use of ftplugin
|
||||
- Document node nonsense in order to install coc
|
||||
- configure coc settings better
|
||||
- need formatter for other languages
|
||||
- set up ale
|
||||
- Java support for Lombock, figured it out on work machine
|
||||
- Need support for image in current ranger implementation
|
||||
- https://github.com/kevinhwang91/rnvimr (Note Ueberzug doesn't work on mac which sucks, also neither does this plugin)
|
||||
- Check out more coc extensions
|
||||
- https://github.com/voldikss/coc-todolist
|
||||
- VimWiki
|
||||
- coc explorer and coc floating terminal are pretty cool
|
||||
- look into save vim sessions
|
||||
- create keymap file and move combinations from general
|
||||
- ultisnips for autogenerate front matter with data and stuff
|
||||
- setup blog with vimwiki
|
||||
- vimwiki hijacks my TAB complete in md files so I'm disabling [link to issue](https://github.com/vimwiki/vimwiki/issues/353)
|
||||
- vimwiki also hijacks conceal level
|
||||
|
||||
## Notes
|
||||
|
||||
install ripgrep" for gutentags to ignore .gitignore
|
||||
If you get an error like this: `gutentags: ctags job failed, returned:` remove the tags directory in `~/.cache`
|
43
general/settings.vim
Normal file
43
general/settings.vim
Normal file
|
@ -0,0 +1,43 @@
|
|||
" set leader key
|
||||
let g:mapleader = "\<Space>"
|
||||
|
||||
syntax enable " Enables syntax highlighing
|
||||
set hidden " Required to keep multiple buffers open multiple buffers
|
||||
set nowrap " Display long lines as just one line
|
||||
set encoding=utf-8 " The encoding displayed
|
||||
set pumheight=10 " Makes popup menu smaller
|
||||
set fileencoding=utf-8 " The encoding written to file
|
||||
set ruler " Show the cursor position all the time
|
||||
set cmdheight=2 " More space for displaying messages
|
||||
set iskeyword+=- " treat dash separated words as a word text object"
|
||||
set mouse=a " Enable your mouse
|
||||
set splitbelow " Horizontal splits will automatically be below
|
||||
set splitright " Vertical splits will automatically be to the right
|
||||
set t_Co=256 " Support 256 colors
|
||||
set conceallevel=0 " So that I can see `` in markdown files
|
||||
set tabstop=2 " Insert 2 spaces for a tab
|
||||
set shiftwidth=2 " Change the number of space characters inserted for indentation
|
||||
set smarttab " Makes tabbing smarter will realize you have 2 vs 4
|
||||
set expandtab " Converts tabs to spaces
|
||||
set smartindent " Makes indenting smart
|
||||
set autoindent " Good auto indent
|
||||
set laststatus=0 " Always display the status line
|
||||
set number " Line numbers
|
||||
set cursorline " Enable highlighting of the current line
|
||||
set background=dark " tell vim what the background color looks like
|
||||
set showtabline=2 " Always show tabs
|
||||
set noshowmode " We don't need to see things like -- INSERT -- anymore
|
||||
set nobackup " This is recommended by coc
|
||||
set nowritebackup " This is recommended by coc
|
||||
set updatetime=300 " Faster completion
|
||||
set timeoutlen=100 " By default timeoutlen is 1000 ms
|
||||
set formatoptions-=cro " Stop newline continution of comments
|
||||
set clipboard=unnamedplus " Copy paste between vim and everything else
|
||||
"set autochdir " Your working directory will always be the same as your working directory
|
||||
|
||||
au! BufWritePost $MYVIMRC source % " auto source when writing to init.vm alternatively you can run :source $MYVIMRC
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
|
||||
|
||||
" You can't stop me
|
||||
cmap w!! w !sudo tee %
|
4
init.vim
4
init.vim
|
@ -1,2 +1,4 @@
|
|||
source $HOME/.config/nvim/vim-plug/plugins.vim
|
||||
|
||||
source $HOME/.config/nvim/general/settings.vim
|
||||
source $HOME/.config/nvim/keys/mappings.vim
|
||||
source $HOME/.config/nvim/themes/onedark.vim
|
||||
|
|
41
keys/mappings.vim
Normal file
41
keys/mappings.vim
Normal file
|
@ -0,0 +1,41 @@
|
|||
" Better nav for omnicomplete
|
||||
inoremap <expr> <c-j> ("\<C-n>")
|
||||
inoremap <expr> <c-k> ("\<C-p>")
|
||||
|
||||
" Use alt + hjkl to resize windows
|
||||
nnoremap <M-j> :resize -2<CR>
|
||||
nnoremap <M-k> :resize +2<CR>
|
||||
nnoremap <M-h> :vertical resize -2<CR>
|
||||
nnoremap <M-l> :vertical resize +2<CR>
|
||||
|
||||
" I hate escape more than anything else
|
||||
inoremap jk <Esc>
|
||||
inoremap kj <Esc>
|
||||
|
||||
" Easy CAPS
|
||||
inoremap <c-u> <ESC>viwUi
|
||||
nnoremap <c-u> viwU<Esc>
|
||||
|
||||
" TAB in general mode will move to text buffer
|
||||
nnoremap <TAB> :bnext<CR>
|
||||
" SHIFT-TAB will go back
|
||||
nnoremap <S-TAB> :bprevious<CR>
|
||||
|
||||
" Alternate way to save
|
||||
nnoremap <C-s> :w<CR>
|
||||
" Alternate way to quit
|
||||
nnoremap <C-Q> :wq!<CR>
|
||||
" Use control-c instead of escape
|
||||
nnoremap <C-c> <Esc>
|
||||
" <TAB>: completion.
|
||||
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||
|
||||
" Better tabbing
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
|
||||
" Better window navigation
|
||||
nnoremap <C-h> <C-w>h
|
||||
nnoremap <C-j> <C-w>j
|
||||
nnoremap <C-k> <C-w>k
|
||||
nnoremap <C-l> <C-w>l
|
23
themes/onedark.vim
Normal file
23
themes/onedark.vim
Normal file
|
@ -0,0 +1,23 @@
|
|||
" onedark.vim override: Don't set a background color when running in a terminal;
|
||||
if (has("autocmd") && !has("gui_running"))
|
||||
augroup colorset
|
||||
autocmd!
|
||||
let s:white = { "gui": "#ABB2BF", "cterm": "145", "cterm16" : "7" }
|
||||
autocmd ColorScheme * call onedark#set_highlight("Normal", { "fg": s:white }) " `bg` will not be styled since there is no `bg` setting
|
||||
augroup END
|
||||
endif
|
||||
|
||||
hi Comment cterm=italic
|
||||
let g:onedark_hide_endofbuffer=1
|
||||
let g:onedark_terminal_italics=1
|
||||
let g:onedark_termcolors=256
|
||||
|
||||
syntax on
|
||||
colorscheme onedark
|
||||
|
||||
|
||||
" checks if your terminal has 24-bit color support
|
||||
if (has("termguicolors"))
|
||||
set termguicolors
|
||||
hi LineNr ctermbg=NONE guibg=NONE
|
||||
endif
|
|
@ -1,3 +1,11 @@
|
|||
" auto-install vim-plug
|
||||
if empty(glob('~/.config/nvim/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
"autocmd VimEnter * PlugInstall
|
||||
"autocmd VimEnter * PlugInstall | source $MYVIMRC
|
||||
endif
|
||||
|
||||
call plug#begin('~/.config/nvim/autoload/plugged')
|
||||
|
||||
" Better Syntax Support
|
||||
|
@ -6,5 +14,8 @@ call plug#begin('~/.config/nvim/autoload/plugged')
|
|||
Plug 'scrooloose/NERDTree'
|
||||
" Auto pairs for '(' '[' '{'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
" Themes
|
||||
Plug 'joshdick/onedark.vim'
|
||||
|
||||
|
||||
call plug#end()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue