Compare commits

...

60 Commits

Author SHA1 Message Date
364c2d97f5 from-scratch rewrite (#1)
Reviewed-on: #1
2025-06-26 08:53:33 +02:00
cc39bf4e49 wip 2025-05-02 20:23:05 +02:00
ba2f583baa wip 2025-05-02 20:21:53 +02:00
375b181380 update 2024-09-30 09:49:59 +02:00
5d54b1f0cc Merge branch 'master' of https://gitea.brudi.xyz/kenobi/dotfiles 2024-09-30 09:47:36 +02:00
a335ba116e update prod 2024-09-30 09:45:40 +02:00
3c54c786f3 add neotest-rust 2024-02-28 22:37:08 +01:00
e9f69e6452 update lock 2023-12-22 16:50:52 +01:00
6ffbfb206b Merge branch 'master' of https://gitea.brudi.xyz/kenobi/dotfiles 2023-12-22 16:46:23 +01:00
8affa384df vscode dap 2023-12-22 16:43:52 +01:00
3569e81a4f lockfile 2023-12-22 16:43:40 +01:00
fae426a839 lvim extras 2023-12-22 16:43:34 +01:00
0ad7c21f5a neotree changes 2023-12-22 16:43:22 +01:00
2a9f4d7e62 illuminate config 2023-12-21 16:24:18 +01:00
cffa798a1d enable inlay hints 2023-12-21 16:24:12 +01:00
22eabac158 add testing 2023-12-21 16:24:05 +01:00
9f1068464a add nvim surround 2023-12-13 15:18:48 +01:00
05a700b9b0 add lazyvim extras 2023-12-13 15:18:40 +01:00
f0f3c7df69 don't hide quotes in json 2023-12-13 15:17:37 +01:00
cf8bf9bbe1 Merge branch 'master' of https://gitea.brudi.xyz/kenobi/dotfiles 2023-09-01 21:14:01 +02:00
2bd1c898eb lock 2023-09-01 21:13:40 +02:00
53a28e6af7 lock 2023-08-23 09:39:17 +02:00
478f7f8114 lokc 2023-08-23 09:38:54 +02:00
19f43c38b1 fugitive 2023-08-23 09:38:52 +02:00
12132d2bf3 dap + keymaps 2023-08-23 09:38:47 +02:00
276684e498 disable virtual text 2023-08-23 09:38:41 +02:00
6884cc05df add title setting 2023-08-10 18:12:00 +02:00
07f5a7a313 update lockfile? 2023-08-09 17:48:05 +02:00
3ccd081136 add catppuccin 2023-08-09 17:47:58 +02:00
33ca9669de lazyvim 2023-08-09 13:51:17 +02:00
a7a6f01464 load configs 2023-07-26 11:00:07 +02:00
c1d9ac83d1 pin fidget 2023-07-26 11:00:01 +02:00
e32ba63a54 add jester 2023-07-26 10:59:49 +02:00
a337f01534 add autopairs config 2023-07-26 10:59:35 +02:00
044229a056 add vim-illuminate remove brightest 2023-07-26 10:59:06 +02:00
8b1abcfda9 Merge branch 'master' of https://gitea.brudi.xyz/kenobi/dotfiles 2023-06-01 13:01:43 +02:00
58fbb0a0a0 nvim tree to the right 2023-06-01 12:59:57 +02:00
9c6fb0b1d1 remove ty lsp, vstls 2023-06-01 12:59:42 +02:00
504efd4db4 html lsp 2023-05-30 10:01:29 +02:00
e9b7e23beb nvimtree sync root 2023-05-05 09:57:33 +02:00
20a47de3e5 reorder cmp sources 2023-05-05 00:00:20 +02:00
306cd7b3e3 add brightest
a package to hightlight the currently selected word in other lines
2023-05-05 00:00:10 +02:00
03108f0e41 compile 2023-04-20 17:14:45 +02:00
b5ba99fd76 node2 -> node 2023-04-20 17:14:39 +02:00
3b8c2512c8 remove neotest nvim 2023-04-20 17:14:25 +02:00
bff6f8ae18 update lsp and color 2023-04-20 17:13:36 +02:00
2845e0c638 native commands 2023-04-15 15:37:07 +02:00
f5378b619b various debug keymap changes 2023-04-15 15:36:44 +02:00
16e2ddfe94 tree change 2023-04-15 15:36:10 +02:00
e668107e6e remove nvimtest 2023-04-15 15:36:02 +02:00
aa9c5b3d6c remove old plugins 2023-04-15 15:35:40 +02:00
942f00c0d1 packer compiled 2023-04-11 13:34:59 +02:00
808f5a05dc dap 2023-04-11 13:34:51 +02:00
cf7e6e2aea telescope 2023-04-11 13:34:37 +02:00
31bff1d28f html lsp 2023-04-11 13:34:26 +02:00
61292478ba tree 2023-04-11 13:34:09 +02:00
79c2761a9b color and plugins for dap 2023-04-11 13:33:49 +02:00
3179c6444f adjust cmp sources 2023-03-22 14:41:35 +01:00
53bd5732d5 Merge branch 'master' of https://gitea.brudi.xyz/kenobi/dotfiles 2023-03-17 21:41:15 +01:00
4a2657faff lsp swagger etc 2023-03-17 21:38:07 +01:00
62 changed files with 1476 additions and 1655 deletions

3
nvim/.editorconfig Normal file
View File

@ -0,0 +1,3 @@
[*]
indent_size=2
indent_style=space

8
nvim/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data

View File

@ -1,8 +0,0 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhistcnt =6
let g:netrw_dirhist_6='/home/markus/.vim'
let g:netrw_dirhist_5='/home/markus/dev/typescript/node-pos-erp-mapper/server/components/sap/fi'
let g:netrw_dirhist_4='/home/markus/dev/typescript/node-pos-erp-mapper/server/components/sap'
let g:netrw_dirhist_3='/home/markus/dev/typescript/node-pos-erp-mapper/server/components'
let g:netrw_dirhist_2='/home/markus/dev/typescript/node-pos-erp-mapper/server'
let g:netrw_dirhist_1='/home/markus/dev/typescript/node-pos-erp-mapper'

View File

@ -1,22 +1,3 @@
vim.g.mapleader = " " require("config.lazy")
require('keymap')
require('plugins')
require('globals_opts')
require('native_commands')
require('nvim-lightbulb_config')
require('nvimtree')
require('treesitter_config')
require('dap_config')
require('mason_config')
require('new_lsp_conf')
require('cmp_config')
require('toggleterm_config')
require('virtual_lines_config')
require("null-ls_config")
require("telescope_config")
require("nvimtest_config")
require("neotest_config")
require("trouble_config")
require("symbols_outline")
require("luasnip_config")
require("todotxt_config")

View File

@ -1,141 +0,0 @@
set runtimepath^=/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
"syntax on
set modelines=0
set hidden
set number
set ruler
set visualbell
set textwidth=120
set cursorline
hi CursorLine term=bold cterm=bold ctermbg=darkgrey
set tabstop=2
set softtabstop=2
set expandtab
set shiftwidth=2
set matchpairs+=<:>
set showmode
set showcmd
set showmatch
set hlsearch
set ignorecase
set smartcase
set incsearch
set wrapscan
set scrolloff=999
set backspace=indent,eol,start
set mouse=nicr
set termguicolors
call plug#begin(stdpath('data') . '/plugged')
Plug 'williamboman/mason.nvim'
Plug 'williamboman/mason-lspconfig.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'junegunn/vim-easy-align'
Plug 'morhetz/gruvbox'
Plug 'junegunn/fzf', {'do': {->fzf#install()}}
Plug 'junegunn/fzf.vim'
Plug 'gfanto/fzf-lsp.nvim'
Plug 'nvim-lua/lsp-status.nvim'
Plug 'jiangmiao/auto-pairs'
Plug 'machakann/vim-sandwich'
Plug 'machakann/vim-highlightedyank'
Plug 'bling/vim-airline'
Plug 'airblade/vim-gitgutter'
Plug 'rhysd/vim-clang-format'
Plug 'easymotion/vim-easymotion'
Plug 'neovim/nvim-lspconfig'
Plug 'kosayoda/nvim-lightbulb'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/cmp-cmdline'
Plug 'hrsh7th/nvim-cmp'
Plug 'saadparwaiz1/cmp_luasnip'
Plug 'L3MON4D3/LuaSnip'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'kyazdani42/nvim-tree.lua'
Plug 'tpope/vim-fugitive'
Plug 'mfussenegger/nvim-dap'
Plug 'David-Kunz/jester'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'waycrate/swhkd-vim'
Plug 'kmonad/kmonad-vim'
Plug 'nvim-lua/plenary.nvim'
Plug 'akinsho/toggleterm.nvim', {'tag' : 'v2.*'}
Plug 'https://git.sr.ht/~whynothugo/lsp_lines.nvim'
Plug 'MunifTanjim/nui.nvim'
Plug 'arnarg/todotxt.nvim'
call plug#end()
autocmd vimenter * colorscheme gruvbox
autocmd BufEnter *.60 :setlocal filetype=sixtyfps
let g:clang_format#auto_format=0
set completeopt=menuone,noselect
highlight NvimTreeFolderIcon guibg=blue
lua require('cmp_config')
lua require('nvimtree')
lua require('lsp_conf')
lua require('treesitter_config')
lua require('dap_config')
lua require('jester')
lua require('mason_config')
lua require('toggleterm_config')
lua require('virtual_lines_config')
lua require('todotxt_config')
"Leader
nnoremap <SPACE> <Nop>
let mapleader=" "
"mappings
map <leader>h :set cursorline!<CR>
"map <leader>c :!yarn copy-start<CR>
"map <leader>b :!yarn build<CR>
"map <leader>bs :!yarn build-start<CR>
nnoremap <C-n> :NvimTreeToggle<CR>
nnoremap <leader>r :NvimTreeRefresh<CR>
nnoremap <leader>n :NvimTreeFindFile<CR>
" NvimTreeOpen, NvimTreeClose, NvimTreeFocus, NvimTreeFindFileToggle, and NvimTreeResize are also available if you need them
xnoremap p "_dP
nnoremap <esc><esc> :noh<return><esc>
map <leader>f :FZF<CR>
map <leader>F :Rg<CR>
nnoremap <leader>ca <cmd>lua vim.lsp.buf.code_action()<cr>
nnoremap <leader>gd <cmd>lua vim.lsp.buf.definition()<cr>
nnoremap <leader>gD <cmd>lua vim.lsp.buf.declaration()<cr>
nnoremap <leader>gr <cmd>lua vim.lsp.buf.references()<cr>
nnoremap <leader>rn <cmd>lua vim.lsp.buf.rename()<cr>
nnoremap <leader>K <cmd>lua vim.lsp.buf.hover()<cr>
nnoremap <leader>b :Buffers<cr>
nnoremap <C-L> :bnext<CR>
nnoremap <C-H> :bprevious<CR>
nnoremap <leader>J <cmd>lua vim.diagnostic.open_float()<cr>
nnoremap <M-F> <cmd>lua vim.lsp.buf.format({async = true})<cr>
inoremap <c-s> <cmd>lua vim.lsp.buf.signature_help()<cr>
nnoremap <F9> <cmd>lua require'dap'.toggle_breakpoint()<cr>
nnoremap <F5> <cmd>lua require'dap'.continue()<cr>
nnoremap <F10> <cmd>lua require'dap'.step_over()<cr>
nnoremap <F11> <cmd>lua require'dap'.step_into()<cr>
tnoremap <Esc><Esc> <C-\><C-n>
nnoremap <leader>td :ToDoTxtTasksToggle<cr>
autocmd BufWritePre *.ts lua vim.lsp.buf.formatting_sync(nil, 1000)
command JestRun :lua require'jester'.run({cmd = "npm run test -t '$result' -- $file"})
command JestRunFile :lua require'jester'.run_file({cmd = "npm run test -t '$result' -- $file"})
command JestRunLast :lua require'jester'.run_last({cmd = "npm run test -t '$result' -- $file"})
command JestDebug :lua require'jester'.debug({cmd = "npm run test -t '$result' -- $file"})
command JestDebugFile :lua require'jester'.debug_file({cmd = "npm run test -t '$result' -- $file"})
command JestDebugLast :lua require'jester'.debug_last({cmd = "npm run test -t '$result' -- $file"})

46
nvim/lazy-lock.json Normal file
View File

@ -0,0 +1,46 @@
{
"blink.cmp": { "branch": "main", "commit": "9bcb14b43852a6f2bfd5ac9ef29cb5cf09b1b39b" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" },
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"fzf-lua": { "branch": "main", "commit": "05eaee319fcf2f5a0d378c2848641858c8b8962e" },
"git-blame.nvim": { "branch": "master", "commit": "8503b199edf9a666fe7b1a989cf14e3c26b2eb03" },
"gitsigns.nvim": { "branch": "main", "commit": "88205953bd748322b49b26e1dfb0389932520dc9" },
"json-to-types.nvim": { "branch": "main", "commit": "e8dcc6ac710c59fcac354255a835f72916171ba8" },
"kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "f54e3c11fc9ebfcfc27e696182b0295b071d0811" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
"mini.icons": { "branch": "main", "commit": "94848dad1589a199f876539bd79befb0c5e3abf0" },
"mini.nvim": { "branch": "main", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" },
"mini.statusline": { "branch": "main", "commit": "452d27d764720cddcb9909b786598bb9e80c1ce8" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-dap": { "branch": "master", "commit": "2edd6375692d9ac1053d50acfe415c1eb2ba92d0" },
"nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" },
"nvim-lspconfig": { "branch": "master", "commit": "314b35335cc84bc2a085c84c69da955ba22da163" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-context": { "branch": "master", "commit": "1a1a7c5d6d75cb49bf64049dafab15ebe294a79f" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" },
"nvim-vtsls": { "branch": "main", "commit": "60b493e641d3674c030c660cabe7a2a3f7a914be" },
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
"oil.nvim": { "branch": "master", "commit": "08c2bce8b00fd780fb7999dbffdf7cd174e896fb" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" },
"rustaceanvim": { "branch": "master", "commit": "b554761a920d807c3a7e8388d0dd34205ae4fd0d" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"vim-helm": { "branch": "master", "commit": "cc5ac22444332381f38084a6c7f023c25eef6201" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
}

View File

@ -1,84 +0,0 @@
local cmp = require("cmp")
local luasnip = require("luasnip")
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
cmp.setup({
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = {
['<C-k>'] = cmp.mapping.select_prev_item(),
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-j>'] = cmp.mapping.select_next_item(),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-d>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
['<C-e>'] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
}),
['<CR>'] = cmp.mapping.confirm({ select = true }),
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" })
},
sources = cmp.config.sources({
{ name = 'path' },
{ name = 'nvim_lsp' },
{ name = 'nvim_lsp_signature_help' },
{ name = 'nvim_lua' },
{ name = 'buffer' },
{ name = 'luasnip' }, -- For luasnip users.
}),
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
formatting = {
fields = { 'menu', 'abbr', 'kind' },
format = function(entry, item)
local menu_icon = {
nvim_lsp = 'λ',
buffer = 'Ω'
}
item.menu = menu_icon[entry.source.name]
return item
end
}
})
cmp.setup.cmdline('/', {
sources = {
{ name = 'buffer' }
}
})
cmp.setup.cmdline(':', {
sources = cmp.config.sources({
{ name = 'path' }
}, { { name = 'cmdline' } })
})

View File

@ -0,0 +1,2 @@
vim.keymap.set("n", "-", "<cmd>Oil --float<cr>", {desc="Open Parent Dir in Oil"})
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<cr>", {desc="Open Lazy"})

39
nvim/lua/config/lazy.lua Normal file
View File

@ -0,0 +1,39 @@
-- 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.options")
-- 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 = { "kanagawa" } },
-- automatically check for plugin updates
checker = { enabled = true },
})
require("config.keymap")

136
nvim/lua/config/options.lua Normal file
View File

@ -0,0 +1,136 @@
vim.o.fillchars = 'eob: ,fold: ,foldopen:,foldsep: ,foldclose:'
vim.o.foldcolumn = '1'
vim.o.foldenable = true
vim.o.foldexpr = 'v:lua.vim.lsp.foldexpr()'
vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
vim.o.foldmethod = 'expr'
vim.opt.langmap = "+]ü["
vim.keymap.set("n", "ü", "[", { remap = true })
vim.opt.expandtab = true
vim.opt.shiftwidth = 4
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.smarttab = true
vim.opt.smartindent = true
vim.opt.autoindent = true
-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false
-- Make line numbers default
vim.opt.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
vim.opt.relativenumber = true
-- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = 'a'
-- Don't show the mode, since it's already in the status line
vim.opt.showmode = false
-- Sync clipboard between OS and Neovim.
-- Schedule the setting after `UiEnter` because it can increase startup-time.
-- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'`
vim.schedule(function()
vim.opt.clipboard = 'unnamedplus'
end)
-- Enable break indent
vim.opt.breakindent = true
-- Save undo history
vim.opt.undofile = true
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- Keep signcolumn on by default
vim.opt.signcolumn = 'yes'
-- Decrease update time
vim.opt.updatetime = 250
-- Decrease mapped sequence wait time
vim.opt.timeoutlen = 300
-- Configure how new splits should be opened
vim.opt.splitright = true
vim.opt.splitbelow = true
-- Sets how neovim will display certain whitespace characters in the editor.
-- See `:help 'list'`
-- and `:help 'listchars'`
vim.opt.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
-- Preview substitutions live, as you type!
vim.opt.inccommand = 'split'
-- Show which line your cursor is on
vim.opt.cursorline = true
vim.opt.cursorcolumn = false
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 20
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
-- instead raise a dialog asking if you wish to save the current file(s)
-- See `:help 'confirm'`
vim.opt.confirm = true
vim.opt.title = true
vim.opt.conceallevel = 0
vim.diagnostic.config({ virtual_text = true })
-- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()`
-- Clear highlights on search when pressing <Esc> in normal mode
-- See `:help hlsearch`
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostic keymaps
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
-- is not what someone will guess without a bit more experience.
--
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
-- or just use <C-\><C-n> to exit terminal mode
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
-- TIP: Disable arrow keys in normal mode
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows
--
-- See `:help wincmd` for a list of all window commands
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()`
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})

View File

@ -1,70 +0,0 @@
vim.fn.sign_define('DapBreakpoint', {text='🟥', texthl='', linehl='', numhl=''})
vim.fn.sign_define('DapStopped', {text='⭐️', texthl='', linehl='', numhl=''})
local dap = require('dap')
local M ={}
local DEBUGGER_PATH = {os.getenv('HOME')..'/.local/share/nvim/mason/packages/js-debug-adapter'}
function M.setup()
dap.adapters.lldb = {
type = 'executable',
command = '/usr/bin/lldb-vscode',
name = 'lldb'
}
dap.configurations.cpp = {
{
name = 'Launch',
type = 'lldb',
request = 'launch',
program = function()
return vim.fn.input('Path to executable: ',vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
args = {}
}
}
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp
require('dap-vscode-js').setup {
node_path = "node",
debugger_path = DEBUGGER_PATH,
adapters = {"pwa-node","pwa-chrome","pwa-msedge","node-terminal", "pwa-extensionHost"}
}
for _, language in ipairs {"typescript", "javascript"} do
dap.configurations[language] ={{
type = "pwa-node",
request = "launch",
name = "Launch File",
program = "${file}",
cwd = "${workspacefolder}"
},
{
type = "pwa-node",
request = "attach",
name = "Attach",
processId = require("dap.utils").pick_process,
cwd = "${workspacefolder}"
},
{
type = "pwa-node",
request = "launch",
name = "Debug Jest Tests",
runtimeExecutable = "node",
runtimeArgs = {
"./node_modules/jest/bin/jestj",
"--runInBand",
},
rootPath = "${workspaceFolder}",
console = "integratedTerminal",
internalConsoleOptions = "neverOpen",
cwd = "${workspacefolder}"
}}
end
end
M.setup()
return M

View File

@ -1,51 +0,0 @@
local dap = require('dap')
local function debugJest(testName, filename)
print("starting " .. testName .. " in " .. filename)
dap.run({
type = 'node2',
request = 'launch',
cwd = vim.fn.getcwd(),
runtimeArgs = {'--inspect-brk', '/usr/local/bin/jest', '--no-coverage', '-t', testName, '--', filename},
sourceMaps = true,
protocol = 'inspector',
skipFiles = {'<node_internals>/**/*.js'},
console = 'integratedTerminal',
port = 9229,
})
end
local function attach()
print("attaching")
dap.run({
type = 'node2',
request = 'attach',
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = 'inspector',
skipFiles = {'<node_internals>/**/*.js'},
})
end
local function attachToRemote()
print("attaching")
dap.run({
type = 'node2',
request = 'attach',
address = "127.0.0.1",
port = 9229,
localRoot = vim.fn.getcwd(),
remoteRoot = "/home/vcap/app",
sourceMaps = true,
protocol = 'inspector',
skipFiles = {'<node_internals>/**/*.js'},
})
end
return {
debugJest = debugJest,
attach = attach,
attachToRemote = attachToRemote,
}

View File

@ -1,27 +0,0 @@
local set = vim.opt
set.title = true
set.modelines = 0
set.hidden = true
set.number = true
set.ruler = true
set.visualbell = true
set.textwidth = 120
set.cursorline = true
set.tabstop = 2
set.shiftwidth = 2
set.showmode = true
set.showcmd = true
set.showmatch = true
set.hlsearch = true
set.ignorecase = true
set.smartcase = true
set.incsearch = true
set.wrapscan = true
set.scrolloff = 999
set.backspace = "indent,eol,start"
set.mouse = "nicr"
set.termguicolors = true
set.matchpairs:append("<:>")
set.completeopt = "menuone,noselect,preview"
set.expandtab = true
set.relativenumber = true

View File

@ -1,22 +0,0 @@
require'jester'.setup({
cmd = "yarn run test -t '$result' -- $file", -- run command
identifiers = {"test", "it"}, -- used to identify tests
prepend = {"describe"}, -- prepend describe blocks
expressions = {"call_expression"}, -- tree-sitter object used to scan for tests/describe blocks
path_to_jest_run = './node_modules/jest/bin/jest', -- used to run tests
path_to_jest_debug = './node_modules/jest/bin/jest', -- used for debugging
terminal_cmd = ":vsplit | terminal", -- used to spawn a terminal for running tests, for debugging refer to nvim-dap's config
dap = { -- debug adapter configuration
type = 'node2',
request = 'launch',
cwd = vim.fn.getcwd(),
runtimeArgs = {'--inspect-brk', '$path_to_jest', '--no-coverage', '-t', '$result', '--', '$file'},
args = { '--no-cache' },
sourceMaps = 'inline',
protocol = 'inspector',
skipFiles = {'<node_internals>/**/*.js'},
console = 'integratedTerminal',
port = 9229,
disableOptimisticBPs = true
}
})

View File

@ -1,54 +0,0 @@
function map(mode, shortcut, command)
vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true })
end
function nmap(shortcut, command)
map('n', shortcut, command)
end
function imap(shortcut, command)
map('i', shortcut, command)
end
function vmap(shortcut, command)
map('v', shortcut, command)
end
function xmap(shortcut, command)
map('x', shortcut, command)
end
nmap("<SPACE>","<Nop>")
nmap("<Esc><Esc>", ":noh<cr>")
nmap("<C-f>",":ToggleTerm direction=float<cr>")
imap("<C-f>",":ToggleTerm direction=float<cr>")
nmap("<C-l>",":ToggleTerm direction=horizontal size=10<cr>")
imap("<C-l>",":ToggleTerm direction=horizontal size=10<cr>")
xmap("p",'\"_dP')
nmap("<leader>fg", "<cmd>lua require('telescope.builtin').live_grep()<cr>")
nmap("<leader>fb", "<cmd>lua require('telescope.builtin').buffers()<cr>")
nmap("<leader>fh", "<cmd>lua require('telescope.builtin').help_tags()<cr>")
nmap("<leader>ff", "<cmd>lua require('telescope.builtin').find_files()<cr>")
nmap("<leader>vb", "<cmd>lua require('telescope.builtin').git_branches()<cr>")
nmap("<leader>b","<cmd>lua require('telescope.builtin').buffers()<cr>")
nmap("<C-n>",":NvimTreeToggle<cr>")
nmap("<leader>r",":NvimTreeRefresh<cr>")
nmap("<leader>n",":NvimTreeToggle<cr>")
nmap("<leader>zn","zf%")
nmap("<leader>y",'\"+y')
vmap("<leader>y",'\"+y')
nmap("<F5>",":lua require'dap'.continue()<CR>")
nmap("<F10>",":lua require'dap'.step_over()<CR>")
nmap("<F11>",":lua require'dap'.step_into()<CR>")
nmap("<F12>",":lua require'dap'.step_out()<CR>")
nmap("<leader>B",":lua require'dap'.toggle_breakpoint()<CR>")
nmap("<leader>Bc",":lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))<CR>")
nmap("<leader>lp",":lua require'dap'.set_breakpoint(nil,nil,vim.fn.input('Log point message: '))<CR>")
nmap("<leader>lp",":lua require'dap'.repl.open()<CR>")

View File

@ -1,35 +0,0 @@
local capabilites = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
require'lspconfig'.tsserver.setup{
capabilites = capabilites
}
require'lspconfig'.jsonls.setup{
capabilites = capabilites
}
require'lspconfig'.dockerls.setup{
capabilites = capabilites
}
require'lspconfig'.eslint.setup{
capabilites = capabilites,
settings= {
run = "onSave"
}
}
require'lspconfig'.gdscript.setup{
capabilites = capabilites
}
require'lspconfig'.gopls.setup{
capabilites = capabilites
}
require'lspconfig'.rust_analyzer.setup{
capabilites = capabilites
}
require'lspconfig'.cssls.setup{
capabilites = capabilites
}
require'lspconfig'.bashls.setup{
capabilites = capabilites
}
require'fzf_lsp'.setup()

View File

@ -1 +0,0 @@
require("luasnip.loaders.from_vscode").lazy_load()

View File

@ -1,24 +0,0 @@
require('mason').setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
}
})
require('mason-lspconfig').setup({
ensure_installed = {"tsserver"}
})
require'mason-tool-installer'.setup {
ensure_installed = {
{ 'bash-language-server', auto_update = true },
'lua-language-server',
'vim-language-server',
'stylua',
},
auto_update = false,
run_on_start = true,
start_delay = 3000
}

View File

@ -1,11 +0,0 @@
vim.cmd('hi CursorLine term=bold cterm=bold ctermbg=darkgrey')
--vim.cmd[[colorscheme tokyonight]]
vim.cmd[[set termguicolors]]
--vim.cmd[[let ayucolor = "light"]]
--vim.cmd[[colorscheme ayu]]
vim.cmd[[set background=light]]
vim.cmd[[colorscheme gruvbox]]
vim.cmd([[
runtime macros/sandwich/keymap/surround.vim
]])

View File

@ -1,19 +0,0 @@
require("neotest").setup({
adapters = {
require("neotest-jest")({
jestCommand = "npm test --",
jestConfigFile = "custom.jest.config.ts",
env = { CI = true },
cwd = function(path)
return vim.fn.getcwd()
end,
}),
require("neotest-python")({
dap = { justMyCode = false },
}),
require("neotest-plenary"),
require("neotest-vim-test")({
ignore_file_types = { "python", "vim", "lua" },
}),
},
})

View File

@ -1,124 +0,0 @@
-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', '<leader>gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', '<leader>K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', '<leader>gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<leader>k', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<leader>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, bufopts)
if vim.bo[bufnr].buftype ~= "" or vim.bo[bufnr].filetype == "helm" then
vim.diagnostic.disable()
end
end
local lsp_flags = {
-- This is the default in Nvim 0.7+
debounce_text_changes = 250,
}
local capabilities = require('cmp_nvim_lsp').default_capabilities(
vim.lsp.protocol.make_client_capabilities()
)
require('mason-lspconfig').setup_handlers {
function(server_name)
require('lspconfig')[server_name].setup {
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities
}
end,
['rust_analyzer'] = function()
local rustToolsOpts = {
tools = {
inlay_hints = {
auto = true,
only_current_line = true,
show_parameter_hints = false,
parameter_hints_prefix = "<-",
}
},
server = {
on_attach = on_attach,
capabilities = capabilities,
flags = lsp_flags,
settings = {
["rust_analyzer"] = {
checkOnSave = {
command = "clippy"
}
}
}
}
}
require('rust-tools').setup(rustToolsOpts)
--on_attach = on_attach,
--flags = lsp_flags,
require('lspconfig')['rust_analyzer'].setup {
on_attach = on_attach,
flags = lsp_flags,
-- server-specific settings...
settings = {
["rust-analyzer"] = {}
}
}
end,
['yamlls'] = function()
require('lspconfig')["yamlls"].setup {
on_attach = on_attach,
flags = lsp_flags,
settings = {
yaml = {
schemas = { kubernetes = "globPattern" },
}
}
}
end
-- ['sumneko_lua'] = function()
-- require('lspconfig')["sumneko_lua"].setup {
-- on_attach = on_attach,
-- flags = lsp_flags,
-- settings = {
-- Lua = {
-- diagnostics = {
-- globals = { "vim" }
-- }
-- }
-- }
-- }
-- end,
}
--require('lspconfig')['rust_analyzer'].setup {
-- on_attach = on_attach,
-- flags = lsp_flags,
-- -- Server-specific settings...
-- settings = {
-- ["rust-analyzer"] = {}
-- }
--}
require "fidget".setup {}

View File

@ -1,10 +0,0 @@
require("null-ls").setup({
sources = {
--require("null-ls").builtins.formatting.stylua,
-- require("null-ls").builtins.diagnostics.eslint,
-- require("null-ls").builtins.completion.spell,
require("null-ls").builtins.formatting.xmllint
},
})

View File

@ -1 +0,0 @@
require('nvim-lightbulb').setup({ autocmd = { enabled = true } })

View File

@ -1,39 +0,0 @@
require('nvim-test').setup {
run = true, -- run tests (using for debug)
commands_create = true, -- create commands (TestFile, TestLast, ...)
filename_modifier = ":.", -- modify filenames before tests run(:h filename-modifiers)
silent = false, -- less notifications
term = "terminal", -- a terminal to run ("terminal"|"toggleterm")
termOpts = {
direction = "vertical", -- terminal's direction ("horizontal"|"vertical"|"float")
width = 96, -- terminal's width (for vertical|float)
height = 24, -- terminal's height (for horizontal|float)
go_back = false, -- return focus to original window after executing
stopinsert = "auto", -- exit from insert mode (true|false|"auto")
keep_one = true, -- keep only one terminal for testing
},
runners = { -- setup tests runners
cs = "nvim-test.runners.dotnet",
go = "nvim-test.runners.go-test",
haskell = "nvim-test.runners.hspec",
javacriptreact = "nvim-test.runners.jest",
javascript = "nvim-test.runners.jest",
lua = "nvim-test.runners.busted",
python = "nvim-test.runners.pytest",
ruby = "nvim-test.runners.rspec",
rust = "nvim-test.runners.cargo-test",
typescript = "nvim-test.runners.jest",
typescriptreact = "nvim-test.runners.jest",
}
}
require('nvim-test.runners.jest'):setup {
command = "jest", -- a command to run the test runner
args = { "--collectCoverage=false" }, -- default arguments
env = { CUSTOM_VAR = 'value' }, -- custom environment variables
file_pattern = "\\v(__tests__/.*|(spec|test))\\.(js|jsx|coffee|ts|tsx)$", -- determine whether a file is a testfile
find_files = { "{name}.test.{ext}", "{name}.spec.{ext}" }, -- find testfile for a file
filename_modifier = nil, -- modify filename before tests run (:h filename-modifiers)
working_directory = nil, -- set working directory (cwd by default)
}

View File

@ -1,123 +0,0 @@
require 'nvim-tree'.setup {
renderer = {
icons = {
padding = ' ',
symlink_arrow = ' >> ',
show = {
git = true,
folder = true,
file = true,
folder_arrow = false
},
glyphs = {
default = "",
symlink = "",
git = {
unstaged = "",
staged = "",
unmerged = "",
renamed = "",
untracked = "",
deleted = "",
ignored = ""
},
folder = {
arrow_open = "",
arrow_closed = "",
default = "",
open = "",
empty = "",
empty_open = "",
symlink = "",
symlink_open = "",
}
},
},
add_trailing = true,
highlight_opened_files = "all",
root_folder_modifier = ':~',
special_files = {
'README.md',
'Makefile',
'MAKEFILE'
},
highlight_git = true,
indent_markers = {
enable = true,
icons = {
corner = "",
edge = "",
none = " ",
}
}
},
respect_buf_cwd = true,
disable_netrw = true,
hijack_netrw = true,
ignore_ft_on_setup = {},
open_on_tab = false,
hijack_cursor = true,
auto_reload_on_write = true,
hijack_unnamed_buffer_when_opening = true,
diagnostics = {
enable = true,
icons = {
hint = "",
info = "",
warning = "",
error = "",
}
},
update_focused_file = {
enable = true,
update_cwd = true,
ignore_list = {}
},
system_open = {
cmd = nil,
args = {}
},
filters = {
dotfiles = false,
custom = {}
},
git = {
ignore = false,
enable = true,
timeout = 500,
},
actions = {
open_file = {
resize_window = false,
window_picker = {
exclude = {
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile", "terminal", "help" }
}
}
}
},
view = {
width = 35,
hide_root_folder = false,
side = 'left',
mappings = {
custom_only = false,
list = {}
}
}
}
local function open_nvim_tree(data)
local directory = vim.fn.isdirectory(data.file) == 1
if not directory then
return
end
vim.cmd.enew()
vim.cmd.bw(data.buf)
vim.cmd.cd(data.file)
require('nvim-tree.api').tree.open()
end
vim.api.nvim_create_autocmd({ 'VimEnter' }, { callback = open_nvim_tree })

View File

@ -1,119 +0,0 @@
require("packer").startup(function(use)
use("wbthomason/packer.nvim")
use({
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig",
"WhoIsSethDaniel/mason-tool-installer.nvim",
})
use { "mfussenegger/nvim-dap",
requires = {
"theHamsta/nvim-dap-virtual-text",
"rcarriga/nvim-dap-ui",
"mfussenegger/nvim-dap-python",
"nvim-telescope/telescope-dap.nvim",
{ "jbyuki/one-small-step-for-vimkind", module = "osv" },
"mxsdev/nvim-dap-vscode-js",
}
}
use("jose-elias-alvarez/null-ls.nvim")
use({
"nvim-telescope/telescope.nvim",
tag = "0.1.0",
requires = { { "nvim-lua/plenary.nvim" } },
})
use("nvim-lua/lsp-status.nvim")
--use("jiangmiao/auto-pairs")
use("machakann/vim-sandwich")
use("machakann/vim-highlightedyank")
use("bling/vim-airline")
use("airblade/vim-gitgutter")
use("easymotion/vim-easymotion")
use({
"antoinemadec/FixCursorHold.nvim",
"kosayoda/nvim-lightbulb",
})
use("hrsh7th/cmp-nvim-lsp")
use("hrsh7th/cmp-nvim-lsp-signature-help")
use("hrsh7th/cmp-nvim-lua")
use("hrsh7th/cmp-buffer")
use("hrsh7th/cmp-path")
use("hrsh7th/cmp-vsnip")
use("hrsh7th/vim-vsnip")
use("hrsh7th/nvim-cmp")
use("hrsh7th/cmp-cmdline")
use("saadparwaiz1/cmp_luasnip")
use("L3MON4D3/LuaSnip")
use("rafamadriz/friendly-snippets")
use("kyazdani42/nvim-web-devicons")
use("kyazdani42/nvim-tree.lua")
use("tpope/vim-fugitive")
use("shumphrey/fugitive-gitlab.vim")
use({
"nvim-treesitter/nvim-treesitter",
run = function()
require("nvim-treesitter.install").update({ with_sync = true })
end,
})
use("ayu-theme/ayu-vim")
use("morhetz/gruvbox")
use("simrat39/rust-tools.nvim")
use({
"akinsho/toggleterm.nvim",
tag = "v2.*",
config = function()
require("toggleterm").setup()
end,
})
use("https://git.sr.ht/~whynothugo/lsp_lines.nvim")
--use 'morhetz/gruvbox'
use({
"folke/which-key.nvim",
config = function()
require("which-key").setup({})
end,
})
use("gbrlsnchs/telescope-lsp-handlers.nvim")
use({
"klen/nvim-test",
config = function()
require("nvim-test").setup()
end,
})
use({
"nvim-neotest/neotest",
requires = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim",
"haydenmeade/neotest-jest",
"nvim-neotest/neotest-python",
"nvim-neotest/neotest-plenary",
"nvim-neotest/neotest-vim-test",
},
})
use({
"MunifTanjim/prettier.nvim",
requires = {
"jose-elias-alvarez/null-ls.nvim",
"neovim/nvim-lspconfig",
},
})
use {
"folke/trouble.nvim",
requires = "kyazdani42/nvim-web-devicons"
}
use {
'kkoomen/vim-doge',
run = ':call doge#install()'
}
use 'simrat39/symbols-outline.nvim'
use 'j-hui/fidget.nvim'
use {
'ThyW/todotxt.nvim',
branch = "vim-ui-input",
requires = { 'MunifTanjim/nui.nvim' },
}
use 'tpope/vim-surround'
use 'towolf/vim-helm'
end)

View File

@ -0,0 +1,54 @@
return {
"saghen/blink.cmp",
-- optional: provides snippets for the snippet source
dependencies = { "rafamadriz/friendly-snippets" },
-- use a release tag to download pre-built binaries
version = "1.*",
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
-- 'super-tab' for mappings similar to vscode (tab to accept)
-- 'enter' for enter to accept
-- 'none' for no mappings
--
-- All presets have the following mappings:
-- C-space: Open menu or open docs if already open
-- C-n/C-p or Up/Down: Select next/previous item
-- C-e: Hide menu
-- C-k: Toggle signature help (if signature.enabled = true)
--
-- See :h blink-cmp-config-keymap for defining your own keymap
keymap = { preset = "super-tab" },
appearance = {
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = "mono",
},
-- (Default) Only show the documentation popup when manually triggered
completion = { documentation = { auto_show = true, auto_show_delay_ms = 500 } },
-- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend`
sources = {
default = { "lsp", "path", "snippets", "buffer" },
},
signature = { enabled = true },
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
--
-- See the fuzzy documentation for more information
fuzzy = { implementation = "prefer_rust_with_warning" },
},
opts_extend = { "sources.default" },
}

View File

@ -0,0 +1,62 @@
return {
"akinsho/bufferline.nvim",
event = "VeryLazy",
keys = {
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle Pin" },
{
"<leader>bo",
function()
Snacks.bufdelete.other()
end,
desc = "Delete other buffers",
},
{
"<leader>bd",
function()
Snacks.bufdelete()
end,
desc = "Delete current buffer",
},
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete Non-Pinned Buffers" },
{ "<leader>br", "<Cmd>BufferLineCloseRight<CR>", desc = "Delete Buffers to the Right" },
{ "<leader>bl", "<Cmd>BufferLineCloseLeft<CR>", desc = "Delete Buffers to the Left" },
{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
{ "<S-l>", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
{ "[b", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
{ "]b", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
{ "[B", "<cmd>BufferLineMovePrev<cr>", desc = "Move buffer prev" },
{ "]B", "<cmd>BufferLineMoveNext<cr>", desc = "Move buffer next" },
},
opts = {
options = {
-- stylua: ignore
close_command = function(n) Snacks.bufdelete(n) end,
-- stylua: ignore
right_mouse_command = function(n) Snacks.bufdelete(n) end,
diagnostics = "nvim_lsp",
always_show_bufferline = true,
offsets = {
{
filetype = "neo-tree",
text = "Neo-tree",
highlight = "Directory",
text_align = "left",
},
{
filetype = "snacks_layout_box",
},
},
},
},
config = function(_, opts)
require("bufferline").setup(opts)
-- Fix bufferline when restoring a session
vim.api.nvim_create_autocmd({ "BufAdd", "BufDelete" }, {
callback = function()
vim.schedule(function()
pcall(nvim_bufferline)
end)
end,
})
end,
}

View File

@ -0,0 +1,29 @@
return {
"stevearc/conform.nvim",
keys = {
{
"<leader>cf",
function()
require("conform").format({ lsp_format = "fallback" })
end,
desc = "[C]ode [F]ormat",
},
},
opts = {
formatters_by_ft = {
lua = { "stylua" },
-- Conform will run multiple formatters sequentially
python = { "isort", "black" },
-- You can customize some of the format options for the filetype (:help conform.format)
rust = { "rustfmt" },
-- Conform will run the first available formatter
javascript = { "eslint_d", "prettierd", "prettier", stop_after_first = true },
typescript = { "eslint_d", "prettierd", "prettier", stop_after_first = true },
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_format = "fallback",
},
},
},
}

26
nvim/lua/plugins/dap.lua Normal file
View File

@ -0,0 +1,26 @@
return {
"mfussenegger/nvim-dap",
lazy = true,
dependencies = {
"rcarriga/nvim-dap-ui",
"nvim-neotest/nvim-nio",
"theHamsta/nvim-dap-virtual-text"
},
keys = {
{
"<leader>db",
function()
require("dap").toggle_breakpoint()
end,
},
{
"<leader>dc",
function()
require("dap").continue()
end,
},
},
config = function()
require("dapui").setup()
end,
}

View File

@ -0,0 +1,14 @@
return {
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
-- stylua: ignore
keys = {
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
},
}

View File

@ -0,0 +1,23 @@
return {
"ibhagwan/fzf-lua",
dependencies = { "echasnovski/mini.icons" },
opts = {
winopts={
height = 0.85,
width = 0.95,
}
},
keys = {
{ "<leader>ff", function() require('fzf-lua').files() end, desc="Find Files in current dir"},
{ "<leader>fb", function() require('fzf-lua').buffers() end, desc="Find open buffers"},
{ "<leader><leader>", function() require('fzf-lua').buffers() end, desc="Find open buffers"},
{ "<leader>fgf", function() require('fzf-lua').git_files() end, desc="Find git files"},
{ "<leader>fgb", function() require('fzf-lua').git_branches() end, desc="Find git branches"},
{ "<leader>fB", function() require('fzf-lua').builtin() end, desc="Find builtin finders"},
{ "<leader>fr", function() require('fzf-lua').resume() end, desc="Resume last search"},
{ "<leader>fG", function() require('fzf-lua').live_grep() end, desc="Grep files live"},
{ "<leader>fw", function() require('fzf-lua').grep_cword() end, desc="Grep current word"},
{ "<leader>fW", function() require('fzf-lua').grep_cWORD() end, desc="Grep current WORD"},
{ "<leader>/", function() require('fzf-lua').lgrep_curbuf() end, desc="Grep current buffer"},
}
}

View File

@ -0,0 +1,21 @@
return {
"f-person/git-blame.nvim",
-- load the plugin at startup
event = "VeryLazy",
-- Because of the keys part, you will be lazy loading this plugin.
-- The plugin will only load once one of the keys is used.
-- If you want to load the plugin at startup, add something like event = "VeryLazy",
-- or lazy = false. One of both options will work.
keys= {
{ "<leader>gb", "<Cmd>GitBlameToggle<CR>", desc = "Toggle Git Blame Line" },
},
opts = {
-- your configuration comes here
-- for example
enabled = false, -- if you want to enable the plugin
message_template = " <summary> • <date> • <author> • <<sha>>", -- template for the blame message, check the Message template section for more options
date_format = "%Y-%m-%d", -- template for the date, check Date format section for more options
virtual_text_column = 1, -- virtual text start column, check Start virtual text at column section for more options
},
}

View File

@ -0,0 +1,12 @@
return {
"lewis6991/gitsigns.nvim",
opts = {
signs = {
add = { text = "+" },
change = { text = "~" },
delete = { text = "_" },
topdelete = { text = "" },
changedelete = { text = "~" },
},
},
}

View File

@ -0,0 +1,17 @@
return {
"Redoxahmii/json-to-types.nvim",
build = "sh install.sh npm", -- Replace `npm` with your preferred package manager (e.g., yarn, pnpm).
ft = "json",
keys = {
{
"<leader>cU",
"<CMD>ConvertJSONtoLang typescript<CR>",
desc = "Convert JSON to TS",
},
{
"<leader>ct",
"<CMD>ConvertJSONtoLangBuffer typescript<CR>",
desc = "Convert JSON to TS Buffer",
},
},
}

View File

@ -0,0 +1,17 @@
return {
"rebelot/kanagawa.nvim",
config = function()
require('kanagawa').setup({
compile=true,
transparent=true,
background = {
dark = "wave",
light = "lotus"
},
});
vim.cmd("colorscheme kanagawa");
end,
build = function()
vim.cmd("KanagawaCompile");
end,
}

View File

@ -0,0 +1,12 @@
return {
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
},
},
}

272
nvim/lua/plugins/lsp.lua Normal file
View File

@ -0,0 +1,272 @@
return {
"neovim/nvim-lspconfig",
dependencies = {
{ "williamboman/mason.nvim", opts = {} },
"williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim",
"yioneko/nvim-vtsls",
opts = {
settings = {
typescript = {
inlayHints = {
parameterNames = { enabled = "literals" },
parameterTypes = { enabled = true },
variableTypes = { enabled = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enabled = true },
enumMemberValues = { enabled = true },
},
},
},
},
{ "j-hui/fidget.nvim", opts = {} },
"saghen/blink.cmp",
},
opts = {
inlay_hints = { enabled = true },
diagnostics = { virtual_text = true },
},
config = function()
inlay_hints = { enabled = true }
diagnostics = { virtual_text = true }
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
callback = function(event)
local map = function(keys, func, desc, mode)
mode = mode or "n"
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
end
-- Rename the variable under your cursor.
map("<leader>cr", vim.lsp.buf.rename, "([C]ode) [R]ename")
-- Execute a code action, usually your cursor needs to be on top of an error
-- or a suggestion from your LSP for this to activate.
map("<leader>ca", require("fzf-lua").lsp_code_actions, "[G]oto Code [A]ction", { "n", "x" })
map("<leader>cd", vim.diagnostic.open_float, "[C]ode [D]iagnostics in float")
map("<leader>gwd", require("fzf-lua").diagnostics_workspace, "[G]o [W]orkspace [D]iagnostics")
-- Find references for the word under your cursor.
map("gr", require("fzf-lua").lsp_references, "[G]oto [R]eferences")
-- Jump to the implementation of the word under your cursor.
map("<leader>gi", require("fzf-lua").lsp_implementations, "[G]oto [I]mplementation")
-- Jump to the definition of the word under your cursor.
-- This is where a variable was first declared, or where a function is defined, etc.
-- To jump back, press <C-t>.
map("gd", require("fzf-lua").lsp_definitions, "[G]oto [D]efinition")
-- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header.
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
-- Fuzzy find all the symbols in your current document.
map("<leader>gO", require("fzf-lua").lsp_document_symbols, "Open Document Symbols")
-- Fuzzy find all the symbols in your current workspace.
map("<leader>gW", require("fzf-lua").lsp_live_workspace_symbols, "Open Workspace Symbols")
-- Jump to the type of the word under your cursor.
map("<leader>gT", require("fzf-lua").lsp_typedefs, "[G]oto [T]ype Definition")
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
---@param client vim.lsp.Client
---@param method vim.lsp.protocol.Method
---@param bufnr? integer some lsp support methods only in specific files
---@return boolean
local function client_supports_method(client, method, bufnr)
if vim.fn.has("nvim-0.11") == 1 then
return client:supports_method(method, bufnr)
else
return client.supports_method(method, { bufnr = bufnr })
end
end
local client = vim.lsp.get_client_by_id(event.data.client_id)
if
client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf)
then
local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.document_highlight,
})
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.clear_references,
})
vim.api.nvim_create_autocmd("LspDetach", {
group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }),
callback = function(event2)
vim.lsp.buf.clear_references()
vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event2.buf })
end,
})
end
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then
map("<leader>th", function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf }))
end, "[T]oggle Inlay [H]ints")
end
end,
})
-- Diagnostic Config
-- See :help vim.diagnostic.Opts
vim.diagnostic.config({
severity_sort = true,
float = { border = "rounded", source = "if_many" },
underline = { severity = vim.diagnostic.severity.ERROR },
signs = {
text = {
[vim.diagnostic.severity.ERROR] = "󰅚 ",
[vim.diagnostic.severity.WARN] = "󰀪 ",
[vim.diagnostic.severity.INFO] = "󰋽 ",
[vim.diagnostic.severity.HINT] = "󰌶 ",
},
} or {},
virtual_text = {
source = "if_many",
spacing = 2,
format = function(diagnostic)
local diagnostic_message = {
[vim.diagnostic.severity.ERROR] = diagnostic.message,
[vim.diagnostic.severity.WARN] = diagnostic.message,
[vim.diagnostic.severity.INFO] = diagnostic.message,
[vim.diagnostic.severity.HINT] = diagnostic.message,
}
return diagnostic_message[diagnostic.severity]
end,
},
})
-- LSP servers and clients are able to communicate to each other what features they support.
-- By default, Neovim doesn't support everything that is in the LSP specification.
-- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities.
-- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
local capabilities = require("blink.cmp").get_lsp_capabilities()
-- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
--
-- Add any additional override configuration in the following tables. Available keys are:
-- - cmd (table): Override the default command used to start the server
-- - filetypes (table): Override the default list of associated filetypes for the server
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
-- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
-- https://github.com/pmizio/typescript-tools.nvim
--
-- But for many setups, the LSP (`ts_ls`) will work just fine
-- ts_ls = {},
--
rust_analyzer = {},
vtsls = {
-- explicitly add default filetypes, so that we can extend
-- them in related extras
filetypes = {
"javascript",
"javascriptreact",
"javascript.jsx",
"typescript",
"typescriptreact",
"typescript.tsx",
},
settings = {
typescript = {
updateImportsOnFileMove = { enabled = "always" },
inlayHints = {
parameterNames = { enabled = "literals" },
parameterTypes = { enabled = true },
variableTypes = { enabled = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enabled = true },
enumMemberValues = { enabled = true },
},
suggest = {
completeFunctionCalls = true,
},
},
},
},
bashls = {},
prismals = {},
gopls = {},
jsonls = {},
helm_ls = {},
yamlls = function()
vim.lsp.on_attach(function(client, buffer)
if vim.bo[buffer].filetype == "helm" then
vim.schedule(function()
vim.cmd("LspStop ++force yamlls")
end)
end
end)
end,
eslint = {
vim.api.nvim_create_autocmd("BufWritePre", {
callback = function()
vim.lsp.buf.format()
end,
}),
},
lua_ls = {
-- cmd = { ... },
-- filetypes = { ... },
-- capabilities = {},
settings = {
Lua = {
completion = {
callSnippet = "Replace",
},
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
-- diagnostics = { disable = { 'missing-fields' } },
},
},
},
}
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
"stylua", -- Used to format Lua code
"prettierd",
"codelldb",
"gitlab_ci_ls",
"js-debug-adapter",
"shfmt",
})
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
require("mason-lspconfig").setup({
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
automatic_installation = false,
automatic_enable = true,
handlers = {
function(server_name)
local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for ts_ls)
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
require("lspconfig")[server_name].setup(server)
end,
},
})
end,
}

21
nvim/lua/plugins/mini.lua Normal file
View File

@ -0,0 +1,21 @@
return {
"echasnovski/mini.nvim",
version = "*",
config = function()
require("mini.pairs").setup({})
require("mini.surround").setup({
mappings = {
add = "gza", -- Add surrounding in Normal and Visual modes
delete = "gzd", -- Delete surrounding
find = "gzf", -- Find surrounding (to the right)
find_left = "gzF", -- Find surrounding (to the left)
highlight = "gzh", -- Highlight surrounding
replace = "gzr", -- Replace surrounding
update_n_lines = "gzn", -- Update `n_lines`
suffix_last = "l", -- Suffix to search with "prev" method
suffix_next = "n", -- Suffix to search with "next" method
},
})
end,
}

View File

@ -0,0 +1,384 @@
return {
{
"antosha417/nvim-lsp-file-operations",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-neo-tree/neo-tree.nvim",
},
config = function()
require("lsp-file-operations").setup()
end,
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
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
{
"s1n7ax/nvim-window-picker", -- for open_with_window_picker keymaps
version = "2.*",
config = function()
require("window-picker").setup({
filter_rules = {
include_current_win = false,
autoselect_one = true,
-- filter using buffer options
bo = {
-- if the file type is one of following, the window will be ignored
filetype = { "neo-tree", "neo-tree-popup", "notify" },
-- if the buffer type is one of following, the window will be ignored
buftype = { "terminal", "quickfix" },
},
},
})
end,
},
},
lazy = false,
-----Instead of using `config`, you can use `opts` instead, if you'd like:
-----@module "neo-tree"
-----@type neotree.Config
--opts = {},
config = function()
-- If you want icons for diagnostic errors, you'll need to define them somewhere.
-- In Neovim v0.10+, you can configure them in vim.diagnostic.config(), like:
--
vim.diagnostic.config({
signs = {
text = {
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.WARN] = "",
[vim.diagnostic.severity.INFO] = "",
[vim.diagnostic.severity.HINT] = "󰌵",
},
},
})
--
-- In older versions, you can define the signs manually:
-- vim.fn.sign_define("DiagnosticSignError", { text = " ", texthl = "DiagnosticSignError" })
-- vim.fn.sign_define("DiagnosticSignWarn", { text = " ", texthl = "DiagnosticSignWarn" })
-- vim.fn.sign_define("DiagnosticSignInfo", { text = " ", texthl = "DiagnosticSignInfo" })
-- vim.fn.sign_define("DiagnosticSignHint", { text = "󰌵", texthl = "DiagnosticSignHint" })
require("neo-tree").setup({
close_if_last_window = false, -- Close Neo-tree if it is the last window left in the tab
popup_border_style = "NC", -- or "" to use 'winborder' on Neovim v0.11+
enable_git_status = true,
enable_diagnostics = true,
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
open_files_using_relative_paths = false,
sort_case_insensitive = false, -- used when sorting files and directories in the tree
sort_function = nil, -- use a custom function for sorting files and directories in the tree
-- sort_function = function (a,b)
-- if a.type == b.type then
-- return a.path > b.path
-- else
-- return a.type > b.type
-- end
-- end , -- this sorts files and directories descendantly
default_component_configs = {
container = {
enable_character_fade = true,
},
indent = {
indent_size = 2,
padding = 1, -- extra padding on left hand side
-- indent guides
with_markers = true,
indent_marker = "",
last_indent_marker = "",
highlight = "NeoTreeIndentMarker",
-- expander config, needed for nesting files
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
icon = {
folder_closed = "",
folder_open = "",
folder_empty = "󰜌",
provider = function(icon, node, state) -- default icon provider utilizes nvim-web-devicons if available
if node.type == "file" or node.type == "terminal" then
local success, web_devicons = pcall(require, "nvim-web-devicons")
local name = node.type == "terminal" and "terminal" or node.name
if success then
local devicon, hl = web_devicons.get_icon(name)
icon.text = devicon or icon.text
icon.highlight = hl or icon.highlight
end
end
end,
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
-- then these will never be used.
default = "*",
highlight = "NeoTreeFileIcon",
},
modified = {
symbol = "[+]",
highlight = "NeoTreeModified",
},
name = {
trailing_slash = false,
use_git_status_colors = true,
highlight = "NeoTreeFileName",
},
git_status = {
symbols = {
-- Change type
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
deleted = "", -- this can only be used in the git_status source
renamed = "󰁕", -- this can only be used in the git_status source
-- Status type
untracked = "",
ignored = "",
unstaged = "󰄱",
staged = "",
conflict = "",
},
},
-- If you don't want to use these columns, you can set `enabled = false` for each of them individually
file_size = {
enabled = true,
width = 12, -- width of the column
required_width = 64, -- min width of window required to show this column
},
type = {
enabled = true,
width = 10, -- width of the column
required_width = 122, -- min width of window required to show this column
},
last_modified = {
enabled = true,
width = 20, -- width of the column
required_width = 88, -- min width of window required to show this column
},
created = {
enabled = true,
width = 20, -- width of the column
required_width = 110, -- min width of window required to show this column
},
symlink_target = {
enabled = false,
},
},
-- A list of functions, each representing a global custom command
-- that will be available in all sources (if not overridden in `opts[source_name].commands`)
-- see `:h neo-tree-custom-commands-global`
commands = {},
window = {
position = "left",
width = 40,
mapping_options = {
noremap = true,
nowait = true,
},
mappings = {
["<space>"] = {
"toggle_node",
nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use
},
["<2-LeftMouse>"] = "open",
["<cr>"] = "open",
["<esc>"] = "cancel", -- close preview or floating neo-tree window
["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } },
-- Read `# Preview Mode` for more information
["l"] = "focus_preview",
["S"] = "open_split",
["s"] = "open_vsplit",
-- ["S"] = "split_with_window_picker",
-- ["s"] = "vsplit_with_window_picker",
["t"] = "open_tabnew",
-- ["<cr>"] = "open_drop",
-- ["t"] = "open_tab_drop",
["w"] = "open_with_window_picker",
--["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing
["C"] = "close_node",
-- ['C'] = 'close_all_subnodes',
["z"] = "close_all_nodes",
--["Z"] = "expand_all_nodes",
--["Z"] = "expand_all_subnodes",
["a"] = {
"add",
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
-- some commands may take optional config options, see `:h neo-tree-mappings` for details
config = {
show_path = "none", -- "none", "relative", "absolute"
},
},
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
["d"] = "delete",
["r"] = "rename",
["b"] = "rename_basename",
["y"] = "copy_to_clipboard",
["x"] = "cut_to_clipboard",
["p"] = "paste_from_clipboard",
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
-- ["c"] = {
-- "copy",
-- config = {
-- show_path = "none" -- "none", "relative", "absolute"
-- }
--}
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
["q"] = "close_window",
["R"] = "refresh",
["?"] = "show_help",
["<"] = "prev_source",
[">"] = "next_source",
["i"] = "show_file_details",
-- ["i"] = {
-- "show_file_details",
-- -- format strings of the timestamps shown for date created and last modified (see `:h os.date()`)
-- -- both options accept a string or a function that takes in the date in seconds and returns a string to display
-- -- config = {
-- -- created_format = "%Y-%m-%d %I:%M %p",
-- -- modified_format = "relative", -- equivalent to the line below
-- -- modified_format = function(seconds) return require('neo-tree.utils').relative_date(seconds) end
-- -- }
-- },
},
},
nesting_rules = {},
filesystem = {
filtered_items = {
visible = false, -- when true, they will just be displayed differently than normal items
hide_dotfiles = true,
hide_gitignored = true,
hide_hidden = true, -- only works on Windows for hidden files/directories
hide_by_name = {
--"node_modules"
},
hide_by_pattern = { -- uses glob style patterns
--"*.meta",
--"*/src/*/tsconfig.json",
},
always_show = { -- remains visible even if other settings would normally hide it
--".gitignored",
},
always_show_by_pattern = { -- uses glob style patterns
--".env*",
},
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
--".DS_Store",
--"thumbs.db"
},
never_show_by_pattern = { -- uses glob style patterns
--".null-ls_*",
},
},
follow_current_file = {
enabled = true, -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open.
leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
},
group_empty_dirs = false, -- when true, empty folders will be grouped together
hijack_netrw_behavior = "disabled", -- netrw disabled, opening a directory opens neo-tree
-- in whatever position is specified in window.position
-- "open_current", -- netrw disabled, opening a directory opens within the
-- window like netrw would, regardless of window.position
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
use_libuv_file_watcher = true, -- This will use the OS level file watchers to detect changes
-- instead of relying on nvim autocmd events.
window = {
mappings = {
["<bs>"] = "navigate_up",
["."] = "set_root",
["H"] = "toggle_hidden",
["/"] = "fuzzy_finder",
["D"] = "fuzzy_finder_directory",
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
-- ["D"] = "fuzzy_sorter_directory",
["f"] = "filter_on_submit",
["<c-x>"] = "clear_filter",
["[g"] = "prev_git_modified",
["]g"] = "next_git_modified",
["o"] = {
"show_help",
nowait = false,
config = { title = "Order by", prefix_key = "o" },
},
["oc"] = { "order_by_created", nowait = false },
["od"] = { "order_by_diagnostics", nowait = false },
["og"] = { "order_by_git_status", nowait = false },
["om"] = { "order_by_modified", nowait = false },
["on"] = { "order_by_name", nowait = false },
["os"] = { "order_by_size", nowait = false },
["ot"] = { "order_by_type", nowait = false },
-- ['<key>'] = function(state) ... end,
},
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
["<down>"] = "move_cursor_down",
["<C-n>"] = "move_cursor_down",
["<up>"] = "move_cursor_up",
["<C-p>"] = "move_cursor_up",
["<esc>"] = "close",
-- ['<key>'] = function(state, scroll_padding) ... end,
},
},
commands = {}, -- Add a custom command or override a global one using the same function name
},
buffers = {
follow_current_file = {
enabled = true, -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open.
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
},
group_empty_dirs = true, -- when true, empty folders will be grouped together
show_unloaded = true,
window = {
mappings = {
["d"] = "buffer_delete",
["bd"] = "buffer_delete",
["<bs>"] = "navigate_up",
["."] = "set_root",
["o"] = {
"show_help",
nowait = false,
config = { title = "Order by", prefix_key = "o" },
},
["oc"] = { "order_by_created", nowait = false },
["od"] = { "order_by_diagnostics", nowait = false },
["om"] = { "order_by_modified", nowait = false },
["on"] = { "order_by_name", nowait = false },
["os"] = { "order_by_size", nowait = false },
["ot"] = { "order_by_type", nowait = false },
},
},
},
git_status = {
window = {
position = "float",
mappings = {
["A"] = "git_add_all",
["gu"] = "git_unstage_file",
["ga"] = "git_add_file",
["gr"] = "git_revert_file",
["gc"] = "git_commit",
["gp"] = "git_push",
["gg"] = "git_commit_and_push",
["o"] = {
"show_help",
nowait = false,
config = { title = "Order by", prefix_key = "o" },
},
["oc"] = { "order_by_created", nowait = false },
["od"] = { "order_by_diagnostics", nowait = false },
["om"] = { "order_by_modified", nowait = false },
["on"] = { "order_by_name", nowait = false },
["os"] = { "order_by_size", nowait = false },
["ot"] = { "order_by_type", nowait = false },
},
},
},
})
vim.keymap.set("n", "<leader>e", "<Cmd>Neotree toggle<CR>")
end,
},
}

View File

@ -0,0 +1,4 @@
return {
"nvim-treesitter/nvim-treesitter-context",
opts = { enabled = true },
}

View File

@ -0,0 +1,62 @@
return {
"nvim-treesitter/nvim-treesitter-textobjects",
dependencies = {
"nvim-treesitter/nvim-treesitter"
},
init = function()
require'nvim-treesitter.configs'.setup {
textobjects = {
select = {
enable = true,
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["bi"] = "@block.inner",
-- You can optionally set descriptions to the mappings (used in the desc parameter of
-- nvim_buf_set_keymap) which plugins like which-key display
["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" },
-- You can also use captures from other query groups like `locals.scm`
["as"] = { query = "@local.scope", query_group = "locals", desc = "Select language scope" },
},
-- You can choose the select mode (default is charwise 'v')
--
-- Can also be a function which gets passed a table with the keys
-- * query_string: eg '@function.inner'
-- * method: eg 'v' or 'o'
-- and should return the mode ('v', 'V', or '<c-v>') or a table
-- mapping query_strings to modes.
selection_modes = {
['@parameter.outer'] = 'v', -- charwise
['@function.outer'] = 'V', -- linewise
['@class.outer'] = '<c-v>', -- blockwise
},
-- If you set this to `true` (default is `false`) then any textobject is
-- extended to include preceding or succeeding whitespace. Succeeding
-- whitespace has priority in order to act similarly to eg the built-in
-- `ap`.
--
-- Can also be a function which gets passed a table with the keys
-- * query_string: eg '@function.inner'
-- * selection_mode: eg 'v'
-- and should return true or false
include_surrounding_whitespace = true,
},
swap = {
enable = true,
swap_next = {
["<leader>a"] = "@parameter.inner",
},
swap_previous = {
["<leader>s"] = "@parameter.inner",
},
},
},
}
end
}

View File

@ -0,0 +1,23 @@
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function ()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = "all",
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<Enter>",
node_incremental = "<Enter>",
scope_incremental = false,
node_decremental = "<Backspace>"
},
}
})
end
}

25
nvim/lua/plugins/oil.lua Normal file
View File

@ -0,0 +1,25 @@
return {
"stevearc/oil.nvim",
---@module 'oil'
---@type oil.SetupOpts
opts = {
columns = {
"icon",
"permissions",
"size",
},
watch_for_changes = true,
view_options = {
-- Show files and directories that start with "."
show_hidden = true,
},
float = {
preview_split = "right",
},
},
-- Optional dependencies
dependencies = { { "echasnovski/mini.icons", opts = {} } },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
lazy = false,
}

View File

@ -0,0 +1,7 @@
return {
"ahmedkhalf/project.nvim",
init = function()
require("project_nvim").setup {
}
end
}

View File

@ -0,0 +1,3 @@
return {
"HiPhish/rainbow-delimiters.nvim",
}

View File

@ -0,0 +1,5 @@
return {
'mrcjkb/rustaceanvim',
version = '^6', -- Recommended
lazy = false, -- This plugin is already lazy
}

View File

@ -0,0 +1,3 @@
return {
"tpope/vim-sleuth",
}

View File

@ -0,0 +1,62 @@
return {
"folke/snacks.nvim",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
animate = { enabled = true, easing = "cubic" },
bigfile = { enabled = true },
explorer = { enabled = true },
indent = { enabled = true, animate = { enabled = false }, scope = { enabled = true }, chunk = { enabled = true } },
input = { enabled = true },
picker = { enabled = true },
notifier = { enabled = true },
quickfile = { enabled = true },
scope = { enabled = true },
scroll = { enabled = true },
statuscolumn = { enabled = true },
words = { enabled = true },
},
keys = {
{
"<leader>gg",
function()
Snacks.lazygit()
end,
desc = "Lazygit",
},
},
init = function()
vim.api.nvim_create_autocmd("User", {
pattern = "VeryLazy",
callback = function()
-- Setup some globals for debugging (lazy-loaded)
_G.dd = function(...)
Snacks.debug.inspect(...)
end
_G.bt = function()
Snacks.debug.backtrace()
end
vim.print = _G.dd -- Override print to use snacks for `:=` command
-- Create some toggle mappings
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
Snacks.toggle.diagnostics():map("<leader>ud")
Snacks.toggle.line_number():map("<leader>ul")
Snacks.toggle
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
:map("<leader>uc")
Snacks.toggle.treesitter():map("<leader>uT")
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark Background" }):map("<leader>ub")
Snacks.toggle.inlay_hints():map("<leader>uh")
Snacks.toggle.indent():map("<leader>ug")
Snacks.toggle.dim():map("<leader>uD")
end,
})
end,
}

View File

@ -0,0 +1,5 @@
return {
"echasnovski/mini.statusline",
version = false,
opts = {}
}

View File

@ -0,0 +1,17 @@
return {
{
"akinsho/toggleterm.nvim",
version = "*",
opts = {
open_mapping = [[<c-y>]],
hide_numbers = true,
direction = "float",
float_opts = {
border = "curved",
},
winbar = {
enabled = false,
},
},
},
}

View File

@ -0,0 +1,42 @@
return {
"folke/trouble.nvim",
init = function()
local config = require("fzf-lua.config")
local actions = require("trouble.sources.fzf").actions
config.defaults.actions.files["ctrl-t"] = actions.open
end,
opts={},
cmd = "Trouble",
keys = {
{
"<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
},
{
"<leader>xX",
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "Buffer Diagnostics (Trouble)",
},
{
"<leader>cs",
"<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)",
},
{
"<leader>cl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP Definitions / references / ... (Trouble)",
},
{
"<leader>xL",
"<cmd>Trouble loclist toggle<cr>",
desc = "Location List (Trouble)",
},
{
"<leader>xQ",
"<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)",
},
},
}

View File

@ -0,0 +1,3 @@
return {
'towolf/vim-helm'
}

View File

@ -0,0 +1,14 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
opts = {},
keys = {
{
"<leader>?",
function()
require("which-key").show({global = false})
end,
desc = "Buffer local Keymaps (which-key)",
},
},
}

View File

@ -1,62 +0,0 @@
local opts = {
highlight_hovered_item = true,
show_guides = true,
auto_preview = false,
position = 'right',
relative_width = true,
width = 25,
auto_close = false,
show_numbers = false,
show_relative_numbers = false,
show_symbol_details = true,
preview_bg_highlight = 'Pmenu',
autofold_depth = nil,
auto_unfold_hover = true,
fold_markers = { '', '' },
wrap = false,
keymaps = { -- These keymaps can be a string or a table for multiple keys
close = {"<Esc>", "q"},
goto_location = "<Cr>",
focus_location = "o",
hover_symbol = "<C-space>",
toggle_preview = "K",
rename_symbol = "r",
code_actions = "a",
fold = "h",
unfold = "l",
fold_all = "W",
unfold_all = "E",
fold_reset = "R",
},
lsp_blacklist = {},
symbol_blacklist = {},
symbols = {
File = {icon = "", hl = "TSURI"},
Module = {icon = "", hl = "TSNamespace"},
Namespace = {icon = "", hl = "TSNamespace"},
Package = {icon = "", hl = "TSNamespace"},
Class = {icon = "𝓒", hl = "TSType"},
Method = {icon = "ƒ", hl = "TSMethod"},
Property = {icon = "", hl = "TSMethod"},
Field = {icon = "", hl = "TSField"},
Constructor = {icon = "", hl = "TSConstructor"},
Enum = {icon = "", hl = "TSType"},
Interface = {icon = "", hl = "TSType"},
Function = {icon = "", hl = "TSFunction"},
Variable = {icon = "", hl = "TSConstant"},
Constant = {icon = "", hl = "TSConstant"},
String = {icon = "𝓐", hl = "TSString"},
Number = {icon = "#", hl = "TSNumber"},
Boolean = {icon = "", hl = "TSBoolean"},
Array = {icon = "", hl = "TSConstant"},
Object = {icon = "⦿", hl = "TSType"},
Key = {icon = "🔐", hl = "TSType"},
Null = {icon = "NULL", hl = "TSType"},
EnumMember = {icon = "", hl = "TSField"},
Struct = {icon = "𝓢", hl = "TSType"},
Event = {icon = "🗲", hl = "TSType"},
Operator = {icon = "+", hl = "TSOperator"},
TypeParameter = {icon = "𝙏", hl = "TSParameter"}
}
}
require("symbols-outline").setup(opts)

View File

@ -1,28 +0,0 @@
require('telescope').load_extension('lsp_handlers')
local trouble = require('trouble.providers.telescope')
require('telescope').setup({
defaults={
mappings={
i = { ["<c-t>"] = trouble.open_with_trouble },
n = { ["<c-t>"] = trouble.open_with_trouble },
},
path_display={"smart"},
},
pickers={
find_files={
theme="dropdown",
layout_config={
horizontal= {width=0.5}
}
}
},
extensions = {
lsp_handlers = {
code_action = {
telescope = require('telescope.themes').get_dropdown({}),
},
},
},
})

View File

@ -1,8 +0,0 @@
require('todotxt-nvim').setup({
todo_file = '~/todotxt/todo.txt',
sidebar = {
width = 40,
position = 'right'
}
}
)

View File

@ -1,12 +0,0 @@
vim.api.nvim_set_keymap('t', "<Esc><Esc>", [[<C-\><C-n>]], {})
require "toggleterm".setup {
open_mapping = [[<c-y>]],
hide_numbers = true,
--direction = 'float',
float_opts = {
border = 'curved'
},
winbar = {
enabled = false
}
}

View File

@ -1,38 +0,0 @@
require'nvim-treesitter.configs'.setup {
-- One of "all", "maintained" (parsers with maintainers), or a list of languages
ensure_installed = "all",
-- Install languages synchronously (only applied to `ensure_installed`)
sync_install = false,
-- List of parsers to ignore installing
ignore_install = { },
highlight = {
-- `false` will disable the whole extension
enable = true,
-- list of language that will be disabled
disable = { },
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}
--- Treesitter
---BEGINWORKAROUND
--vim.api.nvim_create_autocmd({'BufEnter','BufAdd','BufNew','BufNewFile','BufWinEnter'}, {
-- group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}),
-- callback = function()
-- vim.opt.foldmethod = 'expr'
-- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
-- end
--})
---ENDWORKAROUND
--- Treesitter
--- Utility functions
---

View File

@ -1,74 +0,0 @@
require('trouble').setup {
position = "bottom", -- position of the list can be: bottom, top, left, right
height = 10, -- height of the trouble list when position is top or bottom
width = 50, -- width of the list when position is left or right
icons = true, -- use devicons for filenames
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
fold_open = "", -- icon used for open folds
fold_closed = "", -- icon used for closed folds
group = true, -- group results by file
padding = true, -- add an extra new line on top of the list
action_keys = { -- key mappings for actions in the trouble list
-- map to {} to remove a mapping, for example:
-- close = {},
close = "q", -- close the list
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
refresh = "r", -- manually refresh
jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds
open_split = { "<c-x>" }, -- open buffer in new split
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
open_tab = { "<c-t>" }, -- open buffer in new tab
jump_close = { "o" }, -- jump to the diagnostic and close the list
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
toggle_preview = "P", -- toggle auto_preview
hover = "K", -- opens a small popup with the full multiline message
preview = "p", -- preview the diagnostic location
close_folds = { "zM", "zm" }, -- close all folds
open_folds = { "zR", "zr" }, -- open all folds
toggle_fold = { "zA", "za" }, -- toggle fold of current file
previous = "k", -- previous item
next = "j" -- next item
},
indent_lines = true, -- add an indent guide below the fold icons
auto_open = false, -- automatically open the list when you have diagnostics
auto_close = false, -- automatically close the list when you have no diagnostics
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
auto_fold = false, -- automatically fold a file trouble list at creation
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result
signs = {
-- icons / text used for a diagnostic
error = "",
warning = "",
hint = "",
information = "",
other = ""
},
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
}
vim.keymap.set("n", "<leader>t", "<cmd>TroubleToggle<cr>",
{ silent = true, noremap = true }
)
vim.keymap.set("n", "<leader>tw", "<cmd>TroubleToggle workspace_diagnostics<cr>",
{ silent = true, noremap = true }
)
vim.keymap.set("n", "<leader>td", "<cmd>TroubleToggle document_diagnostics<cr>",
{ silent = true, noremap = true }
)
vim.keymap.set("n", "<leader>tl", "<cmd>TroubleToggle loclist<cr>",
{ silent = true, noremap = true }
)
vim.keymap.set("n", "<leader>tq", "<cmd>TroubleToggle quickfix<cr>",
{ silent = true, noremap = true }
)
local trouble = require("trouble.providers.telescope")
local telescope = require("telescope")
telescope.setup {
defaults = {
mappings = {
i = { ["<c-t>"] = trouble.open_with_trouble },
n = { ["<c-t>"] = trouble.open_with_trouble },
},
},
}

View File

@ -1,9 +0,0 @@
lines = require('lsp_lines')
lines.setup()
vim.diagnostic.config({ virtual_text = false });
vim.keymap.set(
"",
"tl",
lines.toggle,
{ desc = "Toggle lsp_lines" }
);

View File

@ -1,439 +0,0 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
_G._packer = _G._packer or {}
_G._packer.inside_compile = true
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
if threshold then
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
end
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/mardie/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/mardie/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/mardie/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/mardie/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/mardie/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["FixCursorHold.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/FixCursorHold.nvim",
url = "https://github.com/antoinemadec/FixCursorHold.nvim"
},
LuaSnip = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip"
},
["ayu-vim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/ayu-vim",
url = "https://github.com/ayu-theme/ayu-vim"
},
["cmp-buffer"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-cmdline"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
url = "https://github.com/hrsh7th/cmp-cmdline"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
["cmp-nvim-lsp-signature-help"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help",
url = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help"
},
["cmp-nvim-lua"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
url = "https://github.com/hrsh7th/cmp-nvim-lua"
},
["cmp-path"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-path",
url = "https://github.com/hrsh7th/cmp-path"
},
["cmp-vsnip"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-vsnip",
url = "https://github.com/hrsh7th/cmp-vsnip"
},
cmp_luasnip = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
url = "https://github.com/saadparwaiz1/cmp_luasnip"
},
["fidget.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/fidget.nvim",
url = "https://github.com/j-hui/fidget.nvim"
},
["friendly-snippets"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/friendly-snippets",
url = "https://github.com/rafamadriz/friendly-snippets"
},
["fugitive-gitlab.vim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/fugitive-gitlab.vim",
url = "https://github.com/shumphrey/fugitive-gitlab.vim"
},
gruvbox = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/gruvbox",
url = "https://github.com/morhetz/gruvbox"
},
["lsp-status.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/lsp-status.nvim",
url = "https://github.com/nvim-lua/lsp-status.nvim"
},
["lsp_lines.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/lsp_lines.nvim",
url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim"
},
["mason-lspconfig.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
url = "https://github.com/williamboman/mason-lspconfig.nvim"
},
["mason-tool-installer.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/mason-tool-installer.nvim",
url = "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim"
},
["mason.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
neotest = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/neotest",
url = "https://github.com/nvim-neotest/neotest"
},
["neotest-jest"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/neotest-jest",
url = "https://github.com/haydenmeade/neotest-jest"
},
["neotest-plenary"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/neotest-plenary",
url = "https://github.com/nvim-neotest/neotest-plenary"
},
["neotest-python"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/neotest-python",
url = "https://github.com/nvim-neotest/neotest-python"
},
["neotest-vim-test"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/neotest-vim-test",
url = "https://github.com/nvim-neotest/neotest-vim-test"
},
["nui.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nui.nvim",
url = "https://github.com/MunifTanjim/nui.nvim"
},
["null-ls.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
url = "https://github.com/jose-elias-alvarez/null-ls.nvim"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-dap"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-dap",
url = "https://github.com/mfussenegger/nvim-dap"
},
["nvim-dap-python"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-dap-python",
url = "https://github.com/mfussenegger/nvim-dap-python"
},
["nvim-dap-ui"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-dap-ui",
url = "https://github.com/rcarriga/nvim-dap-ui"
},
["nvim-dap-virtual-text"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-dap-virtual-text",
url = "https://github.com/theHamsta/nvim-dap-virtual-text"
},
["nvim-dap-vscode-js"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-dap-vscode-js",
url = "https://github.com/mxsdev/nvim-dap-vscode-js"
},
["nvim-lightbulb"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-lightbulb",
url = "https://github.com/kosayoda/nvim-lightbulb"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-test"] = {
config = { "\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14nvim-test\frequire\0" },
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-test",
url = "https://github.com/klen/nvim-test"
},
["nvim-tree.lua"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
url = "https://github.com/kyazdani42/nvim-tree.lua"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-web-devicons"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
url = "https://github.com/kyazdani42/nvim-web-devicons"
},
["one-small-step-for-vimkind"] = {
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/mardie/.local/share/nvim/site/pack/packer/opt/one-small-step-for-vimkind",
url = "https://github.com/jbyuki/one-small-step-for-vimkind"
},
["packer.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["plenary.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["prettier.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/prettier.nvim",
url = "https://github.com/MunifTanjim/prettier.nvim"
},
["rust-tools.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/rust-tools.nvim",
url = "https://github.com/simrat39/rust-tools.nvim"
},
["symbols-outline.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim",
url = "https://github.com/simrat39/symbols-outline.nvim"
},
["telescope-dap.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/telescope-dap.nvim",
url = "https://github.com/nvim-telescope/telescope-dap.nvim"
},
["telescope-lsp-handlers.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/telescope-lsp-handlers.nvim",
url = "https://github.com/gbrlsnchs/telescope-lsp-handlers.nvim"
},
["telescope.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
["todotxt.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/todotxt.nvim",
url = "https://github.com/ThyW/todotxt.nvim"
},
["toggleterm.nvim"] = {
config = { "\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15toggleterm\frequire\0" },
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/toggleterm.nvim",
url = "https://github.com/akinsho/toggleterm.nvim"
},
["trouble.nvim"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/trouble.nvim",
url = "https://github.com/folke/trouble.nvim"
},
["vim-airline"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-airline",
url = "https://github.com/bling/vim-airline"
},
["vim-doge"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-doge",
url = "https://github.com/kkoomen/vim-doge"
},
["vim-easymotion"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-easymotion",
url = "https://github.com/easymotion/vim-easymotion"
},
["vim-fugitive"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-fugitive",
url = "https://github.com/tpope/vim-fugitive"
},
["vim-gitgutter"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-gitgutter",
url = "https://github.com/airblade/vim-gitgutter"
},
["vim-highlightedyank"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-highlightedyank",
url = "https://github.com/machakann/vim-highlightedyank"
},
["vim-sandwich"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-sandwich",
url = "https://github.com/machakann/vim-sandwich"
},
["vim-vsnip"] = {
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-vsnip",
url = "https://github.com/hrsh7th/vim-vsnip"
},
["which-key.nvim"] = {
config = { "\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0" },
loaded = true,
path = "/home/mardie/.local/share/nvim/site/pack/packer/start/which-key.nvim",
url = "https://github.com/folke/which-key.nvim"
}
}
time([[Defining packer_plugins]], false)
local module_lazy_loads = {
["^osv"] = "one-small-step-for-vimkind"
}
local lazy_load_called = {['packer.load'] = true}
local function lazy_load_module(module_name)
local to_load = {}
if lazy_load_called[module_name] then return nil end
lazy_load_called[module_name] = true
for module_pat, plugin_name in pairs(module_lazy_loads) do
if not _G.packer_plugins[plugin_name].loaded and string.match(module_name, module_pat) then
to_load[#to_load + 1] = plugin_name
end
end
if #to_load > 0 then
require('packer.load')(to_load, {module = module_name}, _G.packer_plugins)
local loaded_mod = package.loaded[module_name]
if loaded_mod then
return function(modname) return loaded_mod end
end
end
end
if not vim.g.packer_custom_loader_enabled then
table.insert(package.loaders, 1, lazy_load_module)
vim.g.packer_custom_loader_enabled = true
end
-- Config for: toggleterm.nvim
time([[Config for toggleterm.nvim]], true)
try_loadstring("\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15toggleterm\frequire\0", "config", "toggleterm.nvim")
time([[Config for toggleterm.nvim]], false)
-- Config for: which-key.nvim
time([[Config for which-key.nvim]], true)
try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0", "config", "which-key.nvim")
time([[Config for which-key.nvim]], false)
-- Config for: nvim-test
time([[Config for nvim-test]], true)
try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14nvim-test\frequire\0", "config", "nvim-test")
time([[Config for nvim-test]], false)
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead")
end
_G._packer.needs_bufread = false
if should_profile then save_profiles() end
end)
if not no_errors then
error_msg = error_msg:gsub('"', '\\"')
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end