nvim reworked config and hyfetch
This commit is contained in:
parent
6c98426766
commit
b9aa8c6542
15 changed files with 292 additions and 0 deletions
15
hyfetch/hyfetch.json
Normal file
15
hyfetch/hyfetch.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"preset": "transgender",
|
||||
"mode": "rgb",
|
||||
"light_dark": "dark",
|
||||
"lightness": 0.65,
|
||||
"color_align": {
|
||||
"mode": "horizontal",
|
||||
"custom_colors": [],
|
||||
"fore_back": null
|
||||
},
|
||||
"backend": "neofetch",
|
||||
"distro": null,
|
||||
"pride_month_shown": [],
|
||||
"pride_month_disable": false
|
||||
}
|
28
nvim/lua/plugins/bufferline.lua
Normal file
28
nvim/lua/plugins/bufferline.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
return {
|
||||
{
|
||||
'akinsho/bufferline.nvim',
|
||||
config = function ()
|
||||
require('bufferline').setup {
|
||||
options = {
|
||||
separator_style = "thin",
|
||||
indicator = {
|
||||
style = "none"
|
||||
},
|
||||
diagnostics = "nvim_lsp",
|
||||
always_show_bufferline = false,
|
||||
offsets = {
|
||||
{
|
||||
filetype = "neo-tree",
|
||||
text = "Explorer",
|
||||
highlight = "directory",
|
||||
separator = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end,
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
},
|
||||
}
|
12
nvim/lua/plugins/dashboard.lua
Normal file
12
nvim/lua/plugins/dashboard.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
{
|
||||
'nvimdev/dashboard-nvim',
|
||||
event = 'VimEnter',
|
||||
config = function ()
|
||||
require('dashboard').setup{
|
||||
theme = "hyper"
|
||||
}
|
||||
end,
|
||||
dependencies = {{'nvim-tree/nvim-web-devicons'}}
|
||||
},
|
||||
}
|
11
nvim/lua/plugins/dracula.lua
Normal file
11
nvim/lua/plugins/dracula.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
{
|
||||
'maxmx03/dracula.nvim',
|
||||
lazy = false,
|
||||
config = function ()
|
||||
local dracula = require 'dracula'
|
||||
dracula.setup()
|
||||
vim.cmd.colorscheme 'dracula'
|
||||
end
|
||||
}
|
||||
}
|
45
nvim/lua/plugins/lspconfig.lua
Normal file
45
nvim/lua/plugins/lspconfig.lua
Normal file
|
@ -0,0 +1,45 @@
|
|||
return {
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
config = function()
|
||||
local lsp = require('lspconfig')
|
||||
lsp.rust_analyzer.setup{}
|
||||
lsp.lua_ls.setup{}
|
||||
lsp.pyright.setup{}
|
||||
lsp.tsserver.setup{}
|
||||
lsp.html.setup{}
|
||||
lsp.cssls.setup{}
|
||||
lsp.cssmodules_ls.setup{}
|
||||
lsp.astro.setup{}
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
|
||||
-- Buffer local mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local opts = { buffer = ev.buf }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
|
||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
|
||||
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
|
||||
vim.keymap.set('n', '<space>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, opts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
|
||||
vim.keymap.set('n', '<space>f', function()
|
||||
vim.lsp.buf.format { async = true }
|
||||
end, opts)
|
||||
end
|
||||
})
|
||||
|
||||
end
|
||||
}
|
||||
}
|
55
nvim/lua/plugins/lualine.lua
Normal file
55
nvim/lua/plugins/lualine.lua
Normal file
|
@ -0,0 +1,55 @@
|
|||
return {
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
config = function()
|
||||
local colors_insert = {
|
||||
line_background = '#282a36',
|
||||
line_foreground = '#f8f8f2',
|
||||
line_midtone = '#44475a',
|
||||
pink = '#ff79c6',
|
||||
ourple = '#bd93f9'
|
||||
}
|
||||
|
||||
local cake_theme_dracula = {
|
||||
insert = {
|
||||
a = { fg = colors_insert.line_background, bg = colors_insert.pink },
|
||||
b = { fg = colors_insert.line_foreground, bg = colors_insert.line_background },
|
||||
z = { fg = colors_insert.line_foreground, bg = colors_insert.line_background }
|
||||
},
|
||||
normal = {
|
||||
a = { fg = colors_insert.line_background, bg = colors_insert.ourple },
|
||||
|
||||
b = { fg = colors_insert.fg, bg = colors_insert.line_background },
|
||||
|
||||
z = { fg = colors_insert.fg, bg = colors_insert.line_background }
|
||||
},
|
||||
visual = {
|
||||
},
|
||||
replace = {
|
||||
}
|
||||
}
|
||||
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
theme = cake_theme_dracula,
|
||||
disabled_filetypes = {
|
||||
statusline = {
|
||||
"neo-tree"
|
||||
}
|
||||
},
|
||||
section_separators = "",
|
||||
component_separators = "",
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'filename', 'location'},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {'diff','branch'}
|
||||
}
|
||||
}
|
||||
end,
|
||||
dependencies = {{'nvim-tree/nvim-web-devicons'}},
|
||||
}
|
||||
}
|
8
nvim/lua/plugins/mason.lua
Normal file
8
nvim/lua/plugins/mason.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
{
|
||||
'williamboman/mason.nvim',
|
||||
config = function()
|
||||
require('mason').setup()
|
||||
end
|
||||
}
|
||||
}
|
8
nvim/lua/plugins/mkdnflow.lua
Normal file
8
nvim/lua/plugins/mkdnflow.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
{
|
||||
'jakewvincent/mkdnflow.nvim',
|
||||
config = function()
|
||||
require('mkdnflow').setup({})
|
||||
end
|
||||
}
|
||||
}
|
23
nvim/lua/plugins/neo-tree.lua
Normal file
23
nvim/lua/plugins/neo-tree.lua
Normal file
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
{
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
{'nvim-lua/plenary.nvim'},
|
||||
{'nvim-tree/nvim-web-devicons'},
|
||||
{'MunifTanjim/nui.nvim'}
|
||||
},
|
||||
config = function ()
|
||||
require("neo-tree").setup {
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true,
|
||||
|
||||
filesystem = {
|
||||
follow_current_file = {
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
}
|
9
nvim/lua/plugins/nvim-autopairs.lua
Normal file
9
nvim/lua/plugins/nvim-autopairs.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
config = function ()
|
||||
require('nvim-autopairs').setup{}
|
||||
end
|
||||
}
|
||||
}
|
37
nvim/lua/plugins/nvim-cmp.lua
Normal file
37
nvim/lua/plugins/nvim-cmp.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
return {
|
||||
{
|
||||
'hrsh7th/nvim-cmp',
|
||||
config = function()
|
||||
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
|
||||
local cmp = require('cmp')
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert ({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<TAB>'] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{name = 'nvim_lsp'},
|
||||
{name = 'luasnip'},
|
||||
{name = 'buffer'}
|
||||
}),
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
{'hrsh7th/cmp-nvim-lsp'},
|
||||
{'saadparwaiz1/cmp_luasnip'},
|
||||
{'rafamadriz/friendly-snippets'},
|
||||
{'L3MON4D3/LuaSnip'}
|
||||
}
|
||||
}
|
||||
}
|
8
nvim/lua/plugins/nvim-ts-autotag.lua
Normal file
8
nvim/lua/plugins/nvim-ts-autotag.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
{
|
||||
'windwp/nvim-ts-autotag',
|
||||
config = function ()
|
||||
require('nvim-ts-autotag').setup()
|
||||
end
|
||||
}
|
||||
}
|
6
nvim/lua/plugins/telescope.lua
Normal file
6
nvim/lua/plugins/telescope.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||
}
|
||||
}
|
15
nvim/lua/plugins/treesitter.lua
Normal file
15
nvim/lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function ()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
configs.setup({
|
||||
ensure_installed = { "c", "rust", "lua", "vim", "vimdoc", "markdown" , "javascript", "typescript", "python", "html", "astro", "tsx" },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
12
nvim/lua/plugins/trouble.lua
Normal file
12
nvim/lua/plugins/trouble.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {
|
||||
auto_open = true,
|
||||
auto_close = true,
|
||||
height = 3,
|
||||
padding = false
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue