Skip to content

Commit

Permalink
some new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
radoslav11 committed Jul 14, 2023
1 parent 20f58af commit 435804a
Show file tree
Hide file tree
Showing 4 changed files with 425 additions and 24 deletions.
11 changes: 0 additions & 11 deletions a.py

This file was deleted.

13 changes: 11 additions & 2 deletions coc-settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
{
"suggest.enablePreselect": false,
"inlayHint.enable": false,
"coc.preferences.formatOnType":true,
"suggest.noselect": true,
"signature.enable": false,
"diagnostic.errorSign": "",
"diagnostic.infoSign": "",
"diagnostic.hintSign": "",
"diagnostic.enableHighlightLineNumber": true,
"signature.enable": true,
"clangd.fallbackFlags": [ "-std=c++17" ],
"python.pythonPath": "~/.config/nvim/coc-pyright-run-py",
"diagnostic.checkCurrentLine": true
"python.analysis.typeCheckingMode": "basic",
"python.analysis.diagnosticMode": "workspace",
"python.analysis.useLibraryCodeForTypes": true,
"python.analysis.diagnosticSeverityOverrides": {
"reportMissingImports": "none",
"reportOptionalMemberAccess": "none",
"reportOptionalSubscript": "none",
"reportPrivateImportUsage": "none"
}
}
45 changes: 34 additions & 11 deletions init.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
set termguicolors
let g:python_host_prog="/opt/homebrew/bin/python"
let g:python3_host_prog="/opt/homebrew/bin/python"
set shell=/bin/zsh

call plug#begin()
Plug 'nvim-lualine/lualine.nvim'
Expand All @@ -24,11 +26,14 @@ Plug 'nvim-lua/popup.nvim'
Plug 'nvim-telescope/telescope-media-files.nvim'

Plug 'tmhedberg/SimpylFold'
" Plug 'jiangmiao/auto-pairs'
Plug 'jiangmiao/auto-pairs'

Plug 'searleser97/cpbooster.vim'
Plug 'dmdque/solidity.vim'
Plug 'morhetz/gruvbox'
Plug 'https://github.com/tpope/vim-fugitive'

" Plug 'christoomey/vim-tmux-navigator'
call plug#end()

set background=dark
Expand All @@ -55,6 +60,12 @@ let g:gruvbox_invert_selection=0
let g:gruvbox_contrast_dark='hard'
colorscheme gruvbox

" Don't save to register when "x" is pressed
nnoremap x "_x
nnoremap X "_X
vnoremap x "_x
vnoremap X "_X
" Iterm2 help is annoying
nmap <F1> <nop>
imap <F1> <nop>
Expand Down Expand Up @@ -99,8 +110,8 @@ tmap <C-`> <C-\><C-N>:NvimTreeToggle<CR>
set clipboard=unnamed

autocmd FileType c setlocal makeprg=gcc-13\ '%'\ -o\ '%:r'\ -std=gnu11
autocmd FileType cpp setlocal makeprg=g++-13\ '%'\ -o\ '%:r'\ -std=c++17\ -O3
autocmd FileType c setlocal makeprg=gcc\ '%'\ -o\ '%:r'\ -std=gnu11
autocmd FileType cpp setlocal makeprg=g++\ '%'\ -o\ '%:r'\ -std=c++17\ -O3
autocmd FileType haskell setlocal makeprg=ghc\ --make\ '%'
autocmd FileType java setlocal makeprg=javac\ '%'
autocmd FileType tex setlocal makeprg=xelatex\ -interaction\ nonstopmode\ -halt-on-error\ '%'
Expand Down Expand Up @@ -152,14 +163,26 @@ imap <F10> <ESC>:w<CR>:call ExecuteFile()<CR>
autocmd FileType python map <F9> <ESC>:w<CR>:call ExecuteFile()<CR>
autocmd FileType python imap <F9> <ESC>:w<CR>:call ExecuteFile()<CR>
" Formatting
autocmd FileType python setlocal expandtab

let g:formatdef_custom_astyle = '"astyle --keep-one-line-blocks --style=google"'
let g:formatters_java = ['custom_astyle']
let g:formatters_cpp = ['custom_astyle']
let g:formatters_cs = ['custom_astyle']
let g:formatters_c = ['custom_astyle']
" Formatting tab
setlocal expandtab

let clang_format_style = "\'{
\BasedOnStyle: Google,
\TabWidth: 4,
\IndentWidth: 4,
\AlignAfterOpenBracket: BlockIndent,
\SpaceBeforeParens: Never,
\IncludeBlocks: Preserve,
\SpaceBeforeCaseColon: false,
\SpaceBeforeRangeBasedForLoopColon: false,
\UseTab: Always,
\AlwaysBreakTemplateDeclarations: BTDS_MultiLine
\}'"
let g:formatdef_custom_clike = '"clang-format --style=' . clang_format_style . '"'
let g:formatters_java = ['custom_clike']
let g:formatters_cpp = ['custom_clike']
let g:formatters_cs = ['custom_clike']
let g:formatters_c = ['custom_clike']

let g:formatdef_custom_black = '"black -l 79 --preview"'
let g:formatters_py = ['custom_black']
Expand Down
Loading

0 comments on commit 435804a

Please sign in to comment.