Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ediw8311xht committed Aug 24, 2024
1 parent 3618467 commit 8d51f74
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 63 deletions.
1 change: 0 additions & 1 deletion mimeapps.list
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ text/html=nvim.desktop;
text/javascript=nvim.desktop;
text/markdown=nvim.desktop;
text/plain=nvim.desktop;
text/plain=nvim.desktop;
text/python=nvim.desktop;
text/spreadsheet=nvim.desktop;
text/tab-separated-values=nvim.desktop;
Expand Down
7 changes: 6 additions & 1 deletion nvim/functions.vim
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ fu! CorrectColors()
hi TermCursor guibg=NONE guifg=#00AA00
hi HLspStatus gui=NONE guibg=NONE guifg=#00FF00
hi HStatusFullFile gui=NONE guibg=NONE guifg=#999999

"------------------------SPELLING---------------------------#
hi SpellBad gui=undercurl guisp=red guifg=#AAAAAA
"hi ModeMsg guifg=#000087 guibg=#00ff00 gui=NONE cterm=NONE
"hi MoreMsg guifg=#5fffff guibg=NONE gui=NONE cterm=NONE
"hi NonText guifg=#d787d7 guibg=NONE gui=NONE cterm=NONE
Expand Down Expand Up @@ -192,6 +193,10 @@ fu! FilePathFull()
return substitute(expand("%:p:h"), '\V' . $HOME, "~", "")
endfu

fu! GetHL()
echo synIDattr(synID(line("."), col("."), 0), "name")
endfu

"fu! M_LspState()
" if luaeval('vim.inspect(vim.lsp.buf_get_clients()) == "{}"')
" return 0
Expand Down
17 changes: 10 additions & 7 deletions nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ let g:myFg = [ ".", ".", ".", ".", ".",

let g:python3_host_prog="/usr/bin/python"

source ${HOME}/.config/nvim/autocmd.vim
source ${HOME}/.config/nvim/plugins.vim
source ${HOME}/.config/nvim/functions.vim
lua require('mytreesitter')
lua require('base')

filetype on
filetype plugin on
filetype plugin indent on
Expand Down Expand Up @@ -93,6 +87,8 @@ set cul
set nocuc
set cedit=\<C-c>
set statuscolumn=
"Make sure vimwiki doesn't run on markdown not in ~/vimwiki dir.
let g:vimwiki_global_ext = 0

set statusline=%t\
set statusline+=%r
Expand Down Expand Up @@ -120,13 +116,20 @@ let g:maplocalleader = ","
let g:lf_map_keys = 0
let g:html_mode = 1
let g:is_bash = 1

source ${HOME}/.config/nvim/autocmd.vim
source ${HOME}/.config/nvim/plugins.vim
source ${HOME}/.config/nvim/functions.vim
lua require('mytreesitter')
lua require('base')

colorscheme pop-punk

source ${HOME}/.config/nvim/leader_bindings.vim
source ${HOME}/.config/nvim/etc_bindings.vim

lua require("mappings")
lua require('functions')
lua require("mappings")

:call CorrectColors()

Expand Down
7 changes: 6 additions & 1 deletion nvim/language_specific/markdown.vim
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ fu! PreviewMarkdown(flag = "")
endif
endfu

"colorscheme cyberpunk-neon
"call CorrectColors()
"set formatexpr=1
"set textwidth=80
set wrap
colorscheme cyberpunk-neon
"set spell
vnoremap <buffer> <leader>x :!pandoc -t commonmark_x<CR>
nnoremap <buffer> <leader>x :%!pandoc -t commonmark_x<CR>
nnoremap <buffer> <leader>oo :silent call PreviewMarkdown()<esc>
nnoremap <buffer> <leader>oq :silent call PreviewMarkdown("q")<esc>
nnoremap <buffer> <leader>ob :silent call PreviewMarkdown("b")<esc>
nnoremap <buffer> <leader>oO :MarkdownPreview<esc>
nnoremap <buffer> <leader>vS :set spell!<CR>
10 changes: 5 additions & 5 deletions nvim/lua/base.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

local HOME = os.getenv("HOME")
local lsp_status = require('lsp-status')
lsp_status.register_progress()

Expand All @@ -13,7 +14,6 @@ local lspsaga = require('lspsaga')
local gitsigns = require('gitsigns')
local marks = require('marks')
local lspstatus = require('lsp-status')
local HOME = os.getenv("HOME")
local cmp_capabilities = require('cmp_nvim_lsp').default_capabilities()

lspstatus.config({
Expand Down Expand Up @@ -100,10 +100,10 @@ which_key.setup({

luasnip.setup({})
cmp.setup({
performance = {
throttle = 0.3,
async_budget = 20,
},
-- performance = {
-- throttle = 0.3,
-- async_budget = 20,
-- },
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
Expand Down
97 changes: 49 additions & 48 deletions nvim/lua/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,55 +14,56 @@ local l = '<leader>'
-- { '', {l , '<C-^>' }},
-- { '', '/' , ':Explore<CR>' },
local leader_nnoremap = {
{ 'Prev Tab', 'tb' , ':tabmove -1<esc>' },
{ 'Next Tab', 'tn' , ':tabmove +1<esc>' },
{ 'New Tab', 'tt' , ':tabnew<esc>' },
{ '', ',' , '<C-^>' },
{ 'Next Buffer', ']' , ':bnext<CR>' },
{ 'Prev Buffer', '[' , ':bprevious<CR>' },
{ '', '-' , '20<c-w><' },
{ '', '=' , '20<c-w>>' },
{ '', 'A' , ':LspStart()<CR>' },
{ '', 'a' , ':LspStop()<CR>' },
{ '', 'B' , ':ls<CR>:b<Space>' },
{ '', 'b' , ':Buffers<esc>' },
{ '+ Line Len Indicator', 'cC' , ':call TogCC<CR>' },
{ '+ CursorLine', 'cc' , ':set nocul!<CR>' },
{ 'Checkhealth', 'CH' , ':checkhealth<CR>' },
{ 'Delete Buffer', 'D' , ':bd<esc><enter>' },
{ 'Find Space EOL', 'df' , ':%s/\\s\\+\\ze$//gc<CR>' },
{ '+ CursorColumn', 'e' , ':set cuc!<CR>' },
{ 'Edit File CWD', 'E' , ':call feedkeys(":e " . FilePathFull() . "/")<CR>' },
{ 'Wrap!', 'f' , ':set wrap!<esc>' },
{ 'New File', 'g' , ':enew<esc>' },
{ 'Print Mappings', 'Gm' , ':call GMaps()<CR>' },
{ '+ Statusline', 'h' , ':call TogSL()<CR>' },
{ 'Helpgrep', 'H' , ':vert helpgrep ' },
{ 'Open diagnostics', 'i' , ':lua vim.diagnostic.open_float(nil, {focus=true, scope="cursor")<CR>'},
{ '+ lsp_lines', 'I' , ':lua require("lsp_lines").toggle()<CR>' },
{ 'Next Scheme', 'j' , ':call SetColScheme(+1)<CR>' },
{ 'Prev Scheme', 'J' , ':call SetColScheme(-1)<CR>' },
{ '', 'k' , ':call CorrectColors()<CR>' },
{ '', 'l' , ':call CyBack(+1)<CR>'},
{ '', 'L' , ':call CyBack(-1)<CR>'},
{ '', 'M' , ':messages<esc>' },
{ '', 'N' , ':cnext<esc>' },
{ '', 'n' , ':next<esc>' },
{ '', 'ob' , ':silent !"${BROWSER:-"brave"}" %<CR>' },
{ '', 'oq' , ':silent !"qutebrowser" %<CR>' },
{ '', 'q' , ':bd' },
{ '', 's' , ':source ~/.config/nvim/init.vim<esc>'},
{ '', 'T' , ':term<esc>' },
{ '', 'u' , ':Lf<esc>' },
{ '', 'vv' , ':TogVE()<CR>' },
{ 'Prev Tab', 'tb' , ':tabmove -1<esc>' },
{ 'Next Tab', 'tn' , ':tabmove +1<esc>' },
{ 'New Tab', 'tt' , ':tabnew<esc>' },
{ '', ',' , '<C-^>' },
{ 'Next Buffer', ']' , ':bnext<CR>' },
{ 'Prev Buffer', '[' , ':bprevious<CR>' },
{ '', '-' , '20<c-w><' },
{ '', '=' , '20<c-w>>' },
{ '', 'A' , ':LspStart()<CR>' },
{ '', 'a' , ':LspStop()<CR>' },
{ '', 'B' , ':ls<CR>:b<Space>' },
{ '', 'b' , ':Buffers<esc>' },
{ '+ Line Len Indicator', 'cc' , ':call TogCC()<CR>' },
{ '+ CursorLine', 'cl' , ':set nocul!<CR>' },
{ '+ Statusline', 'cs' , ':call TogSL()<CR>' },
{ 'Delete Buffer', 'D' , ':bd<esc><enter>' },
{ 'Find Space EOL', 'df' , ':%s/\\s\\+\\ze$//gc<CR>' },
{ '+ CursorColumn', 'e' , ':set cuc!<CR>' },
{ 'Edit File CWD', 'E' , ':call feedkeys(":e " . FilePathFull() . "/")<CR>' },
{ '+ Wrap', 'f' , ':set wrap!<esc>' },
{ 'New File', 'gn' , ':enew<esc>' },
{ '', 'gh' , ':call getHL()<CR>' },
{ 'Print Mappings', 'gm' , ':call GMaps()<CR>' },
{ 'Helpgrep', 'H' , ':vert helpgrep ' },
{ 'Open diagnostics', 'i' , ':lua vim.diagnostic.open_float(nil, {focus=true, scope="cursor")<CR>' },
{ '+ lsp_lines', 'I' , ':lua require("lsp_lines").toggle()<CR>' },
{ 'Next Scheme', 'j' , ':call SetColScheme(+1)<CR>' },
{ 'Prev Scheme', 'J' , ':call SetColScheme(-1)<CR>' },
{ '', 'k' , ':call CorrectColors()<CR>' },
{ '', 'l' , ':call CyBack(+1)<CR>' },
{ '', 'L' , ':call CyBack(-1)<CR>' },
{ 'Checkhealth', 'mh' , ':checkhealth<CR>' },
{ '', 'mm' , ':messages<esc>' },
{ '', 'N' , ':cnext<esc>' },
{ '', 'n' , ':next<esc>' },
{ '', 'ob' , ':silent !"${BROWSER:-"brave"}" %<CR>' },
{ '', 'oq' , ':silent !"qutebrowser" %<CR>' },
{ '', 'q' , ':bd' },
{ '', 's' , ':source ~/.config/nvim/init.vim<esc>' },
{ '', 'T' , ':term<esc>' },
{ '', 'u' , ':Lf<esc>' },
{ '', 'vv' , ':call TogVE()<CR>' },
-- { '', 'W' , ':call Web("f")<esc>i'},
{ '', 'W' , '<Plug>VimwikiIndex' },
{ '', 'w' , ':w<esc>' },
{ '', 'X' , ':!%:p ' },
{ '', 'x' , ':!%:p<esc>' },
{ '', 'y' , ':hi Normal guibg=Transparent<esc>'},
{ '', 'ZC' , ':bd<esc>' },
{ '', 'z' , 'z' },
{ '', 'W' , '<Plug>VimwikiIndex' },
{ '', 'w' , ':w<esc>' },
{ '', 'X' , ':!%:p ' },
{ '', 'x' , ':!%:p<esc>' },
{ '', 'y' , ':hi Normal guibg=Transparent<esc>' },
{ '', 'ZC' , ':bd<esc>' },
{ '', 'z' , 'z' },
}


Expand Down

0 comments on commit 8d51f74

Please sign in to comment.