Skip to content

Instantly share code, notes, and snippets.

@Fed0t
Last active August 10, 2023 18:14
Show Gist options
  • Save Fed0t/01b7f489c6958b283a23059eb7b697f7 to your computer and use it in GitHub Desktop.
Save Fed0t/01b7f489c6958b283a23059eb7b697f7 to your computer and use it in GitHub Desktop.
syntax on
filetype plugin indent on
set encoding=UTF-8
set number
set incsearch
set cursorline
set ignorecase
set smartcase
set nohlsearch
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set noswapfile nobackup nowritebackup
set history=500
set timeoutlen=1000 ttimeoutlen=0
set updatetime=200
set signcolumn=yes
set showcmd
set termguicolors
set background=dark
set mouse=a
set t_Co=256
set fillchars=horiz:━,horizup:┻,horizdown:┳,vert:┃,vertleft:┨,vertright:┣,verthoriz:╋
set clipboard+=unnamedplus
set backspace=indent,eol,start
set foldmethod=expr
set listchars=extends:→,precedes:←,nbsp:␣,trail:•,tab:▸\ ,eol:¬
set foldexpr=nvim_treesitter#foldexpr()
set nostartofline
call plug#begin()
Plug 'tpope/vim-surround'
Plug 'nvim-tree/nvim-tree.lua'
Plug 'nvim-tree/nvim-web-devicons'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'mg979/vim-visual-multi', {'branch': 'master'}
Plug 'psliwka/vim-smoothie'
Plug 'github/copilot.vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'preservim/tagbar'
Plug 'kkvh/vim-docker-tools'
Plug 'dense-analysis/ale'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'nvim-treesitter/nvim-treesitter-textobjects'
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.0' }
Plug 'nvim-telescope/telescope-fzy-native.nvim'
Plug 'phpactor/phpactor', {'for': 'php', 'tag': '*', 'do': 'composer install --no-dev -o'}
Plug 'lewis6991/gitsigns.nvim'
Plug 'romgrk/barbar.nvim'
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'danilamihailov/beacon.nvim'
Plug 'dinhhuy258/vim-local-history', {'branch': 'master', 'do': ':UpdateRemotePlugins'}
Plug 'tpope/vim-commentary'
Plug 'sindrets/diffview.nvim'
Plug 'itchyny/lightline.vim'
Plug 'sheerun/vim-polyglot'
Plug 'navarasu/onedark.nvim'
Plug 'SmiteshP/nvim-navic'
Plug 'utilyre/barbecue.nvim'
Plug 'kdheepak/lazygit.nvim'
Plug 'windwp/nvim-autopairs'
Plug 'https://gitlab.com/yorickpeterse/nvim-window.git'
Plug 'nvim-telescope/telescope-ui-select.nvim'
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-cmdline'
Plug 'hrsh7th/cmp-buffer'
"Debugging
Plug 'mfussenegger/nvim-dap'
Plug 'rcarriga/nvim-dap-ui'
Plug 'theHamsta/nvim-dap-virtual-text'
Plug 'nvim-telescope/telescope-dap.nvim'
call plug#end()
lua require("nvim-tree").setup({view={width=40}})
lua require('nvim-treesitter.configs').setup({ensure_installed={'typescript', 'scss', 'php', 'html', 'css', 'python', 'javascript'}, highlight={enable=true}, auto_install=true, indent={enable=true}})
lua require('telescope').load_extension('fzy_native')
lua require('telescope').load_extension('lazygit')
lua require("barbecue").setup({create_autocmd = true})
lua require("nvim-autopairs").setup({})
lua dap = require('dap')
lua require("dapui").setup()
lua dap.adapters.php = {type = 'executable',command = 'node', args = {'/Users/sereoja/vscode-php-debug/out/phpDebug.js'}}
lua dap.configurations.php = {{type = 'php', request = 'launch', name = 'Listen for Xdebug', port = 9003, pathMappings = {["/var/www/"] = "$workSpaceFolder"}}}
lua << EOF
local cmp = require('cmp')
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
},
{
{
name = 'cmdline',
option = {
ignore_cmds = { 'Man', '!' }
}
}
})
})
EOF
let g:onedark_config = {'style': 'darker'}
let g:airline_powerline_fonts = 1
let g:lightline = {'colorscheme': 'one'}
let g:airline_theme='onedark'
let g:airline#extensions#ale#enabled = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#branch#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show=1
let g:transparent_enabled = v:true
let g:fzf_history_dir = '~/.local/share/fzf-history'
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
let g:beacon_minimal_jump = 5
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
colorscheme onedark
inoremap jj <ESC>
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>
"nnoremap <C-J> :bprev<CR>
"nnoremap <C-K> :bnext<CR>
nnoremap <Tab> >>
nnoremap <S-Tab> <<
inoremap <S-Tab> <C-d>
nnoremap <F8> :TagbarToggle<CR>
nnoremap <F10> <cmd>call CocAction('format')<CR>
nmap <silent> rn <Plug>(coc-rename)
nnoremap <C-s> :update<cr>
nnoremap <C-p> <cmd>Telescope find_files<cr>
nnoremap <C-f> <cmd>Telescope live_grep<cr>
nnoremap <C-t> :NvimTreeToggle<CR>
nnoremap <C-J> <cmd>BufferPrevious<CR>
nnoremap <C-K> <cmd>BufferNext<CR>
nnoremap <silent><C-x> <Cmd>BufferClose<CR>
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
nnoremap <silent> K :call ShowDocumentation()<CR>
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gr <Plug>(coc-codeaction)
nnoremap <F5> :LazyGit<CR>
nnoremap <F6> :DiffviewFileHistory<CR>
nnoremap <F7> :LocalHistoryToggle<CR>
map <silent> <leader>w :lua require('nvim-window').pick()<CR>
":DiffviewFileHistory %
function! ShowDocumentation()
if CocAction('hasProvider', 'hover')
call CocActionAsync('doHover')
else
call feedkeys('K', 'in')
endif
endfunction
" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
autocmd BufReadPost,FileReadPost,BufEnter * normal zR
autocmd User CocStatusChange redrawstatus
autocmd BufEnter * silent! normal! g`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment