chore(config): refactor packer config
parent
bf1f97089f
commit
62dec63cae
|
@ -1,6 +1,5 @@
|
||||||
-- https://github.com/vscode-neovim/vscode-neovim
|
-- https://github.com/vscode-neovim/vscode-neovim
|
||||||
if not vim.g.vscode then
|
if not vim.g.vscode then
|
||||||
vim.opt.breakindent = true
|
|
||||||
vim.opt.completeopt = { "menuone", "noinsert", "noselect" }
|
vim.opt.completeopt = { "menuone", "noinsert", "noselect" }
|
||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
vim.opt.title = true
|
vim.opt.title = true
|
||||||
|
@ -17,6 +16,14 @@ if not vim.g.vscode then
|
||||||
vim.opt.shiftwidth = 4
|
vim.opt.shiftwidth = 4
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
|
-- Wrap
|
||||||
|
vim.opt.breakindent = true
|
||||||
|
|
||||||
|
-- Truecolor
|
||||||
|
if vim.env.COLORTERM == "truecolor" then
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
end
|
||||||
|
|
||||||
-- Clipboard support
|
-- Clipboard support
|
||||||
vim.opt.clipboard:append({ "unnamedplus" })
|
vim.opt.clipboard:append({ "unnamedplus" })
|
||||||
|
|
||||||
|
@ -73,37 +80,11 @@ if not vim.g.vscode then
|
||||||
use("axelf4/vim-strip-trailing-whitespace")
|
use("axelf4/vim-strip-trailing-whitespace")
|
||||||
|
|
||||||
-- https://github.com/nvim-lualine/lualine.nvim
|
-- https://github.com/nvim-lualine/lualine.nvim
|
||||||
use("nvim-lualine/lualine.nvim")
|
use({
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
-- https://github.com/kyazdani42/nvim-tree.lua
|
config = function()
|
||||||
use("kyazdani42/nvim-tree.lua")
|
|
||||||
|
|
||||||
-- https://github.com/lukas-reineke/indent-blankline.nvim
|
|
||||||
use("lukas-reineke/indent-blankline.nvim")
|
|
||||||
|
|
||||||
-- https://github.com/junegunn/fzf.vim
|
|
||||||
use("junegunn/fzf.vim")
|
|
||||||
|
|
||||||
-- Colorschemes
|
|
||||||
-- https://github.com/cocopon/iceberg.vim
|
|
||||||
use("cocopon/iceberg.vim")
|
|
||||||
|
|
||||||
-- https://github.com/catppuccin/nvim
|
|
||||||
use({ "catppuccin/nvim", as = "catppuccin" })
|
|
||||||
|
|
||||||
-- Programming languages
|
|
||||||
-- https://github.com/sbdchd/neoformat
|
|
||||||
use("sbdchd/neoformat")
|
|
||||||
|
|
||||||
-- https://github.com/fatih/vim-go
|
|
||||||
use("fatih/vim-go")
|
|
||||||
|
|
||||||
-- https://github.com/github/copilot.vim
|
|
||||||
use("github/copilot.vim")
|
|
||||||
end)
|
|
||||||
|
|
||||||
local lualine_theme = require("lualine.themes.iceberg")
|
local lualine_theme = require("lualine.themes.iceberg")
|
||||||
if vim.env.COLORTERM == "truecolor" then
|
if vim.opt.termguicolors then
|
||||||
lualine_theme = require("lualine.themes.catppuccin")
|
lualine_theme = require("lualine.themes.catppuccin")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -114,9 +95,15 @@ if not vim.g.vscode then
|
||||||
component_separators = { left = "", right = "" },
|
component_separators = { left = "", right = "" },
|
||||||
section_separators = { left = "", right = "" },
|
section_separators = { left = "", right = "" },
|
||||||
},
|
},
|
||||||
extensions = { "fzf", "nvim-tree", "toggleterm" },
|
extensions = { "fzf", "nvim-tree" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- https://github.com/kyazdani42/nvim-tree.lua
|
||||||
|
use({
|
||||||
|
"kyazdani42/nvim-tree.lua",
|
||||||
|
config = function()
|
||||||
require("nvim-tree").setup({
|
require("nvim-tree").setup({
|
||||||
renderer = {
|
renderer = {
|
||||||
icons = {
|
icons = {
|
||||||
|
@ -136,11 +123,39 @@ if not vim.g.vscode then
|
||||||
custom = { "^\\.git$" },
|
custom = { "^\\.git$" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- https://github.com/lukas-reineke/indent-blankline.nvim
|
||||||
|
use({
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
config = function()
|
||||||
require("indent_blankline").setup()
|
require("indent_blankline").setup()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- https://github.com/junegunn/fzf.vim
|
||||||
|
use("junegunn/fzf.vim")
|
||||||
|
|
||||||
|
-- https://github.com/Pocco81/true-zen.nvim
|
||||||
|
use({
|
||||||
|
"Pocco81/true-zen.nvim",
|
||||||
|
config = function()
|
||||||
|
require("true-zen").setup()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Colorschemes
|
||||||
|
-- https://github.com/cocopon/iceberg.vim
|
||||||
|
use("cocopon/iceberg.vim")
|
||||||
|
|
||||||
|
-- https://github.com/catppuccin/nvim
|
||||||
|
use({
|
||||||
|
"catppuccin/nvim",
|
||||||
|
as = "catppuccin",
|
||||||
|
config = function()
|
||||||
local catppuccin_term_colors = false
|
local catppuccin_term_colors = false
|
||||||
if vim.env.COLORTERM == "truecolor" then
|
if vim.opt.termguicolors then
|
||||||
catppuccin_term_colors = true
|
catppuccin_term_colors = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -150,9 +165,21 @@ if not vim.g.vscode then
|
||||||
enabled = true,
|
enabled = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
if vim.env.COLORTERM == "truecolor" then
|
-- Programming languages
|
||||||
vim.opt.termguicolors = true
|
-- https://github.com/sbdchd/neoformat
|
||||||
|
use("sbdchd/neoformat")
|
||||||
|
|
||||||
|
-- https://github.com/fatih/vim-go
|
||||||
|
use("fatih/vim-go")
|
||||||
|
|
||||||
|
-- https://github.com/github/copilot.vim
|
||||||
|
use("github/copilot.vim")
|
||||||
|
end)
|
||||||
|
|
||||||
|
if vim.opt.termguicolors then
|
||||||
vim.cmd([[ colorscheme catppuccin ]])
|
vim.cmd([[ colorscheme catppuccin ]])
|
||||||
else
|
else
|
||||||
vim.cmd([[ colorscheme iceberg ]])
|
vim.cmd([[ colorscheme iceberg ]])
|
||||||
|
|
Loading…
Reference in New Issue