Skip to content

Instantly share code, notes, and snippets.

@joshmccall221
Last active October 11, 2023 14:16
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 joshmccall221/7ee8a3b20058bc1326bebbdaaf016604 to your computer and use it in GitHub Desktop.
Save joshmccall221/7ee8a3b20058bc1326bebbdaaf016604 to your computer and use it in GitHub Desktop.
require "paq" {
"OmniSharp/omnisharp-vim";
"preservim/nerdtree";
"dense-analysis/ale";
"BurntSushi/ripgrep";
"nvim-lua/plenary.nvim";
{"nvim-telescope/telescope.nvim", branch="0.1.x"};
"prabirshrestha/asyncomplete.vim";
"mhinz/vim-signify";
{"neoclide/coc.nvim",·branch="release", run=":call COC()"};
}
local wo = vim.wo
local g = vim.g
local opt = vim.opt
wo.number = true -- show line numbers
g.OmniSharp_server_use_net6 = 1
opt.wrap = false -- no text wrap
opt.backup = false -- no annoying backup file
-- everything in utf-8
opt.encoding = "utf-8"
opt.fileencoding = "utf-8"
opt.termencoding = "utf-8"
vim.cmd([[
if has("win32")
set shell=cmd.exe
set shellcmdflag=/c\ powershell.exe\ -NoLogo\ -NoProfile\ -NonInteractive\ -ExecutionPolicy\ RemoteSigned
set shellpipe=|
set shellredir=>
endif
function! Test()
echo system("dir -name")
endfunction
function! COC()
echo system("cd ~/AppData/Local/nvim-data/site/pack/paqs/start/coc.nvim/ ; npm ci")
endfunction
set listchars=tab:>.,trail:~,extends:>,precedes:<,space:.
set list
" 4 spaces indentation
set tabstop=4 softtabstop=0 expandtab shiftwidth=4
" Deal with unwanted white spaces (show them in red)
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
" Coc CSS
" Use tab for trigger completion with characters ahead and navigate.
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
" other plugin before putting this into your config.
inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1):
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
]])
vim.cmd('command NT NERDTree')
vim.cmd('command FN Telescope find_files')
vim.cmd('command FT Telescope live_grep')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment