update
This commit is contained in:
parent
f5daf0ad68
commit
0e500b7d8f
29 changed files with 687 additions and 694 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
vendor/
|
|
|
@ -1,6 +0,0 @@
|
||||||
column_width = 120
|
|
||||||
line_endings = "Unix"
|
|
||||||
indent_type = "Spaces"
|
|
||||||
indent_width = 2
|
|
||||||
quote_style = "AutoPreferDouble"
|
|
||||||
call_parentheses = "None"
|
|
177
Session.vim
Normal file
177
Session.vim
Normal file
|
@ -0,0 +1,177 @@
|
||||||
|
let SessionLoad = 1
|
||||||
|
let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
|
||||||
|
let v:this_session=expand("<sfile>:p")
|
||||||
|
silent only
|
||||||
|
silent tabonly
|
||||||
|
cd ~/.config/nvim
|
||||||
|
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
||||||
|
let s:wipebuf = bufnr('%')
|
||||||
|
endif
|
||||||
|
let s:shortmess_save = &shortmess
|
||||||
|
if &shortmess =~ 'A'
|
||||||
|
set shortmess=aoOA
|
||||||
|
else
|
||||||
|
set shortmess=aoO
|
||||||
|
endif
|
||||||
|
badd +45 lua/hsta/plugins/mini.lua
|
||||||
|
badd +34 lua/hsta/config.lua
|
||||||
|
badd +1 lua/hsta/plugins/keybinds.lua
|
||||||
|
badd +50 lua/hsta/plugins/lsp.lua
|
||||||
|
badd +16 lua/hsta/plugins/colors.lua
|
||||||
|
argglobal
|
||||||
|
%argdel
|
||||||
|
edit lua/hsta/plugins/lsp.lua
|
||||||
|
argglobal
|
||||||
|
balt lua/hsta/plugins/colors.lua
|
||||||
|
setlocal keymap=
|
||||||
|
setlocal noarabic
|
||||||
|
setlocal autoindent
|
||||||
|
setlocal backupcopy=
|
||||||
|
setlocal nobinary
|
||||||
|
setlocal nobreakindent
|
||||||
|
setlocal breakindentopt=
|
||||||
|
setlocal bufhidden=
|
||||||
|
setlocal buflisted
|
||||||
|
setlocal buftype=
|
||||||
|
setlocal nocindent
|
||||||
|
setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e
|
||||||
|
setlocal cinoptions=
|
||||||
|
setlocal cinscopedecls=public,protected,private
|
||||||
|
setlocal cinwords=if,else,while,do,for,switch
|
||||||
|
setlocal colorcolumn=
|
||||||
|
setlocal comments=:---,:--
|
||||||
|
setlocal commentstring=--\ %s
|
||||||
|
setlocal complete=.,w,b,u,t
|
||||||
|
setlocal completefunc=
|
||||||
|
setlocal concealcursor=
|
||||||
|
setlocal conceallevel=0
|
||||||
|
setlocal nocopyindent
|
||||||
|
setlocal nocursorbind
|
||||||
|
setlocal nocursorcolumn
|
||||||
|
setlocal cursorline
|
||||||
|
setlocal cursorlineopt=both
|
||||||
|
setlocal define=\\<function\\|\\<local\\%(\\s\\+function\\)\\=
|
||||||
|
setlocal dictionary=
|
||||||
|
setlocal nodiff
|
||||||
|
setlocal equalprg=
|
||||||
|
setlocal errorformat=
|
||||||
|
setlocal expandtab
|
||||||
|
if &filetype != 'lua'
|
||||||
|
setlocal filetype=lua
|
||||||
|
endif
|
||||||
|
setlocal fillchars=
|
||||||
|
setlocal fixendofline
|
||||||
|
setlocal foldcolumn=0
|
||||||
|
setlocal foldenable
|
||||||
|
setlocal foldexpr=0
|
||||||
|
setlocal foldignore=#
|
||||||
|
setlocal foldlevel=0
|
||||||
|
setlocal foldmarker={{{,}}}
|
||||||
|
setlocal foldmethod=manual
|
||||||
|
setlocal foldminlines=1
|
||||||
|
setlocal foldnestmax=20
|
||||||
|
setlocal foldtext=foldtext()
|
||||||
|
setlocal formatexpr=v:lua.vim.lsp.formatexpr()
|
||||||
|
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
|
||||||
|
setlocal formatoptions=jcroql
|
||||||
|
setlocal formatprg=
|
||||||
|
setlocal grepprg=
|
||||||
|
setlocal iminsert=0
|
||||||
|
setlocal imsearch=-1
|
||||||
|
setlocal include=
|
||||||
|
setlocal includeexpr=tr(v:fname,'.','/')
|
||||||
|
setlocal indentexpr=nvim_treesitter#indent()
|
||||||
|
setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e,0=end,0=until
|
||||||
|
setlocal noinfercase
|
||||||
|
setlocal iskeyword=@,48-57,_,192-255
|
||||||
|
setlocal keywordprg=
|
||||||
|
setlocal nolinebreak
|
||||||
|
setlocal nolisp
|
||||||
|
setlocal lispoptions=
|
||||||
|
setlocal lispwords=
|
||||||
|
setlocal nolist
|
||||||
|
setlocal listchars=
|
||||||
|
setlocal makeencoding=
|
||||||
|
setlocal makeprg=
|
||||||
|
setlocal matchpairs=(:),{:},[:]
|
||||||
|
setlocal modeline
|
||||||
|
setlocal modifiable
|
||||||
|
setlocal nrformats=bin,hex
|
||||||
|
setlocal number
|
||||||
|
setlocal numberwidth=4
|
||||||
|
setlocal omnifunc=v:lua.vim.lsp.omnifunc
|
||||||
|
setlocal path=
|
||||||
|
setlocal nopreserveindent
|
||||||
|
setlocal nopreviewwindow
|
||||||
|
setlocal quoteescape=\\
|
||||||
|
setlocal noreadonly
|
||||||
|
setlocal relativenumber
|
||||||
|
setlocal norightleft
|
||||||
|
setlocal rightleftcmd=search
|
||||||
|
setlocal scrollback=-1
|
||||||
|
setlocal noscrollbind
|
||||||
|
setlocal scrolloff=-1
|
||||||
|
setlocal shiftwidth=4
|
||||||
|
setlocal showbreak=
|
||||||
|
setlocal sidescrolloff=-1
|
||||||
|
setlocal signcolumn=auto
|
||||||
|
setlocal nosmartindent
|
||||||
|
setlocal nosmoothscroll
|
||||||
|
setlocal softtabstop=4
|
||||||
|
setlocal nospell
|
||||||
|
setlocal spellcapcheck=[.?!]\\_[\\])'\"\\t\ ]\\+
|
||||||
|
setlocal spellfile=
|
||||||
|
setlocal spelllang=en
|
||||||
|
setlocal spelloptions=noplainbuffer
|
||||||
|
setlocal statuscolumn=
|
||||||
|
setlocal statusline=%{%v:lua.MiniStatusline.active()%}
|
||||||
|
setlocal suffixesadd=.lua
|
||||||
|
setlocal noswapfile
|
||||||
|
setlocal synmaxcol=3000
|
||||||
|
if &syntax != ''
|
||||||
|
setlocal syntax=
|
||||||
|
endif
|
||||||
|
setlocal tabstop=4
|
||||||
|
setlocal tagcase=
|
||||||
|
setlocal tagfunc=v:lua.vim.lsp.tagfunc
|
||||||
|
setlocal tags=
|
||||||
|
setlocal textwidth=0
|
||||||
|
setlocal thesaurus=
|
||||||
|
setlocal thesaurusfunc=
|
||||||
|
setlocal noundofile
|
||||||
|
setlocal undolevels=-123456
|
||||||
|
setlocal varsofttabstop=
|
||||||
|
setlocal vartabstop=
|
||||||
|
setlocal virtualedit=
|
||||||
|
setlocal winbar=
|
||||||
|
setlocal winblend=0
|
||||||
|
setlocal nowinfixbuf
|
||||||
|
setlocal winfixheight
|
||||||
|
setlocal nowinfixwidth
|
||||||
|
setlocal winhighlight=
|
||||||
|
setlocal nowrap
|
||||||
|
setlocal wrapmargin=0
|
||||||
|
silent! normal! zE
|
||||||
|
let &fdl = &fdl
|
||||||
|
let s:l = 50 - ((12 * winheight(0) + 12) / 24)
|
||||||
|
if s:l < 1 | let s:l = 1 | endif
|
||||||
|
keepjumps exe s:l
|
||||||
|
normal! zt
|
||||||
|
keepjumps 50
|
||||||
|
normal! 0
|
||||||
|
tabnext 1
|
||||||
|
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
||||||
|
silent exe 'bwipe ' . s:wipebuf
|
||||||
|
endif
|
||||||
|
unlet! s:wipebuf
|
||||||
|
set winheight=1 winwidth=20
|
||||||
|
let &shortmess = s:shortmess_save
|
||||||
|
let s:sx = expand("<sfile>:p:r")."x.vim"
|
||||||
|
if filereadable(s:sx)
|
||||||
|
exe "source " . fnameescape(s:sx)
|
||||||
|
endif
|
||||||
|
let &g:so = s:so_save | let &g:siso = s:siso_save
|
||||||
|
nohlsearch
|
||||||
|
doautoall SessionLoadPost
|
||||||
|
unlet SessionLoad
|
||||||
|
" vim: set ft=vim :
|
2
init.lua
2
init.lua
|
@ -1 +1 @@
|
||||||
require "config.lazy"
|
require("hsta")
|
||||||
|
|
|
@ -1,34 +1,23 @@
|
||||||
{
|
{
|
||||||
"ashen.nvim": { "branch": "main", "commit": "738663594426302968780415d07fddb300685ab8" },
|
"blink.cmp": { "branch": "main", "commit": "4f38ce99a472932d5776337f08f7a8180f1f571a" },
|
||||||
"auto-session": { "branch": "main", "commit": "0a1318557c03845f2e0dde347bc54507d1d8c34d" },
|
"conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"kanagawa-paper.nvim": { "branch": "master", "commit": "7a77de03b636fb5c8034d86da5fb3b164c0f7c57" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
|
||||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
|
||||||
"colorful-menu.nvim": { "branch": "master", "commit": "f80feb8a6706f965321aff24d0ed3849f02a7f77" },
|
|
||||||
"conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" },
|
|
||||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||||
"lsp_signature.nvim": { "branch": "master", "commit": "b58cca003d1d3311213d6db0352f58d8e57bfff0" },
|
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "834a5817f7e2be22a7062620032d49c600c35fab" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
"mason.nvim": { "branch": "main", "commit": "7c7318e8bae7e3536ef6b9e86b9e38e74f2e125e" },
|
||||||
"miasma.nvim": { "branch": "main", "commit": "b50e9ab4f29cbc5d064f75b64acb8383551ad794" },
|
"melange-nvim": { "branch": "master", "commit": "2db5407f2f6d6d6286f50f2f7365728d66f6f3ae" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "fe8a669078a5066220262f173bf901f322e39c05" },
|
"mini.nvim": { "branch": "main", "commit": "0420076298c4457f200c2de468f65d080597a347" },
|
||||||
"modus-themes.nvim": { "branch": "master", "commit": "b6c46f8066b2d96cb75d5bc7202a9a4c097b5e9f" },
|
"nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "9b5d67119c46e3262ffe1508fe6d8540b79ad75d" },
|
"nvim-lspconfig": { "branch": "master", "commit": "4bc481b6f0c0cf3671fc894debd0e00347089a4e" },
|
||||||
"nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" },
|
"nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "059e89495b3ec09395262f16b1ad441a38081d04" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "442e077e326ac467daf9cd63e72120fb450a850b" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "57dfa947cc88cdf1baa2c7e13ed31edddd8fb1d1" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"tabby.nvim": { "branch": "main", "commit": "6362aa9595428cefbb6556c05390e8444d1bcd12" },
|
"rose-pine": { "branch": "main", "commit": "491a0c77abc7ecb955c27a974091a5968232995f" },
|
||||||
|
"scope.nvim": { "branch": "main", "commit": "3fc963e75f88990a9467ff72b8eea667a69c30a2" },
|
||||||
|
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||||
|
"solarized.nvim": { "branch": "main", "commit": "c0dfe1cbfabd93b546baf5f1408f5df7e02e2050" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
-- Bootstrap lazy.nvim
|
|
||||||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
|
||||||
local out = vim.fn.system { "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }
|
|
||||||
if vim.v.shell_error ~= 0 then
|
|
||||||
vim.api.nvim_echo({
|
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
|
||||||
{ out, "WarningMsg" },
|
|
||||||
{ "\nPress any key to exit..." },
|
|
||||||
}, true, {})
|
|
||||||
vim.fn.getchar()
|
|
||||||
os.exit(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
|
||||||
-- loading lazy.nvim so that mappings are correct.
|
|
||||||
-- This is also a good place to setup other settings (vim.opt)
|
|
||||||
vim.g.mapleader = "`"
|
|
||||||
vim.g.maplocalleader = "\\"
|
|
||||||
|
|
||||||
require("config.settings").init()
|
|
||||||
|
|
||||||
-- Setup lazy.nvim
|
|
||||||
require("lazy").setup {
|
|
||||||
spec = {
|
|
||||||
-- import your plugins
|
|
||||||
{ import = "plugins" },
|
|
||||||
},
|
|
||||||
-- Configure any other settings here. See the documentation for more details.
|
|
||||||
-- colorscheme that will be used when installing plugins.
|
|
||||||
install = { colorscheme = { "habamax" } },
|
|
||||||
-- automatically check for plugin updates
|
|
||||||
checker = { enabled = true },
|
|
||||||
change_detection = { notify = false },
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
local m = {}
|
|
||||||
|
|
||||||
m.init = function()
|
|
||||||
vim.opt.shiftwidth = 4
|
|
||||||
vim.opt.softtabstop = 4
|
|
||||||
vim.opt.tabstop = 4
|
|
||||||
vim.opt.expandtab = true
|
|
||||||
|
|
||||||
vim.opt.showmode = false
|
|
||||||
|
|
||||||
vim.opt.hlsearch = false
|
|
||||||
vim.opt.incsearch = true
|
|
||||||
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
|
|
||||||
vim.opt.updatetime = 50
|
|
||||||
|
|
||||||
vim.opt.wrap = false
|
|
||||||
vim.opt.number = true
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
vim.opt.mouse = ""
|
|
||||||
|
|
||||||
vim.opt.fillchars = { eob = " " }
|
|
||||||
|
|
||||||
vim.o.clipboard = "unnamed"
|
|
||||||
|
|
||||||
vim.o.background = "dark"
|
|
||||||
|
|
||||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
|
||||||
end
|
|
||||||
|
|
||||||
return m
|
|
34
lua/hsta/config.lua
Normal file
34
lua/hsta/config.lua
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
-- Configuration!
|
||||||
|
|
||||||
|
vim.g.mapleader = "`"
|
||||||
|
|
||||||
|
-- Dont change cursor when entering insert mode
|
||||||
|
vim.opt.guicursor = "i:block"
|
||||||
|
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
|
vim.opt.showmode = false
|
||||||
|
|
||||||
|
vim.opt.hlsearch = false
|
||||||
|
vim.opt.incsearch = true
|
||||||
|
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
|
vim.opt.updatetime = 50
|
||||||
|
vim.o.scrolloff = 8
|
||||||
|
|
||||||
|
vim.opt.wrap = false
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
vim.opt.mouse = ""
|
||||||
|
vim.o.cursorline = true
|
||||||
|
|
||||||
|
vim.opt.fillchars = { eob = " " }
|
||||||
|
vim.o.clipboard = "unnamed"
|
||||||
|
vim.o.background = "dark"
|
||||||
|
|
||||||
|
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions,globals"
|
||||||
|
vim.o.swapfile = false
|
25
lua/hsta/init.lua
Normal file
25
lua/hsta/init.lua
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
-- Hunter Stasonis
|
||||||
|
-- Neovim config
|
||||||
|
|
||||||
|
-- Configure
|
||||||
|
require("hsta.config")
|
||||||
|
|
||||||
|
-- Initalize lazy
|
||||||
|
require("want-lazy")
|
||||||
|
|
||||||
|
-- Load plugins
|
||||||
|
-- Setup lazy.nvim
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- import your plugins
|
||||||
|
{ import = "hsta.plugins" },
|
||||||
|
},
|
||||||
|
-- Configure any other settings here. See the documentation for more details.
|
||||||
|
-- colorscheme that will be used when installing plugins.
|
||||||
|
install = { colorscheme = { "default" } },
|
||||||
|
-- automatically check for plugin updates
|
||||||
|
checker = { enabled = true },
|
||||||
|
change_detection = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
})
|
38
lua/hsta/plugins/cmp.lua
Normal file
38
lua/hsta/plugins/cmp.lua
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
dependencies = { "rafamadriz/friendly-snippets" },
|
||||||
|
|
||||||
|
version = "1.*",
|
||||||
|
|
||||||
|
---@module 'blink.cmp'
|
||||||
|
---@type blink.cmp.Config
|
||||||
|
opts = {
|
||||||
|
keymap = { preset = "default" },
|
||||||
|
|
||||||
|
appearance = {
|
||||||
|
nerd_font_variant = "mono",
|
||||||
|
},
|
||||||
|
|
||||||
|
completion = { documentation = { auto_show = true } },
|
||||||
|
|
||||||
|
sources = {
|
||||||
|
default = { "lsp", "path", "snippets", "buffer", "cmdline", "lazydev" },
|
||||||
|
providers = {
|
||||||
|
lazydev = {
|
||||||
|
name = "LazyDev",
|
||||||
|
module = "lazydev.integrations.blink",
|
||||||
|
-- make lazydev completions top priority (see `:h blink.cmp`)
|
||||||
|
score_offset = 100,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cmdline = {
|
||||||
|
completion = { menu = { auto_show = true } },
|
||||||
|
},
|
||||||
|
|
||||||
|
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||||
|
},
|
||||||
|
opts_extend = { "sources.default" },
|
||||||
|
},
|
||||||
|
}
|
54
lua/hsta/plugins/colors.lua
Normal file
54
lua/hsta/plugins/colors.lua
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"EdenEast/nightfox.nvim",
|
||||||
|
lazy = false,
|
||||||
|
enabled = true,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
require("nightfox").setup({})
|
||||||
|
|
||||||
|
vim.cmd([[ colorscheme nightfox ]])
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"thesimonho/kanagawa-paper.nvim",
|
||||||
|
lazy = false,
|
||||||
|
enabled = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
require("kanagawa-paper").setup({})
|
||||||
|
|
||||||
|
vim.cmd([[ colorscheme kanagawa-paper ]])
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"savq/melange-nvim",
|
||||||
|
lazy = false,
|
||||||
|
enabled = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
vim.cmd([[ colorscheme melange ]])
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"maxmx03/solarized.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
enabled = false,
|
||||||
|
---@type solarized.config
|
||||||
|
opts = {},
|
||||||
|
config = function(_, opts)
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
require("solarized").setup(opts)
|
||||||
|
vim.cmd.colorscheme("solarized")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rose-pine/neovim",
|
||||||
|
name = "rose-pine",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
enabled = false,
|
||||||
|
config = function() end,
|
||||||
|
},
|
||||||
|
}
|
52
lua/hsta/plugins/keybinds.lua
Normal file
52
lua/hsta/plugins/keybinds.lua
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>\\",
|
||||||
|
function()
|
||||||
|
require("which-key").show({ global = false })
|
||||||
|
end,
|
||||||
|
desc = "Buffer Local Keymaps (which-key)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"K",
|
||||||
|
":m '<-2<CR>gv=gv",
|
||||||
|
mode = "v",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"J",
|
||||||
|
":m '>+1<CR>gv=gv",
|
||||||
|
mode = "v",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<C-d>",
|
||||||
|
"<C-d>zz",
|
||||||
|
desc = "Half page jump center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<C-u>",
|
||||||
|
"<C-u>zz",
|
||||||
|
desc = "Half page jump center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>p",
|
||||||
|
'"_dP',
|
||||||
|
desc = "Stolen from prime",
|
||||||
|
mode = "x",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>nn",
|
||||||
|
":cnext<CR>",
|
||||||
|
desc = "Next quickfix list item",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>-",
|
||||||
|
":tabclose<CR>",
|
||||||
|
desc = "Close this tab",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
13
lua/hsta/plugins/lazydev.lua
Normal file
13
lua/hsta/plugins/lazydev.lua
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/lazydev.nvim",
|
||||||
|
ft = "lua", -- only load on lua files
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
-- See the configuration section for more details
|
||||||
|
-- Load luvit types when the `vim.uv` word is found
|
||||||
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
61
lua/hsta/plugins/lsp.lua
Normal file
61
lua/hsta/plugins/lsp.lua
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
return {
|
||||||
|
-- Buffer format on save
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
config = function()
|
||||||
|
require("conform").setup({
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { "stylua" },
|
||||||
|
python = { "isort", "black" },
|
||||||
|
rust = { "rustfmt", lsp_format = "fallback" },
|
||||||
|
javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||||
|
cpp = { "clang-format" },
|
||||||
|
},
|
||||||
|
format_on_save = {
|
||||||
|
-- These options will be passed to conform.format()
|
||||||
|
timeout_ms = 500,
|
||||||
|
lsp_format = "fallback",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- Automatic LSP setup
|
||||||
|
{
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
tag = "v1.32.0",
|
||||||
|
dependencies = { "williamboman/mason.nvim", "neovim/nvim-lspconfig" },
|
||||||
|
lazy = false,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"ca",
|
||||||
|
vim.lsp.buf.code_action,
|
||||||
|
desc = "LSP: [C]ode Action",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>rr",
|
||||||
|
vim.lsp.buf.rename,
|
||||||
|
desc = "LSP rename",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>lh",
|
||||||
|
vim.lsp.buf.hover,
|
||||||
|
desc = "[L]sp: Hover",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
require("mason").setup({})
|
||||||
|
|
||||||
|
require("mason-lspconfig").setup({
|
||||||
|
automatic_installation = true,
|
||||||
|
ensure_installed = { "lua_ls", "rust_analyzer", "clangd", "cmake" },
|
||||||
|
})
|
||||||
|
|
||||||
|
require("mason-lspconfig").setup_handlers({
|
||||||
|
function(server_name)
|
||||||
|
require("lspconfig")[server_name].setup({})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
51
lua/hsta/plugins/mini.lua
Normal file
51
lua/hsta/plugins/mini.lua
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"echasnovski/mini.nvim",
|
||||||
|
version = "*",
|
||||||
|
lazy = false,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>=",
|
||||||
|
function()
|
||||||
|
require("mini.bufremove").delete()
|
||||||
|
end,
|
||||||
|
desc = "Delete buffer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>[",
|
||||||
|
":bprev<CR>",
|
||||||
|
desc = "Goto previous buffer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>]",
|
||||||
|
":bnext<CR>",
|
||||||
|
desc = "Goto next buffer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>;",
|
||||||
|
":tabprevious<CR>",
|
||||||
|
desc = "Goto previous tab",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>'",
|
||||||
|
":tabnext<CR>",
|
||||||
|
desc = "Goto next tab",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("mini.ai").setup()
|
||||||
|
require("mini.icons").setup()
|
||||||
|
|
||||||
|
require("mini.sessions").setup({
|
||||||
|
autoread = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
require("mini.starter").setup({})
|
||||||
|
require("mini.tabline").setup({})
|
||||||
|
require("mini.statusline").setup({})
|
||||||
|
require("mini.notify").setup({})
|
||||||
|
require("mini.git").setup()
|
||||||
|
require("mini.bufremove").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
17
lua/hsta/plugins/snacks.lua
Normal file
17
lua/hsta/plugins/snacks.lua
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
priority = 1000,
|
||||||
|
lazy = false,
|
||||||
|
enabled = false,
|
||||||
|
---@type snacks.Config
|
||||||
|
opts = {
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
-- refer to the configuration section below
|
||||||
|
bigfile = { enabled = true },
|
||||||
|
dashboard = { enabled = true },
|
||||||
|
notifier = { enabled = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
98
lua/hsta/plugins/telescope.lua
Normal file
98
lua/hsta/plugins/telescope.lua
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release",
|
||||||
|
},
|
||||||
|
{ "tiagovla/scope.nvim", config = true },
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
tag = "0.1.8",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>dd",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").diagnostics()
|
||||||
|
end,
|
||||||
|
desc = "[D]iagnostics",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gd",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_definitions()
|
||||||
|
end,
|
||||||
|
desc = "LSP def",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gr",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_references()
|
||||||
|
end,
|
||||||
|
desc = "[L]SP, Find [R]eferences",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ws",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_workspace_symbols()
|
||||||
|
end,
|
||||||
|
desc = "LSP, [W]orkspace [S]ymbols",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gi",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_implementations()
|
||||||
|
end,
|
||||||
|
desc = "[L]sp, [I]mplementations",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gt",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").lsp_type_definitions()
|
||||||
|
end,
|
||||||
|
desc = "[L]SP, Type Definitions",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ff",
|
||||||
|
function()
|
||||||
|
local builtin = require("telescope.builtin")
|
||||||
|
builtin.find_files()
|
||||||
|
end,
|
||||||
|
desc = "Telescope: Find files",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>q",
|
||||||
|
":Telescope scope buffers<CR>",
|
||||||
|
desc = "Telescope: find buffers",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>fg",
|
||||||
|
function()
|
||||||
|
local builtin = require("telescope.builtin")
|
||||||
|
builtin.live_grep()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
local telescope = require("telescope")
|
||||||
|
telescope.setup({
|
||||||
|
pickers = {},
|
||||||
|
defaults = {
|
||||||
|
layout_config = {
|
||||||
|
horizontal = {
|
||||||
|
preview_cutoff = 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
i = { ["<c-d>"] = require("telescope.actions").delete_buffer },
|
||||||
|
n = { ["<c-d>"] = require("telescope.actions").delete_buffer },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
require("telescope").load_extension("fzf")
|
||||||
|
require("telescope").load_extension("scope")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
32
lua/hsta/plugins/treesitter.lua
Normal file
32
lua/hsta/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
build = ":TSUpdate",
|
||||||
|
config = function()
|
||||||
|
local configs = require("nvim-treesitter.configs")
|
||||||
|
|
||||||
|
configs.setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"lua",
|
||||||
|
"vim",
|
||||||
|
"vimdoc",
|
||||||
|
"markdown",
|
||||||
|
"json",
|
||||||
|
"javascript",
|
||||||
|
"html",
|
||||||
|
"c",
|
||||||
|
"cpp",
|
||||||
|
"hlsl",
|
||||||
|
"jsdoc",
|
||||||
|
"rust",
|
||||||
|
"python",
|
||||||
|
"bash",
|
||||||
|
"zig",
|
||||||
|
},
|
||||||
|
sync_install = false,
|
||||||
|
highlight = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,12 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"stevearc/conform.nvim",
|
|
||||||
opts = {
|
|
||||||
formatters_by_ft = {
|
|
||||||
lua = { "stylua" },
|
|
||||||
cpp = { "clang-format" },
|
|
||||||
},
|
|
||||||
format_on_save = { timeout_ms = 500, lsp_format = "fallback" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>\\",
|
|
||||||
function()
|
|
||||||
require("which-key").show { global = false }
|
|
||||||
end,
|
|
||||||
desc = "Buffer Local Keymaps (which-key)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"K",
|
|
||||||
":m '<-2<CR>gv=gv",
|
|
||||||
mode = "v",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"J",
|
|
||||||
":m '>+1<CR>gv=gv",
|
|
||||||
mode = "v",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<C-d>",
|
|
||||||
"<C-d>zz",
|
|
||||||
desc = "Half page jump center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<C-u>",
|
|
||||||
"<C-u>zz",
|
|
||||||
desc = "Half page jump center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>p",
|
|
||||||
'"_dP',
|
|
||||||
desc = "Stolen from prime",
|
|
||||||
mode = "x",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>nn",
|
|
||||||
":cnext<CR>",
|
|
||||||
desc = "Next quickfix list item"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,193 +0,0 @@
|
||||||
return {
|
|
||||||
{ "hrsh7th/cmp-nvim-lsp" },
|
|
||||||
{ "hrsh7th/cmp-cmdline" },
|
|
||||||
{ "hrsh7th/cmp-path" },
|
|
||||||
{ "hrsh7th/cmp-buffer" },
|
|
||||||
{
|
|
||||||
"ray-x/lsp_signature.nvim",
|
|
||||||
event = "InsertEnter",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/lazydev.nvim",
|
|
||||||
ft = "lua", -- only load on lua files
|
|
||||||
opts = {
|
|
||||||
library = {
|
|
||||||
-- See the configuration section for more details
|
|
||||||
-- Load luvit types when the `vim.uv` word is found
|
|
||||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
opts = {
|
|
||||||
ensure_installed = { "lua_ls", "rust_analyzer", "clangd", "zls" },
|
|
||||||
handlers = {
|
|
||||||
function(server_name)
|
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
|
|
||||||
local on_attach = function(client, bufnr)
|
|
||||||
require("lsp_signature").on_attach({}, bufnr)
|
|
||||||
if client.server_capabilities.documentSymbolProvider then
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
|
||||||
|
|
||||||
require("lspconfig")[server_name].setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"onsails/lspkind.nvim",
|
|
||||||
config = function()
|
|
||||||
require("lspkind").init { preset = "codicons" }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
config = function()
|
|
||||||
local cmp = require "cmp"
|
|
||||||
local lspkind = require "lspkind"
|
|
||||||
|
|
||||||
cmp.setup {
|
|
||||||
formatting = {
|
|
||||||
format = lspkind.cmp_format {
|
|
||||||
mode = "symbol", -- show only symbol annotations
|
|
||||||
maxwidth = {
|
|
||||||
menu = 50, -- leading text (labelDetails)
|
|
||||||
abbr = 50, -- actual suggestion item
|
|
||||||
},
|
|
||||||
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
|
|
||||||
show_labelDetails = true, -- show labelDetails in menu. Disabled by default
|
|
||||||
|
|
||||||
before = function(entry, vim_item)
|
|
||||||
local highlights_info = require("colorful-menu").cmp_highlights(entry)
|
|
||||||
|
|
||||||
-- highlight_info is nil means we are missing the ts parser, it's
|
|
||||||
-- better to fallback to use default `vim_item.abbr`. What this plugin
|
|
||||||
-- offers is two fields: `vim_item.abbr_hl_group` and `vim_item.abbr`.
|
|
||||||
if highlights_info ~= nil then
|
|
||||||
vim_item.abbr_hl_group = highlights_info.highlights
|
|
||||||
vim_item.abbr = highlights_info.text
|
|
||||||
end
|
|
||||||
|
|
||||||
return vim_item
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{
|
|
||||||
name = "lazydev",
|
|
||||||
group_index = 0, -- set group index to 0 to skip loading LuaLS completions
|
|
||||||
},
|
|
||||||
},
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
vim.snippet.expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert {
|
|
||||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
["<C-e>"] = cmp.mapping.abort(),
|
|
||||||
["<CR>"] = cmp.mapping.confirm { select = true }, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
cmp.setup.cmdline({ "/", "?" }, {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = {
|
|
||||||
{ name = "buffer" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
|
||||||
cmp.setup.cmdline(":", {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "path" },
|
|
||||||
}, {
|
|
||||||
{ name = "cmdline" },
|
|
||||||
}),
|
|
||||||
matching = { disallow_symbol_nonprefix_matching = false },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
lazy = false,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"ca",
|
|
||||||
vim.lsp.buf.code_action,
|
|
||||||
desc = "LSP: [C]ode Action",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>rr",
|
|
||||||
vim.lsp.buf.rename,
|
|
||||||
desc = "LSP rename",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>lh",
|
|
||||||
vim.lsp.buf.hover,
|
|
||||||
desc = "[L]sp: Hover",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
|
|
||||||
local on_attach = function(client, bufnr)
|
|
||||||
-- TODO: Impl
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.filetype.add {
|
|
||||||
extension = {
|
|
||||||
hlsl = "hlsl",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
if not require("lspconfig.configs").hlsl_tools then
|
|
||||||
require("lspconfig.configs").hlsl_tools = {
|
|
||||||
default_config = {
|
|
||||||
cmd = "/home/hstasonis/.config/nvim/vendor/shader-language-server",
|
|
||||||
on_new_config = function(new_config, _)
|
|
||||||
new_config.cmd_env.LD_LIBRARY_PATH = "/home/hstasonis/.config/nvim/vendor"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
single_file_support = true,
|
|
||||||
filetypes = { "hlsl" },
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Set it up as usual
|
|
||||||
require("lspconfig.configs").hlsl_tools.setup {
|
|
||||||
on_attach = on_attach,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
config = function()
|
|
||||||
require("mason").setup {}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"j-hui/fidget.nvim",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"xzbdmw/colorful-menu.nvim",
|
|
||||||
config = function()
|
|
||||||
-- You don't need to set these options.
|
|
||||||
require("colorful-menu").setup {}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
'nvim-lualine/lualine.nvim',
|
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
|
||||||
config = function()
|
|
||||||
require('lualine').setup({})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"echasnovski/mini.nvim",
|
|
||||||
enabled = true,
|
|
||||||
config = function()
|
|
||||||
--require("mini.statusline").setup()
|
|
||||||
require("mini.pairs").setup()
|
|
||||||
require("mini.ai").setup()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
-- Used to use oil.nvim for stuff, didn't need it...
|
|
||||||
return {}
|
|
|
@ -1,16 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
{
|
|
||||||
'rmagatti/auto-session',
|
|
||||||
lazy = false,
|
|
||||||
|
|
||||||
---enables autocomplete for opts
|
|
||||||
---@module "auto-session"
|
|
||||||
---@type AutoSession.Config
|
|
||||||
opts = {
|
|
||||||
suppressed_dirs = { '~/', '~/Downloads', '/tmp' },
|
|
||||||
-- log_level = 'debug',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,114 +0,0 @@
|
||||||
return {
|
|
||||||
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release' },
|
|
||||||
{
|
|
||||||
"folke/trouble.nvim",
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader><Tab>",
|
|
||||||
function()
|
|
||||||
require("trouble").next { jump = true, skip_groups = true }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader><esc>",
|
|
||||||
function()
|
|
||||||
require("trouble").prev { jump = true, skip_groups = true }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
tag = "0.1.8",
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>dd",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").diagnostics()
|
|
||||||
end,
|
|
||||||
desc = "[D]iagnostics",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"gd",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_definitions()
|
|
||||||
end,
|
|
||||||
desc = "LSP def",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"gr",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_references()
|
|
||||||
end,
|
|
||||||
desc = "[L]SP, Find [R]eferences",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>ws",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_workspace_symbols()
|
|
||||||
end,
|
|
||||||
desc = "LSP, [W]orkspace [S]ymbols",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"gi",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_implementations()
|
|
||||||
end,
|
|
||||||
desc = "[L]sp, [I]mplementations",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"gt",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_type_definitions()
|
|
||||||
end,
|
|
||||||
desc = "[L]SP, Type Definitions",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>ff",
|
|
||||||
function()
|
|
||||||
local builtin = require "telescope.builtin"
|
|
||||||
builtin.find_files()
|
|
||||||
end,
|
|
||||||
desc = "Telescope: Find files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>b",
|
|
||||||
function()
|
|
||||||
local builtin = require "telescope.builtin"
|
|
||||||
builtin.buffers()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fg",
|
|
||||||
function()
|
|
||||||
local builtin = require "telescope.builtin"
|
|
||||||
builtin.live_grep()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
config = function()
|
|
||||||
local builtin = require "telescope.builtin"
|
|
||||||
local open_with_trouble = require("trouble.sources.telescope").open
|
|
||||||
|
|
||||||
-- Search with telescope and open with trouble
|
|
||||||
local telescope = require "telescope"
|
|
||||||
telescope.setup {
|
|
||||||
pickers = {
|
|
||||||
buffers = {
|
|
||||||
initial_mode = "normal"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
defaults = {
|
|
||||||
mappings = {
|
|
||||||
i = { ["<c-a>"] = open_with_trouble, ["<c-d>"] = require('telescope.actions').delete_buffer },
|
|
||||||
n = { ["<c-a>"] = open_with_trouble, ["<c-d>"] = require('telescope.actions').delete_buffer },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require('telescope').load_extension('fzf')
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
build = ":TSUpdate",
|
|
||||||
config = function()
|
|
||||||
local configs = require "nvim-treesitter.configs"
|
|
||||||
|
|
||||||
configs.setup {
|
|
||||||
ensure_installed = {
|
|
||||||
"c",
|
|
||||||
"lua",
|
|
||||||
"vim",
|
|
||||||
"vimdoc",
|
|
||||||
"query",
|
|
||||||
"markdown",
|
|
||||||
"json",
|
|
||||||
"javascript",
|
|
||||||
"cpp",
|
|
||||||
"hlsl",
|
|
||||||
"jsdoc",
|
|
||||||
},
|
|
||||||
sync_install = false,
|
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,159 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"ficcdaf/ashen.nvim",
|
|
||||||
-- optional but recommended,
|
|
||||||
-- pin to the latest stable release:
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
-- configuration is optional!
|
|
||||||
opts = {
|
|
||||||
-- your settings here
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
vim.cmd [[ colorscheme ashen ]]
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"xero/miasma.nvim",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"miikanissi/modus-themes.nvim",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
enabled = false,
|
|
||||||
config = function()
|
|
||||||
require("modus-themes").setup({
|
|
||||||
line_nr_column_background = false,
|
|
||||||
variant = "tinted",
|
|
||||||
|
|
||||||
---@param highlight Highlights
|
|
||||||
---@param color ColorScheme
|
|
||||||
on_highlights = function(highlight, color)
|
|
||||||
highlight.WinSeparator = { fg = color.bg_main, bg = color.bg_main }
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.cmd [[ colorscheme modus ]]
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'nanozuki/tabby.nvim',
|
|
||||||
event = 'VimEnter', -- if you want lazy load, see below
|
|
||||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>tg",
|
|
||||||
":$tabnew<CR>",
|
|
||||||
desc = "Create a new tab"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>=",
|
|
||||||
":tabclose<CR>",
|
|
||||||
desc = "Close the current tab"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>[",
|
|
||||||
":tabprev<CR>",
|
|
||||||
desc = "Goto the previous tab"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>]",
|
|
||||||
":tabnext<CR>",
|
|
||||||
desc = "Goto the next tab"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>-",
|
|
||||||
":BufDel<CR>",
|
|
||||||
desc = "Close the current buffer"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("tabby").setup({
|
|
||||||
preset = "active_wins_at_tail",
|
|
||||||
option = {
|
|
||||||
nerdfont = false,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"akinsho/bufferline.nvim",
|
|
||||||
version = "*",
|
|
||||||
lazy = false,
|
|
||||||
enabled = false,
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons", "datsfilipe/vesper.nvim" },
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>[",
|
|
||||||
":BufferLineCyclePrev<CR>",
|
|
||||||
desc = "Go back a buffer",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>]",
|
|
||||||
":BufferLineCycleNext<CR>",
|
|
||||||
desc = "Go to the next buffer",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>-",
|
|
||||||
":BufferLineCloseLeft<CR>",
|
|
||||||
desc = "Bufferline: Close left",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>+",
|
|
||||||
":BufferLineCloseOthers<CR>",
|
|
||||||
desc = "Bufferline: Close others",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>_",
|
|
||||||
":BufferLineCloseRight<CR>",
|
|
||||||
desc = "Bufferline: Close right",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>=",
|
|
||||||
":BufDel<CR>",
|
|
||||||
desc = "Close current buffer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
opts = {
|
|
||||||
diagnostics = "nvim_lsp",
|
|
||||||
separator_style = "thin",
|
|
||||||
|
|
||||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
|
||||||
local icon = level:match "error" and " " or " "
|
|
||||||
return " " .. icon .. count
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
require("bufferline").setup {
|
|
||||||
options = opts,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ojroques/nvim-bufdel",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
|
||||||
branch = "v3.x",
|
|
||||||
enabled = false,
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
-- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
|
|
||||||
},
|
|
||||||
lazy = false, -- neo-tree will lazily load itself
|
|
||||||
---@module "neo-tree"
|
|
||||||
---@type neotree.Config?
|
|
||||||
opts = {
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<leader>tt", ":Neotree toggle<CR>" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
20
lua/want-lazy.lua
Normal file
20
lua/want-lazy.lua
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
-- Bootstrap lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||||
|
-- loading lazy.nvim so that mappings are correct.
|
||||||
|
-- This is also a good place to setup other settings (vim.opt)
|
Loading…
Add table
Add a link
Reference in a new issue