update nvim config (IDE setup)

This commit is contained in:
Václav Uruba 2025-02-05 17:10:17 +01:00
parent 0301d1c6fd
commit c55bdc3d2c
Signed by: uruba
GPG Key ID: 9D8E987C4B2E1E9C
26 changed files with 465 additions and 76 deletions

View File

@ -1,36 +1,48 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
"auto-session": { "branch": "main", "commit": "021b64ed7d4ac68a37be3ad28d8e1cba5bec582c" },
"barbar.nvim": { "branch": "master", "commit": "a26bae6c51899db530de19ce3c2f4307e37a869e" },
"bufferline.nvim": { "branch": "main", "commit": "5726c4e291224181903e960119a11e20ac677a0a" },
"auto-session": { "branch": "main", "commit": "82630e2f70be140f8dcc75a12e2ee2839e8488c2" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "363243c03102a531a8203311d4f2ae704c620d9b" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
"dressing.nvim": { "branch": "master", "commit": "56ef6a969a4990d938c5fed40c370f65e125fc97" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
"gitsigns.nvim": { "branch": "main", "commit": "9b36d497495436c135659902054ee637e0ba6021" },
"hererocks": { "branch": "master", "commit": "c9c5444dea1e07e005484014a8231aa667be30b6" },
"indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" },
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
"indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" },
"lazy.nvim": { "branch": "main", "commit": "7527af40ddd4a93a02911be570b32609b9d4ea53" },
"lazygit.nvim": { "branch": "main", "commit": "adc37c5a6d7d6e8d0a039f08f3c7837971a1c77a" },
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "f75e877f5266e87523eb5a18fcde2081820d087b" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "374c78d3ebb5c53f43ea6bd906b6587b5e899b9e" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.nvim": { "branch": "main", "commit": "f968becf44b05d8c54d4fa95c9ca699df4de363b" },
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
"nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" },
"nvim-tree.lua": { "branch": "master", "commit": "68fc4c20f5803444277022c681785c5edd11916d" },
"nvim-treesitter": { "branch": "master", "commit": "57713d079c3c2afcc31f3e0650bf8594a2a296ba" },
"mini.nvim": { "branch": "main", "commit": "87fc38a8a2b8d498cecb021d057a38ea2e9f5a79" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"nvim-autopairs": { "branch": "master", "commit": "3d02855468f94bf435db41b661b58ec4f48a06b7" },
"nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" },
"nvim-lint": { "branch": "master", "commit": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" },
"nvim-lspconfig": { "branch": "master", "commit": "66bc018936c6ff76beb75f89d986af6442db4001" },
"nvim-surround": { "branch": "main", "commit": "ae298105122c87bbe0a36b1ad20b06d417c0433e" },
"nvim-tree.lua": { "branch": "master", "commit": "70825f23db61ecd900c4cfea169bffe931926a9d" },
"nvim-treesitter": { "branch": "master", "commit": "53a6b3993f5803378d4d031bf114c0b125a52ba8" },
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
"nvim-web-devicons": { "branch": "master", "commit": "5740b7382429d20b6ed0bbdb0694185af9507d44" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
"nvim-web-devicons": { "branch": "master", "commit": "402377242b04be3f4f0f3720bd952df86e946c30" },
"onedark.nvim": { "branch": "master", "commit": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"rest.nvim": { "branch": "main", "commit": "545509268d5e928d72d64764c21ef65c77e90edf" },
"tagbar": { "branch": "master", "commit": "8de7694c0aeda253073098bbc9fb890b2902ddb8" },
"plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
"rest.nvim": { "branch": "main", "commit": "62606c3599bd304227457d6e20580965939b191e" },
"substitute.nvim": { "branch": "main", "commit": "97f49d16f8eea7967d41db4f657dd63af53eeba1" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
"telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" },
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"trouble.nvim": { "branch": "main", "commit": "6f380b8826fb819c752c8fd7daaee9ef96d4c689" },
"vim-css-color": { "branch": "master", "commit": "14fd934cdd9ca1ac0e53511094e612eb9bace373" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }
"which-key.nvim": { "branch": "main", "commit": "0e76a87ac51772569aec678dc74baa8e2a86100c" }
}

View File

@ -1 +1 @@
vim.cmd("let g:netrw_liststyle = 3")
vim.cmd('let g:netrw_liststyle = 3')

View File

@ -5,7 +5,7 @@
-- See: https://github.com/brainfucksec/neovim-lua#appearance
-- Load nvim color scheme:
-- Change the "require" values with your color scheme
-- Change the 'require' values with your color scheme
local status_ok, color_scheme = pcall(require, 'onedark')
if not status_ok then
return

View File

@ -1,4 +1,4 @@
-- Plenary
return {
"nvim-lua/plenary.nvim",
'nvim-lua/plenary.nvim',
}

View File

@ -1,4 +0,0 @@
-- Plenary
return {
"williamboman/mason.nvim",
}

View File

@ -1,6 +1,31 @@
-- Autopairs
return {
"windwp/nvim-autopairs",
event = "InsertEnter",
opts = {},
'windwp/nvim-autopairs',
event = 'InsertEnter',
dependencies = {
'hrsh7th/nvim-cmp',
},
config = function()
-- import nvim-autopairs
local autopairs = require('nvim-autopairs')
-- configure autopairs
autopairs.setup({
check_ts = true, -- enable treesitter
ts_config = {
lua = { 'string' }, -- don't add pairs in lua string treesitter nodes
javascript = { 'template_string' }, -- don't add pairs in javscript template_string treesitter nodes
java = false, -- don't check treesitter on java
},
})
-- import nvim-autopairs completion functionality
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
-- import nvim-cmp plugin (completions plugin)
local cmp = require('cmp')
-- make autopairs and completion work together
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
end,
}

View File

@ -0,0 +1,21 @@
return {
'folke/todo-comments.nvim',
event = { 'BufReadPre', 'BufNewFile' },
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local todo_comments = require('todo-comments')
-- set keymaps
local keymap = vim.keymap -- for conciseness
keymap.set('n', ']t', function()
todo_comments.jump_next()
end, { desc = 'Next todo comment' })
keymap.set('n', '[t', function()
todo_comments.jump_prev()
end, { desc = 'Previous todo comment' })
todo_comments.setup()
end,
}

View File

@ -0,0 +1,18 @@
return {
'numToStr/Comment.nvim',
event = { 'BufReadPre', 'BufNewFile' },
dependencies = {
'JoosepAlviste/nvim-ts-context-commentstring',
},
config = function()
-- import comment plugin safely
local comment = require('Comment')
local ts_context_commentstring = require('ts_context_commentstring.integrations.comment_nvim')
-- enable comment
comment.setup({
-- for commenting tsx, jsx, svelte, html files
pre_hook = ts_context_commentstring.create_pre_hook(),
})
end,
}

View File

@ -0,0 +1,19 @@
return {
'kdheepak/lazygit.nvim',
cmd = {
'LazyGit',
'LazyGitConfig',
'LazyGitCurrentFile',
'LazyGitFilter',
'LazyGitFilterCurrentFile',
},
-- optional for floating window border decoration
dependencies = {
'nvim-lua/plenary.nvim',
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ '<leader>lg', '<cmd>LazyGit<cr>', desc = 'Open lazy git' },
},
}

View File

@ -1,7 +1,48 @@
-- Git signs
return {
"lewis6991/gitsigns.nvim",
config = function ()
require("gitsigns").setup()
end
'lewis6991/gitsigns.nvim',
event = { 'BufReadPre', 'BufNewFile' },
opts = {
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, desc)
vim.keymap.set(mode, l, r, { buffer = bufnr, desc = desc })
end
-- Navigation
map('n', ']h', gs.next_hunk, 'Next Hunk')
map('n', '[h', gs.prev_hunk, 'Prev Hunk')
-- Actions
map('n', '<leader>hs', gs.stage_hunk, 'Stage hunk')
map('n', '<leader>hr', gs.reset_hunk, 'Reset hunk')
map('v', '<leader>hs', function()
gs.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') })
end, 'Stage hunk')
map('v', '<leader>hr', function()
gs.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') })
end, 'Reset hunk')
map('n', '<leader>hS', gs.stage_buffer, 'Stage buffer')
map('n', '<leader>hR', gs.reset_buffer, 'Reset buffer')
map('n', '<leader>hu', gs.undo_stage_hunk, 'Undo stage hunk')
map('n', '<leader>hp', gs.preview_hunk, 'Preview hunk')
map('n', '<leader>hb', function()
gs.blame_line({ full = true })
end, 'Blame line')
map('n', '<leader>hB', gs.toggle_current_line_blame, 'Toggle line blame')
map('n', '<leader>hd', gs.diffthis, 'Diff this')
map('n', '<leader>hD', function()
gs.diffthis('~')
end, 'Diff this ~')
-- Text object
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>', 'Gitsigns select hunk')
end,
},
}

View File

@ -0,0 +1,17 @@
return {
'gbprod/substitute.nvim',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
local substitute = require('substitute')
substitute.setup()
-- set keymaps
local keymap = vim.keymap -- for conciseness
keymap.set('n', 's', substitute.operator, { desc = 'Substitute with motion' })
keymap.set('n', 'ss', substitute.line, { desc = 'Substitute line' })
keymap.set('n', 'S', substitute.eol, { desc = 'Substitute to end of line' })
keymap.set('x', 's', substitute.visual, { desc = 'Substitute in visual mode' })
end,
}

View File

@ -1,4 +1,7 @@
-- Surround
return {
"tpope/vim-surround",
'kylechui/nvim-surround',
event = { 'BufReadPre', 'BufNewFile' },
version = '*', -- Use for stability; omit to use `main` branch for the latest features
config = true,
}

View File

@ -1,9 +1,9 @@
return {
"rest-nvim/rest.nvim",
dependencies = { { "nvim-lua/plenary.nvim" } },
event = "BufEnter *.http",
'rest-nvim/rest.nvim',
dependencies = { { 'nvim-lua/plenary.nvim' } },
event = 'BufEnter *.http',
config = function()
require("rest-nvim").setup({
require('rest-nvim').setup({
-- Open request results in a horizontal split
result_split_horizontal = false,
-- Keep the http file buffer above|left when split horizontal|vertical
@ -33,9 +33,9 @@ return {
-- executables or functions for formatting response body [optional]
-- set them to false if you want to disable them
formatters = {
json = "jq",
json = 'jq',
html = function(body)
return vim.fn.system({"tidy", "-i", "-q", "-"}, body)
return vim.fn.system({'tidy', '-i', '-q', '-'}, body)
end
},
},
@ -43,8 +43,8 @@ return {
jump_to_request = false,
env_file = '.env',
-- for telescope select
env_pattern = "\\.env$",
env_edit_command = "tabedit",
env_pattern = '\\.env$',
env_edit_command = 'tabedit',
custom_dynamic_variables = {},
yank_dry_run = true,
search_back = true,

View File

@ -0,0 +1,37 @@
return {
'stevearc/conform.nvim',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
local conform = require('conform')
conform.setup({
formatters_by_ft = {
javascript = { 'prettier' },
typescript = { 'prettier' },
svelte = { 'prettier' },
css = { 'prettier' },
html = { 'prettier' },
json = { 'prettier' },
yaml = { 'prettier' },
markdown = { 'prettier' },
graphql = { 'prettier' },
liquid = { 'prettier' },
lua = { 'stylua' },
python = { 'isort', 'black' },
},
format_on_save = {
lsp_fallback = true,
async = false,
timeout_ms = 1000,
},
})
vim.keymap.set({ 'n', 'v' }, '<leader>mp', function()
conform.format({
lsp_fallback = true,
async = false,
timeout_ms = 1000,
})
end, { desc = 'Format file or range (in visual mode)' })
end,
}

View File

@ -0,0 +1,27 @@
return {
'mfussenegger/nvim-lint',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
local lint = require('lint')
lint.linters_by_ft = {
javascript = { 'eslint_d' },
typescript = { 'eslint_d' },
svelte = { 'eslint_d' },
python = { 'pylint' },
}
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
group = lint_augroup,
callback = function()
lint.try_lint()
end,
})
vim.keymap.set('n', '<leader>l', function()
lint.try_lint()
end, { desc = 'Trigger linting for current file' })
end,
}

View File

@ -0,0 +1,106 @@
return {
'neovim/nvim-lspconfig',
event = { 'BufReadPre', 'BufNewFile' },
dependencies = {
'hrsh7th/cmp-nvim-lsp',
{ 'antosha417/nvim-lsp-file-operations', config = true },
{ 'folke/neodev.nvim', opts = {} },
},
config = function()
-- import lspconfig plugin
local lspconfig = require('lspconfig')
-- import mason_lspconfig plugin
local mason_lspconfig = require('mason-lspconfig')
-- import cmp-nvim-lsp plugin
local cmp_nvim_lsp = require('cmp_nvim_lsp')
local keymap = vim.keymap -- for conciseness
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf, silent = true }
-- set keybinds
opts.desc = 'Show LSP references'
keymap.set('n', 'gR', '<cmd>Telescope lsp_references<CR>', opts) -- show definition, references
opts.desc = 'Go to declaration'
keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) -- go to declaration
opts.desc = 'Show LSP definitions'
keymap.set('n', 'gd', '<cmd>Telescope lsp_definitions<CR>', opts) -- show lsp definitions
opts.desc = 'Show LSP implementations'
keymap.set('n', 'gi', '<cmd>Telescope lsp_implementations<CR>', opts) -- show lsp implementations
opts.desc = 'Show LSP type definitions'
keymap.set('n', 'gt', '<cmd>Telescope lsp_type_definitions<CR>', opts) -- show lsp type definitions
opts.desc = 'See available code actions'
keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection
opts.desc = 'Smart rename'
keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts) -- smart rename
opts.desc = 'Show buffer diagnostics'
keymap.set('n', '<leader>D', '<cmd>Telescope diagnostics bufnr=0<CR>', opts) -- show diagnostics for file
opts.desc = 'Show line diagnostics'
keymap.set('n', '<leader>d', vim.diagnostic.open_float, opts) -- show diagnostics for line
opts.desc = 'Go to previous diagnostic'
keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer
opts.desc = 'Go to next diagnostic'
keymap.set('n', ']d', vim.diagnostic.goto_next, opts) -- jump to next diagnostic in buffer
opts.desc = 'Show documentation for what is under cursor'
keymap.set('n', 'K', vim.lsp.buf.hover, opts) -- show documentation for what is under cursor
opts.desc = 'Restart LSP'
keymap.set('n', '<leader>rs', ':LspRestart<CR>', opts) -- mapping to restart lsp if necessary
end,
})
-- used to enable autocompletion (assign to every lsp server config)
local capabilities = cmp_nvim_lsp.default_capabilities()
-- Change the Diagnostic symbols in the sign column (gutter)
local signs = { Error = '', Warn = '', Hint = '󰠠 ', Info = '' }
for type, icon in pairs(signs) do
local hl = 'DiagnosticSign' .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' })
end
mason_lspconfig.setup_handlers({
-- default handler for installed servers
function(server_name)
lspconfig[server_name].setup({
capabilities = capabilities,
})
end,
['lua_ls'] = function()
-- configure lua server (with special settings)
lspconfig['lua_ls'].setup({
capabilities = capabilities,
settings = {
Lua = {
-- make the language server recognize 'vim' global
diagnostics = {
globals = { 'vim' },
},
completion = {
callSnippet = 'Replace',
},
},
},
})
end,
})
end,
}

View File

@ -0,0 +1,49 @@
-- Plenary
return {
'williamboman/mason.nvim',
dependencies = {
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
},
config = function()
-- import mason
local mason = require('mason')
-- import mason-lspconfig
local mason_lspconfig = require('mason-lspconfig')
local mason_tool_installer = require('mason-tool-installer')
-- enable mason and configure icons
mason.setup({
ui = {
icons = {
package_installed = '',
package_pending = '',
package_uninstalled = '',
},
},
})
mason_lspconfig.setup({
-- list of servers for mason to install
ensure_installed = {
'html',
'cssls',
'svelte',
'lua_ls',
},
})
mason_tool_installer.setup({
ensure_installed = {
'prettier', -- prettier formatter
'stylua', -- lua formatter
'isort', -- python formatter
'black', -- python formatter
'pylint',
'eslint_d',
},
})
end,
}

View File

@ -17,9 +17,7 @@ return {
},
config = function()
local cmp = require('cmp')
local luasnip = require('luasnip')
local lspkind = require('lspkind')
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)

View File

@ -0,0 +1,15 @@
return {
'folke/trouble.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons', 'folke/todo-comments.nvim' },
opts = {
focus = true,
},
cmd = 'Trouble',
keys = {
{ '<leader>xw', '<cmd>Trouble diagnostics toggle<CR>', desc = 'Open trouble workspace diagnostics' },
{ '<leader>xd', '<cmd>Trouble diagnostics toggle filter.buf=0<CR>', desc = 'Open trouble document diagnostics' },
{ '<leader>xq', '<cmd>Trouble quickfix toggle<CR>', desc = 'Open trouble quickfix list' },
{ '<leader>xl', '<cmd>Trouble loclist toggle<CR>', desc = 'Open trouble location list' },
{ '<leader>xt', '<cmd>Trouble todo toggle<CR>', desc = 'Open todos in trouble' },
},
}

View File

@ -1,32 +1,32 @@
-- Alpha (start screen/dashboard)
return {
"goolord/alpha-nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
event = "VimEnter",
'goolord/alpha-nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
event = 'VimEnter',
config = function()
local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard")
local alpha = require('alpha')
local dashboard = require('alpha.themes.dashboard')
-- Set header
dashboard.section.header.val = {
" ",
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
" ",
' ',
' ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ',
' ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ',
' ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ',
' ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ',
' ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ',
' ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ',
' ',
}
-- Set menu
dashboard.section.buttons.val = {
dashboard.button("e", " > New File", "<cmd>ene<CR>"),
dashboard.button("SPC ee", " > Toggle file explorer", "<cmd>NvimTreeToggle<CR>"),
dashboard.button("SPC ff", "󰱼 > Find File", "<cmd>Telescope find_files<CR>"),
dashboard.button("SPC fs", " > Find Word", "<cmd>Telescope live_grep<CR>"),
dashboard.button("SPC wr", "󰁯 > Restore Session For Current Directory", "<cmd>SessionRestore<CR>"),
dashboard.button("q", " > Quit NVIM", "<cmd>qa<CR>"),
dashboard.button('e', ' > New File', '<cmd>ene<CR>'),
dashboard.button('SPC ee', ' > Toggle file explorer', '<cmd>NvimTreeToggle<CR>'),
dashboard.button('SPC ff', '󰱼 > Find File', '<cmd>Telescope find_files<CR>'),
dashboard.button('SPC fs', ' > Find Word', '<cmd>Telescope live_grep<CR>'),
dashboard.button('SPC wr', '󰁯 > Restore Session For Current Directory', '<cmd>SessionRestore<CR>'),
dashboard.button('q', ' > Quit NVIM', '<cmd>qa<CR>'),
}
-- Send config to alpha

View File

@ -1,9 +1,9 @@
-- Barbar (tabline bar)
return {
"romgrk/barbar.nvim",
'romgrk/barbar.nvim',
enabled = false,
dependencies = {
"lewis6991/gitsigns.nvim",
"nvim-tree/nvim-web-devicons",
'lewis6991/gitsigns.nvim',
'nvim-tree/nvim-web-devicons',
},
}

View File

@ -1,8 +1,8 @@
return {
"nvim-tree/nvim-tree.lua",
dependencies = "nvim-tree/nvim-web-devicons",
'nvim-tree/nvim-tree.lua',
dependencies = 'nvim-tree/nvim-web-devicons',
config = function()
local nvimtree = require('nvim-tree')
local nvimtree = require('nvim-tree')
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
@ -19,8 +19,8 @@ return {
icons = {
glyphs = {
folder = {
arrow_closed = "", -- arrow when folder is closed
arrow_open = "", -- arrow when folder is open
arrow_closed = '', -- arrow when folder is closed
arrow_open = '', -- arrow when folder is open
},
},
},

View File

@ -1,5 +1,5 @@
-- Tagbar
return {
"preservim/tagbar",
'preservim/tagbar',
enabled = false,
}

View File

@ -56,5 +56,10 @@ return {
'<cmd>Telescope grep_string<cr>',
desc = 'Find string',
},
{
'<leader>ft',
'<cmd>TodoTelescope<cr>',
desc = 'Find todos',
}
},
}

View File

@ -6,11 +6,11 @@ return {
vim.o.timeoutlen = 500
end,
config = function()
local wk = require("which-key")
local wk = require('which-key')
wk.register({
{ "<leader>e", group = "NeoTree" },
{ "<leader>f", group = "Telescope" },
{ "<leader>s", group = "splits" },
{ '<leader>e', group = 'NeoTree' },
{ '<leader>f', group = 'Telescope' },
{ '<leader>s', group = 'splits' },
})
end,
opts = { },