Added: Plugin barbar; clangd and cmake lsp; some settings changed; neovide font changed

This commit is contained in:
Piyush मिश्रः 2023-02-15 00:18:32 +05:30
parent 8e00b8b928
commit 3754a46ba2
6 changed files with 64 additions and 3 deletions

View File

@ -0,0 +1,34 @@
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
-- Move to previous/next
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
-- Re-order to previous/next
map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', opts)
map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', opts)
-- Goto buffer in position...
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
-- Pin/unpin buffer
map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
-- Close buffer
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
-- Wipeout buffer
-- :BufferWipeout
-- Close commands
-- :BufferCloseAllButCurrent
-- :BufferCloseAllButPinned
-- :BufferCloseAllButCurrentOrPinned
-- :BufferCloseBuffersLeft
-- :BufferCloseBuffersRight
-- Magic buffer-picking mode
map('n', '<S-p>', '<Cmd>BufferPick<CR>', opts)

View File

@ -4,9 +4,10 @@ lsp.preset("recommended")
lsp.ensure_installed({ lsp.ensure_installed({
'tsserver', 'tsserver',
-- 'sumneko_lua',
'lua_ls', 'lua_ls',
'rust_analyzer', 'rust_analyzer',
'clangd',
'cmake'
}) })
-- Fix Undefined global 'vim' -- Fix Undefined global 'vim'

View File

@ -2,6 +2,6 @@ require("xcoder")
--print("Neovide is", vim.g.neovide) --print("Neovide is", vim.g.neovide)
if vim.g.neovide then if vim.g.neovide then
vim.opt.guifont = { "Source Code Pro:h10" } vim.opt.guifont = { "Fira Code:h11" }
end end

View File

@ -56,6 +56,12 @@ return require('packer').startup(function(use)
use("github/copilot.vim") use("github/copilot.vim")
use("eandrju/cellular-automaton.nvim") use("eandrju/cellular-automaton.nvim")
use("laytan/cloak.nvim") use("laytan/cloak.nvim")
use {
"windwp/nvim-autopairs",
config = function() require("nvim-autopairs").setup {} end
}
use 'nvim-tree/nvim-web-devicons'
use {'romgrk/barbar.nvim', requires = 'nvim-web-devicons'}
end) end)

View File

@ -1,4 +1,4 @@
vim.opt.guicursor = "" -- vim.opt.guicursor = ""
vim.opt.nu = true vim.opt.nu = true
vim.opt.relativenumber = true vim.opt.relativenumber = true

View File

@ -79,6 +79,11 @@ _G.packer_plugins = {
path = "/home/piyush/.local/share/nvim/site/pack/packer/start/LuaSnip", path = "/home/piyush/.local/share/nvim/site/pack/packer/start/LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip" url = "https://github.com/L3MON4D3/LuaSnip"
}, },
["barbar.nvim"] = {
loaded = true,
path = "/home/piyush/.local/share/nvim/site/pack/packer/start/barbar.nvim",
url = "https://github.com/romgrk/barbar.nvim"
},
["cellular-automaton.nvim"] = { ["cellular-automaton.nvim"] = {
loaded = true, loaded = true,
path = "/home/piyush/.local/share/nvim/site/pack/packer/start/cellular-automaton.nvim", path = "/home/piyush/.local/share/nvim/site/pack/packer/start/cellular-automaton.nvim",
@ -144,6 +149,12 @@ _G.packer_plugins = {
path = "/home/piyush/.local/share/nvim/site/pack/packer/start/mason.nvim", path = "/home/piyush/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim" url = "https://github.com/williamboman/mason.nvim"
}, },
["nvim-autopairs"] = {
config = { "\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0" },
loaded = true,
path = "/home/piyush/.local/share/nvim/site/pack/packer/start/nvim-autopairs",
url = "https://github.com/windwp/nvim-autopairs"
},
["nvim-cmp"] = { ["nvim-cmp"] = {
loaded = true, loaded = true,
path = "/home/piyush/.local/share/nvim/site/pack/packer/start/nvim-cmp", path = "/home/piyush/.local/share/nvim/site/pack/packer/start/nvim-cmp",
@ -164,6 +175,11 @@ _G.packer_plugins = {
path = "/home/piyush/.local/share/nvim/site/pack/packer/start/nvim-treesitter-context", path = "/home/piyush/.local/share/nvim/site/pack/packer/start/nvim-treesitter-context",
url = "https://github.com/nvim-treesitter/nvim-treesitter-context" url = "https://github.com/nvim-treesitter/nvim-treesitter-context"
}, },
["nvim-web-devicons"] = {
loaded = true,
path = "/home/piyush/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
url = "https://github.com/nvim-tree/nvim-web-devicons"
},
["packer.nvim"] = { ["packer.nvim"] = {
loaded = true, loaded = true,
path = "/home/piyush/.local/share/nvim/site/pack/packer/start/packer.nvim", path = "/home/piyush/.local/share/nvim/site/pack/packer/start/packer.nvim",
@ -217,6 +233,10 @@ time([[Defining packer_plugins]], false)
time([[Config for rose-pine]], true) time([[Config for rose-pine]], true)
try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\0056\0\0\0009\0\1\0'\2\2\0B\0\2\1K\0\1\0\26colorscheme rose-pine\bcmd\bvim\0", "config", "rose-pine") try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\0056\0\0\0009\0\1\0'\2\2\0B\0\2\1K\0\1\0\26colorscheme rose-pine\bcmd\bvim\0", "config", "rose-pine")
time([[Config for rose-pine]], false) time([[Config for rose-pine]], false)
-- Config for: nvim-autopairs
time([[Config for nvim-autopairs]], true)
try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs")
time([[Config for nvim-autopairs]], false)
_G._packer.inside_compile = false _G._packer.inside_compile = false
if _G._packer.needs_bufread == true then if _G._packer.needs_bufread == true then