fully on lazy! cleaned up some plugins
This commit is contained in:
@ -1,55 +1,74 @@
|
||||
-----------------------------------------------------------
|
||||
-- Dashboard configuration file
|
||||
-- startify configuration file
|
||||
-----------------------------------------------------------
|
||||
|
||||
-- Plugin: alpha-nvim
|
||||
-- url: https://github.com/goolord/alpha-nvim
|
||||
|
||||
-- For configuration examples see: https://github.com/goolord/alpha-nvim/discussions/16
|
||||
|
||||
return {
|
||||
"goolord/alpha-nvim",
|
||||
dependencies = {
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
},
|
||||
config = function ()
|
||||
local alpha = require 'alpha'
|
||||
local dashboard = require 'alpha.themes.dashboard'
|
||||
-- Banner
|
||||
dashboard.section.header.val = {
|
||||
local alpha = require'alpha'
|
||||
local startify = require'alpha.themes.startify'
|
||||
|
||||
[[ ]],
|
||||
[[ █████ █████ ██████ █████ ███ ]],
|
||||
[[ ░░███ ░░███ ░░██████ ░░███ ░███ ]],
|
||||
[[ ░███ ░███ ██████ █████ ████ ░███░███ ░███ ██████ ████████ █████████████ ░███ ]],
|
||||
[[ ░███████████ ███░░███░░███ ░███ ░███░░███░███ ███░░███░░███░░███░░███░░███░░██ ]],
|
||||
[[ ░███░░░░░███ ░███████ ░███ ░███ ░███ ░░██████ ░███ ░███ ░███ ░░░ ░███ ░███ ░███░███ ]],
|
||||
[[ ░███ ░███ ░███░░░ ░███ ░███ ░███ ░░█████ ░███ ░███ ░███ ░███ ░███ ░███░░░ ]],
|
||||
[[ █████ █████░░██████ ░░███████ █████ ░░█████░░██████ █████ █████░███ ████████ ]],
|
||||
[[ ░░░░░ ░░░░░ ░░░░░░ ░░░░░███ ░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░ ░░░░░░░░ ]],
|
||||
[[ ███ ░███ ]],
|
||||
[[ ░░██████ ]],
|
||||
[[ ░░░░░░ ]],
|
||||
startify.section.header.val = {
|
||||
" ",
|
||||
" █████ █████ ██████ █████ ███ ",
|
||||
"░░███ ░░███ ░░██████ ░░███ ░███ ",
|
||||
" ░███ ░███ ██████ █████ ████ ░███░███ ░███ ██████ ████████ █████████████ ░███ ",
|
||||
" ░███████████ ███░░███░░███ ░███ ░███░░███░███ ███░░███░░███░░███░░███░░███░░███░███ ",
|
||||
" ░███░░░░░███ ░███████ ░███ ░███ ░███ ░░██████ ░███ ░███ ░███ ░░░ ░███ ░███ ░███░███ ",
|
||||
" ░███ ░███ ░███░░░ ░███ ░███ ░███ ░░█████ ░███ ░███ ░███ ░███ ░███ ░███░░░ ",
|
||||
" █████ █████░░██████ ░░███████ █████ ░░█████░░██████ █████ █████░███ ████████ ",
|
||||
"░░░░░ ░░░░░ ░░░░░░ ░░░░░███ ░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░ ░░░░░░░░ ",
|
||||
" ███ ░███ ",
|
||||
" ░░██████ ",
|
||||
" ░░░░░░ ",
|
||||
}
|
||||
|
||||
|
||||
--[[ startify.section.mru.val = {
|
||||
{ type = "text",
|
||||
val = findtodos,
|
||||
opts = {
|
||||
position = "left",
|
||||
hl = {{"hl_group", 0, -2}}
|
||||
}
|
||||
}
|
||||
}--]]
|
||||
startify.section.mru_cwd.val = { { type = "padding", val = 0 } }
|
||||
|
||||
-- Devicons - Not sure what this doe
|
||||
startify.nvim_web_devicons.enabled = false
|
||||
startify.nvim_web_devicons.highlight = false
|
||||
startify.nvim_web_devicons.highlight = 'Number'
|
||||
|
||||
-- Top Menu
|
||||
startify.section.top_buttons.val = {
|
||||
startify.button('e', ' New file', ':ene <BAR> startinsert<CR>'),
|
||||
startify.button('f', ' Find file', ':Telescope file_browser<CR>'),
|
||||
startify.button('s', '⋅Find Word', ':Telescope live_grep<CR>'),
|
||||
startify.button('t', '& Todo List', ':TodoTrouble keywords=TODO<CR>'),
|
||||
startify.button('r', ' ' .. ' Recent files', ':Telescope oldfiles <CR>'),
|
||||
startify.button('u', ' Show plugins', ':Lazy<CR>'),
|
||||
startify.button('q', ' Quit', ':qa<CR>'),
|
||||
}
|
||||
|
||||
-- Bottom Menu
|
||||
startify.section.bottom_buttons.val = {
|
||||
-- Show Empty Space
|
||||
}
|
||||
|
||||
-- Menu
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button('e', ' New file', ':ene <BAR> startinsert<CR>'),
|
||||
dashboard.button('f', ' Find file', ':Telescope file_browser<CR>'),
|
||||
dashboard.button('s', '⋅ Find Word', ':Telescope live_grep<CR>'),
|
||||
dashboard.button('u', ' Update plugins', ':PackerUpdate<CR>'),
|
||||
dashboard.button('q', ' Quit', ':qa<CR>'),
|
||||
}
|
||||
|
||||
local handle = io.popen('fortune')
|
||||
-- Footer
|
||||
local function footer()
|
||||
local version = vim.version()
|
||||
--[[ local function footer()
|
||||
local version = vim.version()
|
||||
local print_version = "v" .. version.major .. '.' .. version.minor .. '.' .. version.patch
|
||||
local datetime = os.date('%Y/%m/%d %H:%M:%S')
|
||||
return print_version .. ' ' .. datetime
|
||||
end
|
||||
dashboard.section.footer.val = footer()
|
||||
alpha.setup(dashboard.config)
|
||||
end
|
||||
}
|
||||
--]]
|
||||
|
||||
startify.section.footer.val = {
|
||||
|
||||
}
|
||||
alpha.setup(startify.config)
|
||||
end
|
||||
}
|
||||
|
||||
38
lua/plugins/headlines.lua
Normal file
38
lua/plugins/headlines.lua
Normal file
@ -0,0 +1,38 @@
|
||||
return {
|
||||
'lukas-reineke/headlines.nvim',
|
||||
}
|
||||
--[[ config = function()
|
||||
require("headlines").setup {
|
||||
markdown = {
|
||||
query = vim.treesitter.parse_query(
|
||||
"markdown",
|
||||
[[
|
||||
(atx_heading [
|
||||
(atx_h1_marker)
|
||||
(atx_h2_marker)
|
||||
(atx_h3_marker)
|
||||
(atx_h4_marker)
|
||||
(atx_h5_marker)
|
||||
(atx_h6_marker)
|
||||
] @headline)
|
||||
|
||||
(thematic_break) @dash
|
||||
|
||||
(fenced_code_block) @codeblock
|
||||
|
||||
(block_quote_marker) @quote
|
||||
(block_quote (paragraph (inline (block_continuation) @quote)))
|
||||
|
||||
),
|
||||
headline_highlights = { "Headline" },
|
||||
codeblock_highlight = "CodeBlock",
|
||||
dash_highlight = "Dash",
|
||||
dash_string = "-",
|
||||
quote_highlight = "Quote",
|
||||
quote_string = "┃",
|
||||
fat_headlines = true,
|
||||
},
|
||||
}
|
||||
end
|
||||
}
|
||||
--]]
|
||||
@ -5,70 +5,28 @@ return {
|
||||
-- They should be pulled first!
|
||||
-----------------------------------------------------------------
|
||||
|
||||
-- Easy Way to install Language Servers
|
||||
{ 'williamboman/mason.nvim',
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end
|
||||
},
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'neovim/nvim-lspconfig',
|
||||
|
||||
-- Manage all your Keymaps!
|
||||
{
|
||||
"lazytanuki/nvim-mapper",
|
||||
config = function() require("nvim-mapper").setup{} end,
|
||||
before = "telescope.nvim"
|
||||
},
|
||||
},
|
||||
|
||||
-- Neovim Autocomplete with LSP
|
||||
{
|
||||
'hrsh7th/nvim-cmp',
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
'L3MON4D3/LuaSnip',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'hrsh7th/nvim-cmp',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'hrsh7th/cmp-nvim-lsp-signature-help',
|
||||
'f3fora/cmp-spell',
|
||||
}
|
||||
},
|
||||
{
|
||||
'L3MON4D3/LuaSnip', tag = "v1.1.0",
|
||||
wants = { "friendly-snippets", "vim-snippets" },
|
||||
},
|
||||
|
||||
-- Treesitter interface
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = function() require('nvim-treesitter.install').update({ with_sync = true }) end,
|
||||
},
|
||||
|
||||
-- Null-LS
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
config = function()
|
||||
require("null-ls").setup({
|
||||
debug = true,
|
||||
})
|
||||
end,
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
------------------------------------------------------------
|
||||
-- General Functionality
|
||||
------------------------------------------------------------
|
||||
-- Change Color of virtual column bar
|
||||
-- 'lukas-reineke/virt-column.nvim'
|
||||
|
||||
'kdheepak/lazygit.nvim',
|
||||
-- Tmux Navigation
|
||||
{
|
||||
"aserowy/tmux.nvim",
|
||||
config = function() require("tmux").setup() end
|
||||
},
|
||||
},
|
||||
-- Find & Search LSP Tags
|
||||
'liuchengxu/vista.vim',
|
||||
|
||||
@ -84,7 +42,7 @@ return {
|
||||
-- Trouble Shows Errors with Files.
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
dependencies = "kyazdani42/nvim-web-devicons",
|
||||
dependencies = { 'kyazdani42/nvim-web-devicons' },
|
||||
config = function()
|
||||
require("trouble").setup {
|
||||
}
|
||||
@ -156,7 +114,7 @@ return {
|
||||
wrap = true
|
||||
})
|
||||
end
|
||||
},
|
||||
},
|
||||
|
||||
{ "iamcco/markdown-preview.nvim", build = "cd app && npm install", setup = function() vim.g.mkdp_filetypes = {
|
||||
"markdown" } end, ft = { "markdown" }, },
|
||||
@ -164,8 +122,8 @@ return {
|
||||
-- Prettier Plugin for Neovim specifically
|
||||
'MunifTanjim/prettier.nvim',
|
||||
|
||||
-- DAP (Debug adaptor Protocol)
|
||||
'mfussenegger/nvim-dap',
|
||||
-- DAP (Debug adaptor Protocol)
|
||||
'mfussenegger/nvim-dap',
|
||||
|
||||
{
|
||||
'mfussenegger/nvim-dap-python',
|
||||
@ -174,7 +132,7 @@ return {
|
||||
'~/.virtualenvs/debugpy/bin/python'
|
||||
)
|
||||
end
|
||||
},
|
||||
},
|
||||
-- Sidebar
|
||||
{
|
||||
'sidebar-nvim/sidebar.nvim',
|
||||
@ -199,13 +157,9 @@ return {
|
||||
-- Text, Icons, Symbols
|
||||
----------------------------------------------------------
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
|
||||
'simrat39/symbols-outline.nvim',
|
||||
|
||||
-- 'nvim-tree/nvim-web-devicons',
|
||||
|
||||
'folke/lsp-colors.nvim',
|
||||
|
||||
'karb94/neoscroll.nvim',
|
||||
|
||||
-- Allow Popups for Telescope etc
|
||||
@ -243,15 +197,13 @@ return {
|
||||
default = { "Identifier", "#7C3AED" },
|
||||
test = { "Identifier", "#FF00FF" }
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
},
|
||||
-- The all famous telescope
|
||||
{
|
||||
"nvim-telescope/telescope-file-browser.nvim"
|
||||
},
|
||||
-- Various telescopes
|
||||
'nvim-telescope/telescope-file-browser.nvim',
|
||||
|
||||
{
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = 'make'
|
||||
},
|
||||
@ -263,8 +215,8 @@ return {
|
||||
'gbprod/nord.nvim',
|
||||
'Mofiqul/dracula.nvim',
|
||||
'lunarvim/colorschemes',
|
||||
{ 'rose-pine/neovim', as = 'rose-pine' },
|
||||
{ "catppuccin/nvim", as = "catppuccin" },
|
||||
'rose-pine/neovim',
|
||||
'catppuccin/nvim',
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false, -- make sure we load this during startup if it is your main colorscheme
|
||||
@ -278,11 +230,10 @@ return {
|
||||
'feline-nvim/feline.nvim',
|
||||
dependencies = { 'kyazdani42/nvim-web-devicons' },
|
||||
},
|
||||
{"ellisonleao/glow.nvim"},
|
||||
'ellisonleao/glow.nvim',
|
||||
-- Plugin that causes your code to crumble >:)
|
||||
'eandrju/cellular-automaton.nvim',
|
||||
-- 'eandrju/cellular-automaton.nvim',
|
||||
|
||||
-- Wakatime Tracking
|
||||
'wakatime/vim-wakatime'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
22
lua/plugins/mason.lua
Normal file
22
lua/plugins/mason.lua
Normal file
@ -0,0 +1,22 @@
|
||||
return {
|
||||
-- Easy Way to install Language Servers
|
||||
{ 'williamboman/mason.nvim',
|
||||
},
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'neovim/nvim-lspconfig',
|
||||
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
local lsp_installer = require("mason-lspconfig").setup({
|
||||
automatic_instalsation = true,
|
||||
ui = {
|
||||
icons = {
|
||||
server_installed = "✓",
|
||||
server_pending = "➜",
|
||||
server_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
}
|
||||
22
lua/plugins/null-ls.lua
Normal file
22
lua/plugins/null-ls.lua
Normal file
@ -0,0 +1,22 @@
|
||||
return {
|
||||
'jose-elias-alvarez/null-ls.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
config = function ()
|
||||
local null_ls = require'null-ls'
|
||||
null_ls.setup({
|
||||
debug = true,
|
||||
sources = {
|
||||
null_ls.builtins.completion.spell,
|
||||
null_ls.builtins.diagnostics.alex,
|
||||
null_ls.builtins.diagnostics.codespell,
|
||||
null_ls.builtins.diagnostics.markdownlint.with({ extra_args = { "--disable", "MD013", "MD024", "--" }
|
||||
,}),
|
||||
null_ls.builtins.diagnostics.pycodestyle.with({ extra_args = { "--max-line-length=150" }}),
|
||||
null_ls.builtins.formatting.black.with({ extra_args = { "--fast" }}),
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
-- TODO: Add a keymapping for alex. i.e ':! alex'
|
||||
83
lua/plugins/nvim-cmp.lua
Normal file
83
lua/plugins/nvim-cmp.lua
Normal file
@ -0,0 +1,83 @@
|
||||
return {
|
||||
'hrsh7th/nvim-cmp',
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
'L3MON4D3/LuaSnip',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'hrsh7th/nvim-cmp',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'hrsh7th/cmp-nvim-lsp-signature-help',
|
||||
'f3fora/cmp-spell',
|
||||
},
|
||||
config = function ()
|
||||
local cmp_status_ok, cmp = pcall(require, 'cmp')
|
||||
if not cmp_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local luasnip_status_ok, luasnip = pcall(require, 'luasnip')
|
||||
if not luasnip_status_ok then
|
||||
return
|
||||
end
|
||||
--cmp.setup {
|
||||
-- Load snippet support
|
||||
--snippet = {
|
||||
-- expand = function(args)
|
||||
-- luasnip.lsp_expand(args.body)
|
||||
-- },
|
||||
|
||||
-- Completion settings
|
||||
completion = {
|
||||
--completeopt = 'menu,menuone,noselect'
|
||||
keyword_length = 2
|
||||
}
|
||||
|
||||
-- Key mapping
|
||||
mapping = {
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping({
|
||||
i = cmp.mapping.abort(),
|
||||
c = cmp.mapping.close(),
|
||||
}),
|
||||
["<C-y>"] = cmp.config.disable,
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
select = false,
|
||||
},
|
||||
-- Tab mapping
|
||||
['<Tab>'] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
['<S-Tab>'] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
-- Load sources, see: https://github.com/topics/nvim-cmp
|
||||
sources = {
|
||||
{ name = 'nvim-lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'zsh' },
|
||||
}
|
||||
end
|
||||
}
|
||||
24
lua/plugins/nvim-treesitter.lua
Normal file
24
lua/plugins/nvim-treesitter.lua
Normal file
@ -0,0 +1,24 @@
|
||||
--local status_ok, nvim_treesitter = pcall(require, 'nvim-treesitter.configs')
|
||||
--if not status_ok then
|
||||
-- return
|
||||
--end
|
||||
|
||||
return {
|
||||
-- Treesitter interface
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
--build = ":TSUpdate"
|
||||
config = function ()
|
||||
require('nvim-treesitter.install').update({ with_sync = true })
|
||||
-- A list of parser names, or "all"
|
||||
ensure_installed = {
|
||||
'bash', 'css', 'html', 'javascript', 'json', 'lua', 'python',
|
||||
'vim', 'yaml', 'typescript', 'markdown',
|
||||
}
|
||||
sync_install = true
|
||||
highlight = {
|
||||
-- `false` will disable the whole extension
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = true,
|
||||
}
|
||||
end
|
||||
}
|
||||
@ -5,10 +5,6 @@ return {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-telescope/telescope-live-grep-args.nvim',
|
||||
},
|
||||
require("telescope").load_extension "file_browser",
|
||||
require("telescope").load_extension "mapper",
|
||||
require("telescope").load_extension "live_grep_args",
|
||||
require("telescope").load_extension "fzf",
|
||||
|
||||
config = function ()
|
||||
local g = vim.g
|
||||
@ -154,7 +150,11 @@ return {
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
require("telescope").load_extension "file_browser"
|
||||
require("telescope").load_extension "mapper"
|
||||
require("telescope").load_extension "live_grep_args"
|
||||
require("telescope").load_extension "fzf"
|
||||
end
|
||||
|
||||
}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user