Use plugin for wrapping

This commit is contained in:
Matt Wiseley
2026-01-06 13:32:47 -05:00
parent dde7eaec28
commit c052acd2bb
2 changed files with 104 additions and 14 deletions

79
custom-lang-configs.vim Normal file
View File

@ -0,0 +1,79 @@
" Removed from init.vim until plugins referenced here are enabled
" html
" for html files, 2 spaces
autocmd Filetype html setlocal ts=2 sw=2 expandtab
" javascript
let g:javascript_enable_domhtmlcss = 1
" vim-javascript
augroup vimrc-javascript
autocmd!
autocmd FileType javascript setl tabstop=4|setl shiftwidth=4|setl expandtab softtabstop=4
augroup END
" lua
" php
" Phpactor plugin
" Include use statement
nmap <Leader>u :call phpactor#UseAdd()<CR>
" Invoke the context menu
nmap <Leader>mm :call phpactor#ContextMenu()<CR>
" Invoke the navigation menu
nmap <Leader>nn :call phpactor#Navigate()<CR>
" Goto definition of class or class member under the cursor
nmap <Leader>oo :call phpactor#GotoDefinition()<CR>
nmap <Leader>oh :call phpactor#GotoDefinition('hsplit')<CR>
nmap <Leader>ov :call phpactor#GotoDefinition('vsplit')<CR>
nmap <Leader>ot :call phpactor#GotoDefinition('tabnew')<CR>
" Show brief information about the symbol under the cursor
nmap <Leader>K :call phpactor#Hover()<CR>
" Transform the classes in the current file
nmap <Leader>tt :call phpactor#Transform()<CR>
" Generate a new class (replacing the current file)
nmap <Leader>cc :call phpactor#ClassNew()<CR>
" Extract expression (normal mode)
nmap <silent><Leader>ee :call phpactor#ExtractExpression(v:false)<CR>
" Extract expression from selection
vmap <silent><Leader>ee :<C-U>call phpactor#ExtractExpression(v:true)<CR>
" Extract method from selection
vmap <silent><Leader>em :<C-U>call phpactor#ExtractMethod()<CR>
" python
" vim-python
augroup vimrc-python
autocmd!
autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=8 colorcolumn=79
\ formatoptions+=croq softtabstop=4
\ cinwords=if,elif,else,for,while,try,except,finally,def,class,with
augroup END
" jedi-vim
let g:jedi#popup_on_dot = 0
let g:jedi#goto_assignments_command = "<leader>g"
let g:jedi#goto_definitions_command = "<leader>d"
let g:jedi#documentation_command = "K"
let g:jedi#usages_command = "<leader>n"
let g:jedi#rename_command = "<leader>r"
let g:jedi#show_call_signatures = "0"
let g:jedi#completions_command = "<C-Space>"
let g:jedi#smart_auto_mappings = 0
" ale
:call extend(g:ale_linters, {
\'python': ['flake8'], })
" vim-airline
let g:airline#extensions#virtualenv#enabled = 1
" Syntax highlight
let python_highlight_all = 1

View File

@ -1,5 +1,3 @@
" vim-bootstrap 2026-01-05 15:36:51
"*****************************************************************************
"" Vim-Plug core
"*****************************************************************************
@ -30,6 +28,7 @@ call plug#begin(expand('~/.config/nvim/plugged'))
"*****************************************************************************
"" Plug install packages
"*****************************************************************************
" file management
Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs'
" coding comments
@ -54,6 +53,7 @@ Plug 'Raimondi/delimitMate'
Plug 'Yggdroot/indentLine'
" bootstrap support
"Plug 'editor-bootstrap/vim-bootstrap-updater'
Plug 'andrewferrier/wrapping.nvim'
"Autoreload files when changed externally
Plug 'TheZoq2/neovim-auto-autoread'
@ -210,7 +210,7 @@ colorscheme molokai
set wildmenu
" mouse support
set mouse=
set mouse=a
set mousemodel=popup
set t_Co=256
@ -299,10 +299,10 @@ nnoremap <silent> <F2> :NERDTreeFind<CR>
nnoremap <silent> <F3> :NERDTreeToggle<CR>
" grep.vim
nnoremap <silent> <leader>f :Rgrep<CR>
let Grep_Default_Options = '-IR'
let Grep_Skip_Files = '*.log *.db'
let Grep_Skip_Dirs = '.git node_modules'
"nnoremap <silent> <leader>f :Rgrep<CR>
"let Grep_Default_Options = '-IR'
"let Grep_Skip_Files = '*.log *.db'
"let Grep_Skip_Dirs = '.git node_modules'
" terminal emulation
nnoremap <silent> <leader>sh :terminal<CR>
@ -322,7 +322,8 @@ if !exists('*s:setupWrapping')
set wrap
set linebreak
set wm=2
set textwidth=0
set nolist "hide non-printable chars
set textwidth=79
set wrapmargin=0
set breakat=\ \t!@%*[]<>;:/?
nnoremap <silent> <buffer> j gj
@ -346,11 +347,11 @@ augroup vimrc-remember-cursor-position
augroup END
"" txt and markdown
augroup vimrc-wrapping
autocmd!
autocmd BufRead,BufNewFile *.txt call s:setupWrapping()
autocmd BufRead,BufNewFile *.md call s:setupWrapping()
augroup END
"augroup vimrc-wrapping
"" autocmd!
"" autocmd BufRead,BufNewFile,BufWinEnter *.txt call s:setupWrapping()
"" autocmd BufRead,BufNewFile,BufWinEnter *.md call s:setupWrapping()
"augroup END
"" make/cmake
augroup vimrc-make-cmake
@ -490,6 +491,7 @@ nnoremap <Leader>o :.GBrowse<CR>
"" Custom configs
"*****************************************************************************
" See custom-lang-configs.vim for language-specific configs, copy here has needed
"*****************************************************************************
"*****************************************************************************
@ -557,11 +559,20 @@ if status_ok then
end
EOF
" Remove icons from the gutter next to markdown headings
lua << EOF
require('render-markdown').setup({
heading = {
-- Set this to false to remove icons from the gutter next to headings
sign = false,
},
})
EOF
" wrapping.nvim setup
lua << EOF
require("wrapping").setup({
notify_on_switch = true,
softener = { markdown = true, text = true }
})
EOF