mirror of
https://github.com/The-Repo-Club/DotFiles.git
synced 2024-11-25 00:38:20 -05:00
Update NVim
This commit is contained in:
parent
3cc6bcd8c8
commit
bb51bf2e74
@ -10,7 +10,6 @@ require "user.treesitter"
|
||||
require "user.autopairs"
|
||||
require "user.comment"
|
||||
require "user.gitsigns"
|
||||
require "user.nvim-tree"
|
||||
require "user.bufferline"
|
||||
require "user.lualine"
|
||||
require "user.toggleterm"
|
||||
|
@ -17,7 +17,7 @@ bufferline.setup({
|
||||
icon = "▎",
|
||||
style = "icon",
|
||||
},
|
||||
buffer_close_icon = "",
|
||||
buffer_close_icon = "",
|
||||
-- buffer_close_icon = '',
|
||||
modified_icon = "●",
|
||||
close_icon = "",
|
||||
@ -76,7 +76,7 @@ bufferline.setup({
|
||||
},
|
||||
highlights = {
|
||||
fill = {
|
||||
fg = { attribute = "fg", highlight = "#ff0000" },
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
},
|
||||
background = {
|
||||
@ -85,8 +85,10 @@ bufferline.setup({
|
||||
},
|
||||
|
||||
buffer_selected = {
|
||||
fg = { attribute = "fg", highlight = "#ff0000" },
|
||||
bg = { attribute = "bg", highlight = "#0000ff" },
|
||||
fg = { attribute = "fg", highlight = "TabLine" },
|
||||
bg = { attribute = "bg", highlight = "TabLine" },
|
||||
bold = false,
|
||||
italic = false,
|
||||
},
|
||||
|
||||
buffer_visible = {
|
||||
|
@ -1,67 +0,0 @@
|
||||
local status_ok, nvim_tree = pcall(require, "nvim-tree")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config")
|
||||
if not config_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local tree_cb = nvim_tree_config.nvim_tree_callback
|
||||
|
||||
nvim_tree.setup({
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_cwd = true,
|
||||
},
|
||||
renderer = {
|
||||
root_folder_modifier = ":t",
|
||||
icons = {
|
||||
glyphs = {
|
||||
default = "",
|
||||
symlink = "",
|
||||
folder = {
|
||||
arrow_open = "",
|
||||
arrow_closed = "",
|
||||
default = "",
|
||||
open = "",
|
||||
empty = "",
|
||||
empty_open = "",
|
||||
symlink = "",
|
||||
symlink_open = "",
|
||||
},
|
||||
git = {
|
||||
unstaged = "",
|
||||
staged = "S",
|
||||
unmerged = "",
|
||||
renamed = "➜",
|
||||
untracked = "U",
|
||||
deleted = "",
|
||||
ignored = "◌",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
show_on_dirs = true,
|
||||
icons = {
|
||||
hint = "",
|
||||
info = "",
|
||||
warning = "",
|
||||
error = "",
|
||||
},
|
||||
},
|
||||
view = {
|
||||
width = 40,
|
||||
side = "left",
|
||||
mappings = {
|
||||
list = {
|
||||
{ key = { "l", "<CR>", "o" }, cb = tree_cb("edit") },
|
||||
{ key = "h", cb = tree_cb("close_node") },
|
||||
{ key = "v", cb = tree_cb("vsplit") },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
@ -1,11 +1,13 @@
|
||||
local fn = vim.fn
|
||||
|
||||
-- Install packer
|
||||
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
|
||||
local install_path = vim.fn.stdpath 'data' ..
|
||||
'/site/pack/packer/start/packer.nvim'
|
||||
local is_bootstrap = false
|
||||
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
||||
is_bootstrap = true
|
||||
vim.fn.execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path)
|
||||
vim.fn.execute('!git clone https://github.com/wbthomason/packer.nvim ' ..
|
||||
install_path)
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
end
|
||||
|
||||
@ -16,22 +18,20 @@ vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
callback = function()
|
||||
vim.cmd("source <afile>")
|
||||
require("packer").sync()
|
||||
end,
|
||||
end
|
||||
})
|
||||
|
||||
-- Use a protected call so we don't error out on first use
|
||||
local status_ok, packer = pcall(require, "packer")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
if not status_ok then return end
|
||||
|
||||
-- Have packer use a popup window
|
||||
packer.init({
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float({border = "rounded"})
|
||||
end,
|
||||
},
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
-- Install your plugins here
|
||||
@ -43,7 +43,6 @@ return packer.startup(function(use)
|
||||
use({"numToStr/Comment.nvim"})
|
||||
use({"JoosepAlviste/nvim-ts-context-commentstring"})
|
||||
use({"kyazdani42/nvim-web-devicons"})
|
||||
use({ "kyazdani42/nvim-tree.lua" })
|
||||
use({"akinsho/bufferline.nvim"})
|
||||
use({"moll/vim-bbye"})
|
||||
use({"nvim-lualine/lualine.nvim"})
|
||||
@ -65,12 +64,10 @@ return packer.startup(function(use)
|
||||
'hrsh7th/cmp-buffer', -- buffer completions
|
||||
'hrsh7th/cmp-cmdline', -- cmdline completions
|
||||
'hrsh7th/cmp-path', -- path completions
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-nvim-lua',
|
||||
'L3MON4D3/LuaSnip', -- snippet engine
|
||||
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-nvim-lua', 'L3MON4D3/LuaSnip', -- snippet engine
|
||||
'rafamadriz/friendly-snippets', -- a bunch of snippets to use
|
||||
'saadparwaiz1/cmp_luasnip'
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
-- LSP
|
||||
@ -78,35 +75,39 @@ return packer.startup(function(use)
|
||||
"neovim/nvim-lspconfig",
|
||||
requires = {
|
||||
-- Automatically install LSPs to stdpath for neovim
|
||||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim',
|
||||
|
||||
-- Useful status updates for LSP
|
||||
'j-hui/fidget.nvim',
|
||||
},
|
||||
'j-hui/fidget.nvim'
|
||||
}
|
||||
}) -- enable LSP
|
||||
use {
|
||||
'j-hui/fidget.nvim',
|
||||
tag = 'legacy',
|
||||
}
|
||||
use({"jose-elias-alvarez/null-ls.nvim"}) -- for formatters and linters
|
||||
|
||||
-- Telescope Fuzzy Finder (files, lsp, etc)
|
||||
use({ "nvim-telescope/telescope.nvim",
|
||||
requires = {
|
||||
'nvim-lua/plenary.nvim' }
|
||||
})
|
||||
use({"nvim-telescope/telescope.nvim", requires = {'nvim-lua/plenary.nvim'}})
|
||||
|
||||
-- Fuzzy Finder Algorithm which requires local dependencies to be built. Only load if `make` is available
|
||||
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', cond = vim.fn.executable 'make' == 1 }
|
||||
use {
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
run = 'make',
|
||||
cond = vim.fn.executable 'make' == 1
|
||||
}
|
||||
|
||||
-- Treesitter
|
||||
use { -- Highlight, edit, and navigate code
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = function()
|
||||
pcall(require('nvim-treesitter.install').update {with_sync = true})
|
||||
end,
|
||||
end
|
||||
}
|
||||
|
||||
use { -- Additional text objects via treesitter
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
after = 'nvim-treesitter',
|
||||
after = 'nvim-treesitter'
|
||||
}
|
||||
|
||||
-- Git
|
||||
@ -133,7 +134,5 @@ return packer.startup(function(use)
|
||||
-- make sense to execute the rest of the init.lua.
|
||||
|
||||
-- You'll need to restart nvim, and then it will work.
|
||||
if is_bootstrap then
|
||||
require("packer").sync()
|
||||
end
|
||||
if is_bootstrap then require("packer").sync() end
|
||||
end)
|
@ -84,7 +84,7 @@ local mappings = {
|
||||
"<cmd>lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})<cr>",
|
||||
"Buffers",
|
||||
},
|
||||
["e"] = { "<cmd>NvimTreeToggle<cr>", "Explorer" },
|
||||
-- ["e"] = { "<cmd>NvimTreeToggle<cr>", "Explorer" },
|
||||
["w"] = { "<cmd>w!<CR>", "Save" },
|
||||
["q"] = { "<cmd>q!<CR>", "Quit" },
|
||||
["c"] = { "<cmd>Bdelete!<CR>", "Close Buffer" },
|
||||
|
@ -209,11 +209,6 @@ _G.packer_plugins = {
|
||||
path = "/home/repo/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||
url = "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
["nvim-tree.lua"] = {
|
||||
loaded = true,
|
||||
path = "/home/repo/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
|
||||
url = "https://github.com/kyazdani42/nvim-tree.lua"
|
||||
},
|
||||
["nvim-treesitter"] = {
|
||||
loaded = true,
|
||||
path = "/home/repo/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||
|
Loading…
Reference in New Issue
Block a user