Created
January 24, 2023 03:08
-
-
Save jodoherty/839315e7aa1f46613e65ae3ddf8feb21 to your computer and use it in GitHub Desktop.
neovim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set ts=8 | |
| set sw=2 | |
| set sts=2 | |
| set et | |
| set cc=80,120 | |
| set list | |
| set mouse=a | |
| if has('win32') || has('win64') | |
| set fileformats=unix,dos | |
| set fileencodings=utf-8,ucs-bom,default,latin1 | |
| set termguicolors | |
| set bg=dark | |
| hi ColorColumn guibg=#181818 | |
| elseif !$TERM_PROGRAM =~ "Apple_Terminal" | |
| set termguicolors | |
| set bg=light | |
| else | |
| set termguicolors | |
| set bg=light | |
| hi ColorColumn guibg=#efefef | |
| endif | |
| " npm i -g prettier | |
| " go install golang.org/x/tools/cmd/goimports@latest | |
| " pip install --user yapf | |
| " apt install clang-format | |
| let g:neoformat_enabled_css = ['prettier'] | |
| let g:neoformat_enabled_html = ['prettier'] | |
| let g:neoformat_enabled_javascript = ['prettier'] | |
| let g:neoformat_enabled_python = ['yapf'] | |
| augroup fmt | |
| autocmd! | |
| au BufWritePre * undojoin | Neoformat | |
| " au BufWritePre * try | undojoin | Neoformat | catch /E790/ | Neoformat | endtry | |
| augroup END | |
| autocmd Filetype go setlocal ts=4 | |
| autocmd Filetype go setlocal sts=0 | |
| autocmd Filetype go setlocal noet | |
| autocmd Filetype go setlocal sw=4 | |
| autocmd Filetype python setlocal sts=4 | |
| autocmd Filetype python setlocal sw=4 | |
| lua require('plugins') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- ~/.config/nvim/lua/plugins.lua | |
| -- ~/AppData/Local/nvim/lua/plugins.lua | |
| -- git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim | |
| -- git clone https://github.com/wbthomason/packer.nvim "$env:LOCALAPPDATA\nvim-data\site\pack\packer\start\packer.nvim" | |
| -- Only required if you have packer configured as `opt` | |
| vim.cmd [[packadd packer.nvim]] | |
| require('packer').startup(function() | |
| -- Packer can manage itself | |
| use 'wbthomason/packer.nvim' | |
| use 'neovim/nvim-lspconfig' | |
| use 'sbdchd/neoformat' | |
| end) | |
| -- npm i -g vscode-langservers-extracted | |
| -- require'lspconfig'.eslint.setup {} | |
| require'lspconfig'.tsserver.setup {} | |
| -- go install golang.org/x/tools/gopls@latest | |
| require'lspconfig'.gopls.setup {} | |
| require'lspconfig'.pylsp.setup {} | |
| require'lspconfig'.clangd.setup {} | |
| -- require'lspconfig'.solargraph.setup {} | |
| -- raco pkg install racket-langserver | |
| -- require'lspconfig'.racket_langserver.setup {} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment