basic sevi-kun setup - adding pretty plugins & basic config

This commit is contained in:
Lord Of Nougate 2023-06-28 22:31:25 +02:00
parent 15111112af
commit b43efb0bb5
6 changed files with 308 additions and 38 deletions

View File

@ -0,0 +1 @@
require("autoclose").setup()

153
after/plugin/barbecue.lua Normal file
View File

@ -0,0 +1,153 @@
require("barbecue").setup({
---Whether to attach navic to language servers automatically.
---
---@type boolean
attach_navic = true,
---Whether to create winbar updater autocmd.
---
---@type boolean
create_autocmd = true,
---Buftypes to enable winbar in.
---
---@type string[]
include_buftypes = { "" },
---Filetypes not to enable winbar in.
---
---@type string[]
exclude_filetypes = { "netrw", "toggleterm" },
modifiers = {
---Filename modifiers applied to dirname.
---
---See: `:help filename-modifiers`
---
---@type string
dirname = ":~:.",
---Filename modifiers applied to basename.
---
---See: `:help filename-modifiers`
---
---@type string
basename = "",
},
---Whether to display path to file.
---
---@type boolean
show_dirname = true,
---Whether to display file name.
---
---@type boolean
show_basename = true,
---Whether to replace file icon with the modified symbol when buffer is
---modified.
---
---@type boolean
show_modified = false,
---Get modified status of file.
---
---NOTE: This can be used to get file modified status from SCM (e.g. git)
---
---@type fun(bufnr: number): boolean
modified = function(bufnr) return vim.bo[bufnr].modified end,
---Whether to show/use navic in the winbar.
---
---@type boolean
show_navic = true,
---Get leading custom section contents.
---
---NOTE: This function shouldn't do any expensive actions as it is run on each
---render.
---
---@type fun(bufnr: number, winnr: number): barbecue.Config.custom_section
lead_custom_section = function() return " " end,
---@alias barbecue.Config.custom_section
---|string # Literal string.
---|{ [1]: string, [2]: string? }[] # List-like table of `[text, highlight?]` tuples in which `highlight` is optional.
---
---Get custom section contents.
---
---NOTE: This function shouldn't do any expensive actions as it is run on each
---render.
---
---@type fun(bufnr: number, winnr: number): barbecue.Config.custom_section
custom_section = function() return " " end,
---@alias barbecue.Config.theme
---|'"auto"' # Use your current colorscheme's theme or generate a theme based on it.
---|string # Theme located under `barbecue.theme` module.
---|barbecue.Theme # Same as '"auto"' but override it with the given table.
---
---Theme to be used for generating highlight groups dynamically.
---
---@type barbecue.Config.theme
theme = "auto",
---Whether context text should follow its icon's color.
---
---@type boolean
context_follow_icon_color = false,
symbols = {
---Modification indicator.
---
---@type string
modified = "",
---Truncation indicator.
---
---@type string
ellipsis = "",
---Entry separator.
---
---@type string
separator = "",
},
---@alias barbecue.Config.kinds
---|false # Disable kind icons.
---|table<string, string> # Type to icon mapping.
---
---Icons for different context entry kinds.
---
---@type barbecue.Config.kinds
kinds = {
File = "",
Module = "",
Namespace = "",
Package = "",
Class = "",
Method = "",
Property = "",
Field = "",
Constructor = "",
Enum = "",
Interface = "",
Function = "",
Variable = "",
Constant = "",
String = "",
Number = "",
Boolean = "",
Array = "",
Object = "",
Key = "",
Null = "",
EnumMember = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
},
})

View File

@ -0,0 +1,7 @@
vim.opt.termguicolors = true
require("bufferline").setup({
options = {
style_preset = "minimal",
diagnostics = "nvim_lsp"
}
})

75
after/plugin/neotree.lua Normal file
View File

@ -0,0 +1,75 @@
vim.keymap.set("n", "<leader>.", vim.cmd.NeoTreeRevealToggle)
require("neo-tree").setup({
default_component_configs = {
icon = {
folder_empty = "󰜌",
folder_empty_open = "󰜌",
},
git_status = {
symbols = {
renamed = "󰁕",
unstaged = "󰄱",
},
},
},
document_symbols = {
kinds = {
File = { icon = "󰈙", hl = "Tag" },
Namespace = { icon = "󰌗", hl = "Include" },
Package = { icon = "󰏖", hl = "Label" },
Class = { icon = "󰌗", hl = "Include" },
Property = { icon = "󰆧", hl = "@property" },
Enum = { icon = "󰒻", hl = "@number" },
Function = { icon = "󰊕", hl = "Function" },
String = { icon = "󰀬", hl = "String" },
Number = { icon = "󰎠", hl = "Number" },
Array = { icon = "󰅪", hl = "Type" },
Object = { icon = "󰅩", hl = "Type" },
Key = { icon = "󰌋", hl = "" },
Struct = { icon = "󰌗", hl = "Type" },
Operator = { icon = "󰆕", hl = "Operator" },
TypeParameter = { icon = "󰊄", hl = "Type" },
StaticMethod = { icon = '󰠄 ', hl = 'Function' },
}
},
-- Add this section only if you've configured source selector.
source_selector = {
sources = {
{ source = "filesystem", display_name = " 󰉓 Files " },
{ source = "git_status", display_name = " 󰊢 Git " },
},
},
-- Other options ...
close_if_last_window = false,
enable_git_status = true,
name = {
trailing_slash = true,
use_git_status_colors = true
},
window = {
position = "left",
width = 40,
mapping_options = {
noremap = true,
nowait = true,
},
},
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 = "",
}
}
})

View File

@ -1,6 +1,6 @@
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = { "javascript", "typescript", "php", "c", "rust", "bash", "lua", "vim", "vimdoc", "query" },
ensure_installed = { "python", "javascript", "typescript", "php", "c", "rust", "bash", "lua", "vim", "vimdoc", "query" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,

View File

@ -7,12 +7,24 @@ return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- treesitter
use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
use('nvim-treesitter/playground')
use('nvim-treesitter/nvim-treesitter-context')
-- useful
use {
'nvim-telescope/telescope.nvim', tag = '0.1.1',
-- or , branch = '0.1.x',
requires = { {'nvim-lua/plenary.nvim'} }
}
use('ThePrimeagen/harpoon')
use('mbbill/undotree')
use('tpope/vim-fugitive')
use('m4xshen/autoclose.nvim')
-- pretty
use({
'catppuccin/nvim',
as = 'mocha',
@ -21,15 +33,37 @@ return require('packer').startup(function(use)
end
})
use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
use('nvim-treesitter/playground')
use({
"utilyre/barbecue.nvim",
tag = "*",
requires = {
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons", -- optional dependency
},
after = "nvim-web-devicons", -- keep this if you're using NvChad
config = function()
require("barbecue").setup()
end,
})
use('ThePrimeagen/harpoon')
use {
'akinsho/bufferline.nvim',
tag = "*",
requires = 'nvim-tree/nvim-web-devicons'
}
use('mbbill/undotree')
use {
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
requires = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
}
}
use('tpope/vim-fugitive')
-- lsp
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v2.x',