MOOOOOREEE LAZZZYYYYYYYY
This commit is contained in:
parent
1c85ed72c9
commit
f06cd03050
12
init.lua
12
init.lua
@ -1,4 +1,4 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
@ -13,7 +13,13 @@ vim.opt.runtimepath:prepend(lazypath)
|
||||
|
||||
require 'config.settings'
|
||||
require 'config.lazy'
|
||||
require 'config.mappings'
|
||||
require 'config.autocmd'
|
||||
|
||||
vim.api.nvim_create_autocmd('User', {
|
||||
pattern = 'VeryLazy',
|
||||
callback = function()
|
||||
require 'config.autocmd'
|
||||
require 'config.mappings'
|
||||
end,
|
||||
})
|
||||
|
||||
vim.cmd 'colorscheme tokyonight'
|
||||
|
@ -9,7 +9,7 @@
|
||||
"feline.nvim": { "branch": "master", "commit": "d48b6f92c6ccdd6654c956f437be49ea160b5b0c" },
|
||||
"fm-nvim": { "branch": "master", "commit": "8e6a77049330e7c797eb9e63affd75eb796fe75e" },
|
||||
"hop.nvim": { "branch": "master", "commit": "90db1b2c61b820e230599a04fedcd2679e64bd07" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "1edd1b8945ee91cdfd61654af96c427dce285a9d" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "11eee43c7ee63a71b08009769437e8a10814a48c" },
|
||||
"lsp": { "branch": "master", "commit": "6b43ce561d97412cc512b569db6938e44529293e" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "aa25b4153d2f2636c3b3a8c8360349d2b29e7ae3" },
|
||||
"mason.nvim": { "branch": "main", "commit": "8fd6559eecbabb39c68d147f1b2cccb8d2d2d2a1" },
|
||||
@ -18,8 +18,7 @@
|
||||
"nvim-cmp": { "branch": "main", "commit": "c49ad26e894e137e401b1d294948c46327877eaf" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "760e27df4dd966607e8fb7fd8b6b93e3c7d2e193" },
|
||||
"nvim-snippy": { "branch": "master", "commit": "834820d5441e9c26de4bea4de95de5e117c058a5" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "b019eb30323635d680aa2f32e498a1831676ebb1" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "05e1072f63f6c194ac6e867b567e6b437d3d4622" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "3a621b9a8362fac358d828254485024986d6d81b" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "4b7e52044bbb84242158d977a50c4cbcd85070c7" },
|
||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "304508fb7bea78e3c0eeddd88c4837501e403ae8" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "a606bd10c79ec5989c76c49cc6f736e88b63f0da" },
|
||||
|
@ -1,6 +1,7 @@
|
||||
local M = {
|
||||
'numToStr/Comment.nvim',
|
||||
event = 'VeryLazy',
|
||||
-- event = 'VeryLazy',
|
||||
keys = { 'gcc', { 'gc', mode = 'v' }, {'gb', mode = 'v'} },
|
||||
}
|
||||
|
||||
function M.config()
|
||||
|
@ -1,7 +1,10 @@
|
||||
local M = {
|
||||
'hrsh7th/nvim-cmp',
|
||||
lazy = false,
|
||||
-- lazy = false,
|
||||
dependencies = {
|
||||
{ 'honza/vim-snippets' },
|
||||
{ 'dcampos/nvim-snippy' },
|
||||
{ 'dcampos/cmp-snippy' },
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
@ -12,7 +15,6 @@ local M = {
|
||||
|
||||
function M.config()
|
||||
local cmp = require 'cmp'
|
||||
local snippy = require 'snippy'
|
||||
|
||||
local ELLIPSIS_CHAR = '…'
|
||||
local MAX_LABEL_WIDTH = 20
|
||||
@ -87,8 +89,8 @@ function M.config()
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item { behavior = cmp.SelectBehavior.Insert }
|
||||
elseif snippy.can_expand_or_advance() then
|
||||
snippy.expand_or_advance()
|
||||
elseif require('snippy').can_expand_or_advance() then
|
||||
require('snippy').expand_or_advance()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
@ -99,8 +101,8 @@ function M.config()
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item { behavior = cmp.SelectBehavior.Insert }
|
||||
elseif snippy.can_jump(-1) then
|
||||
snippy.previous()
|
||||
elseif require('snippy').can_jump(-1) then
|
||||
require('snippy').previous()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
@ -115,7 +117,6 @@ function M.config()
|
||||
},
|
||||
}
|
||||
cmp.setup.cmdline(':', {
|
||||
completion = { autocomplete = true },
|
||||
mapping = {
|
||||
['<TAB>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
@ -153,7 +154,6 @@ function M.config()
|
||||
entries = { name = 'wildmenu', separator = ' · ' },
|
||||
},
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
return M
|
||||
|
@ -1,6 +1,7 @@
|
||||
return {
|
||||
'NvChad/nvim-colorizer.lua',
|
||||
event = 'BufReadPre',
|
||||
-- event = 'BufReadPre',
|
||||
cmd = 'ColorizerToggle',
|
||||
config = {
|
||||
filetypes = { '*', '!lazy' },
|
||||
buftype = { '*', '!prompt', '!nofile' },
|
||||
|
@ -2,9 +2,9 @@ local M = {
|
||||
'feline-nvim/feline.nvim',
|
||||
-- lazy = false
|
||||
event = 'UIEnter',
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
-- dependencies = {
|
||||
-- 'nvim-tree/nvim-web-devicons',
|
||||
-- },
|
||||
}
|
||||
|
||||
function M.config()
|
||||
@ -95,11 +95,14 @@ function M.config()
|
||||
separator = {
|
||||
provider = '',
|
||||
},
|
||||
fileinfo = {
|
||||
file_info = {
|
||||
provider = {
|
||||
name = 'file_info',
|
||||
opts = {
|
||||
colored_icon = false,
|
||||
type = 'relative-short',
|
||||
file_readonly_icon = '',
|
||||
file_modified_icon = '',
|
||||
},
|
||||
},
|
||||
hl = {
|
||||
@ -143,7 +146,8 @@ function M.config()
|
||||
provider = {
|
||||
name = 'file_type',
|
||||
opts = {
|
||||
filetype_icon = true,
|
||||
-- filetype_icon = true,
|
||||
colored_icon = false,
|
||||
case = 'titlecase',
|
||||
},
|
||||
},
|
||||
@ -196,7 +200,7 @@ function M.config()
|
||||
|
||||
local left = {
|
||||
c.vim_mode,
|
||||
c.fileinfo,
|
||||
c.file_info,
|
||||
-- c.gitBranch,
|
||||
-- c.gitDiffAdded,
|
||||
-- c.gitDiffRemoved,
|
||||
|
@ -1,22 +1,23 @@
|
||||
return {
|
||||
'nvim-lua/plenary.nvim',
|
||||
{ 'honza/vim-snippets', lazy = false },
|
||||
{ 'dcampos/nvim-snippy', lazy = false },
|
||||
{ 'dcampos/cmp-snippy', lazy = false },
|
||||
'folke/which-key.nvim',
|
||||
-- { 'kdheepak/lazygit.nvim', cmd = 'LazyGit' },
|
||||
{ 'is0n/fm-nvim', cmd = {
|
||||
{
|
||||
'is0n/fm-nvim',
|
||||
cmd = {
|
||||
'Neomutt',
|
||||
'Lazygit',
|
||||
'Lf',
|
||||
} },
|
||||
},
|
||||
},
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
{
|
||||
'phaazon/hop.nvim',
|
||||
event = 'BufRead',
|
||||
-- event = 'BufRead',
|
||||
keys = { { 's', ':HopChar2<cr>' }, { 'S', ':HopWord<cr>' } },
|
||||
config = function()
|
||||
require('hop').setup()
|
||||
vim.api.nvim_set_keymap('n', 's', ':HopChar2<cr>', { silent = true })
|
||||
vim.api.nvim_set_keymap('n', 'S', ':HopWord<cr>', { silent = true })
|
||||
end,
|
||||
},
|
||||
-- { 'dstein64/vim-startuptime', lazy = false },
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
local M = {
|
||||
'neovim/nvim-lspconfig',
|
||||
name = 'lsp',
|
||||
event = 'BufReadPre',
|
||||
event = 'BufRead',
|
||||
dependencies = { 'hrsh7th/cmp-nvim-lsp' },
|
||||
}
|
||||
|
||||
@ -142,11 +142,11 @@ function M.config()
|
||||
border = 'rounded',
|
||||
})
|
||||
|
||||
--[[ local on_references = vim.lsp.handlers['textDocument/references'] ]]
|
||||
--[[ vim.lsp.handlers['textDocument/references'] = vim.lsp.with(on_references, { ]]
|
||||
--[[ -- Use location list instead of quickfix list ]]
|
||||
--[[ loclist = true, ]]
|
||||
--[[ }) ]]
|
||||
local on_references = vim.lsp.handlers['textDocument/references']
|
||||
vim.lsp.handlers['textDocument/references'] = vim.lsp.with(on_references, {
|
||||
-- Use location list instead of quickfix list
|
||||
loclist = true,
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
|
@ -8,20 +8,13 @@ local function project_files()
|
||||
if client then
|
||||
opts.cwd = client.config.root_dir
|
||||
end
|
||||
-- require('telescope.builtin').find_files(opts)
|
||||
require('telescope').extensions.file_browser.file_browser()
|
||||
require('telescope.builtin').find_files(opts)
|
||||
end
|
||||
end
|
||||
|
||||
local M = {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
cmd = { 'Telescope' },
|
||||
keys = {
|
||||
{ '<leader><space>', project_files, desc = 'Find File' },
|
||||
},
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope-file-browser.nvim',
|
||||
},
|
||||
}
|
||||
|
||||
function M.config()
|
||||
@ -50,20 +43,6 @@ function M.config()
|
||||
|
||||
-- local fb_actions = require "telescope".extensions.file_browser.actions
|
||||
telescope.setup {
|
||||
extensions = {
|
||||
file_browser = {
|
||||
theme = 'ivy',
|
||||
-- disables netrw and use telescope-file-browser in its place
|
||||
hijack_netrw = true,
|
||||
mappings = {
|
||||
['i'] = {
|
||||
},
|
||||
['n'] = {
|
||||
-- your custom normal mode mappings
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
theme = 'dropdown',
|
||||
|
@ -8,25 +8,25 @@ function M.config()
|
||||
local configs = require 'nvim-treesitter.configs'
|
||||
|
||||
configs.setup {
|
||||
ensure_installed = {
|
||||
'bash',
|
||||
'c',
|
||||
'cpp',
|
||||
'go',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'json',
|
||||
'lua',
|
||||
'python',
|
||||
'rust',
|
||||
'html',
|
||||
'css',
|
||||
'toml',
|
||||
'latex',
|
||||
'markdown',
|
||||
'vim',
|
||||
'dot',
|
||||
},
|
||||
-- ensure_installed = {
|
||||
-- 'bash',
|
||||
-- 'c',
|
||||
-- 'cpp',
|
||||
-- 'go',
|
||||
-- 'javascript',
|
||||
-- 'typescript',
|
||||
-- 'json',
|
||||
-- 'lua',
|
||||
-- 'python',
|
||||
-- 'rust',
|
||||
-- 'html',
|
||||
-- 'css',
|
||||
-- 'toml',
|
||||
-- 'latex',
|
||||
-- 'markdown',
|
||||
-- 'vim',
|
||||
-- 'dot',
|
||||
-- },
|
||||
ignore_install = { 'haskell' },
|
||||
-- matchup = {
|
||||
-- enable = true -- mandatory, false will disable the whole extension
|
||||
|
@ -1,8 +1,8 @@
|
||||
local M = {
|
||||
'folke/trouble.nvim',
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
-- dependencies = {
|
||||
-- 'nvim-tree/nvim-web-devicons',
|
||||
-- },
|
||||
cmd = { 'TroubleToggle', 'Trouble' },
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ function M.config()
|
||||
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
|
||||
icons = false, -- use devicons for filenames
|
||||
mode = 'document_diagnostics', -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
||||
fold_open = '', -- icon used for open folds
|
||||
fold_closed = '', -- icon used for closed folds
|
||||
|
Loading…
Reference in New Issue
Block a user