Skip to content

Instantly share code, notes, and snippets.

@APB9785

APB9785/init.vim Secret

Created July 22, 2021 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save APB9785/32b7d28cfbe2272dd425d714a0ffdaec to your computer and use it in GitHub Desktop.
Save APB9785/32b7d28cfbe2272dd425d714a0ffdaec to your computer and use it in GitHub Desktop.
Setting up Clojure with Neovim
" Specify a directory for plugins.
call plug#begin(stdpath('data') . '/plugged')
" Specify your required plugins here.
Plug 'easymotion/vim-easymotion'
Plug 'itchyny/lightline.vim'
Plug 'joshdick/onedark.vim'
Plug 'dense-analysis/ale'
Plug 'Olical/conjure', {'tag': 'v4.22.0'}
Plug 'tpope/vim-dispatch'
Plug 'clojure-vim/vim-jack-in'
Plug 'radenling/vim-dispatch-neovim'
Plug 'jiangmiao/auto-pairs', { 'tag': 'v2.0.0' }
Plug 'Shougo/deoplete.nvim'
Plug 'ncm2/float-preview.nvim'
Plug 'tpope/vim-fireplace'
Plug 'guns/vim-clojure-static'
Plug 'guns/vim-clojure-highlight'
" Initialize plugin system.
call plug#end()
let g:deoplete#enable_at_startup = 1
call deoplete#custom#option('keyword_patterns', {'clojure': '[\w!$%&*+/:<=>?@\^_~\-\.#]*'})
set completeopt-=preview
let g:float_preview#docked = 0
let g:float_preview#max_width = 80
let g:float_preview#max_height = 40
set noshowmode " Mode is already displayed in status bar
set shortmess=atOI " No help Uganda information, and overwrite read messages to avoid PRESS ENTER prompts
set ignorecase " Case insensitive search
set smartcase " ... but case sensitive when uc present
set scrolljump=5 " Line to scroll when cursor leaves screen
set scrolloff=3 " Minumum lines to keep above and below cursor
set nowrap " Do not wrap long lines
set shiftwidth=4 " Use indents of 4 spaces
set tabstop=4 " An indentation every four columns
set softtabstop=4 " Let backspace delete indent
set splitright " Puts new vsplit windows to the right of the current
set splitbelow " Puts new split windows to the bottom of the current
set autowrite " Automatically write a file when leaving a modified buffer
set mousehide " Hide the mouse cursor while typing
set hidden " Allow buffer switching without saving
set t_Co=256 " Use 256 colors
set ruler " Show the ruler
set showcmd " Show partial commands in status line and Selected characters/lines in visual mode
set showmatch " Show matching brackets/parentthesis
set matchtime=5 " Show matching time
set report=0 " Always report changed lines
set linespace=0 " No extra spaces between rows
set pumheight=20 " Avoid the pop up menu occupying the whole screen
set number " Line numbers on
set relativenumber " Relative numbers on
set cursorline " Highlight current line
set noerrorbells " No annoying sound on errors
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
if (empty($TMUX))
if (has("nvim"))
"For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
if (has("termguicolors"))
set termguicolors
endif
endif
"Asynchronous Lint Engine (ALE)
let g:ale_linters = {'clojure': ['clj-kondo', 'joker']}
"Set colorscheme of status bar
let g:lightline = {
\ 'colorscheme': 'one',
\ }
filetype plugin indent on
syntax on
colorscheme onedark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment