minor changes to nvim config

This commit is contained in:
Tiago Sousa 2024-01-29 00:38:04 +00:00
parent f279ad5547
commit 422a1921fd
6 changed files with 26 additions and 292 deletions

View file

@ -6,8 +6,9 @@
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"copilot.vim": { "branch": "release", "commit": "22fd9542e3c47552abab5e685fefd760e4f405b2" },
"dressing.nvim": { "branch": "master", "commit": "0e88293ce3459f4bb310125f3366304af6dc7990" },
"fidget.nvim": { "branch": "main", "commit": "3a93300c076109d86c7ce35ec67a8034ae6ba9db" },
"fidget.nvim": { "branch": "main", "commit": "1d1042d418ee8cb70d68f1e38db639844331c093" },
"gruvbox.nvim": { "branch": "main", "commit": "4176b0b720db0c90ab4030e5c1b4893faf41fd51" },
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
"lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" },
@ -18,17 +19,15 @@
"nvim": { "branch": "main", "commit": "afab7ec2a79c7127627dede79c0018b6e45663d0" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
"nvim-lspconfig": { "branch": "master", "commit": "8917d2c830e04bf944a699b8c41f097621283828" },
"nvim-treesitter": { "branch": "master", "commit": "b4138891b3454beeb14eef171c91c92377fcd715" },
"nvim-treesitter": { "branch": "master", "commit": "d4dac523d2546afc266eb9b5a7986690b5319c41" },
"nvim-treesitter-context": { "branch": "master", "commit": "9c06b115abc57c99cf0aa81dc29490f5001f57a1" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "19a91a38b02c1c28c14e0ba468d20ae1423c39b2" },
"nvim-web-devicons": { "branch": "master", "commit": "b427ac5f9dff494f839e81441fb3f04a58cbcfbc" },
"orgmode": { "branch": "master", "commit": "ab045e3084d5987e8939d25d69b09baaf762278c" },
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
"plenary.nvim": { "branch": "master", "commit": "663246936325062427597964d81d30eaa42ab1e4" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"telescope.nvim": { "branch": "master", "commit": "2f3857c25bbd00ed7ac593c9d4071906369e4d20" },
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
"undotree": { "branch": "master", "commit": "d9c8b4ef872e078e8c4080812e5a3ed56d151c00" },
"vim-fugitive": { "branch": "master", "commit": "854a8df0d06b8d3fcb30fa7f2b08c62b553eee3b" },
"vim-fugitive": { "branch": "master", "commit": "f116dcc8e21021e6fbfb6b0a9f8f7b9566d933f4" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }
}

View file

@ -1,3 +1,8 @@
local colour = "catppuccin"
function SetColour()
vim.cmd.colorscheme(colour)
end
return {
{
"catppuccin/nvim",
@ -13,9 +18,10 @@ return {
telescope = true,
treesitter = true,
treesitter_context = true,
fidget = true,
},
SetColour()
})
vim.cmd.colorscheme("catppuccin")
end
},
@ -31,6 +37,7 @@ return {
},
transparent_mode = true,
})
SetColour()
end
},
}

View file

@ -2,6 +2,5 @@ return {
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"tpope/vim-surround",
"j-hui/fidget.nvim",
"github/copilot.vim",
}

View file

@ -157,9 +157,8 @@ return {
end
return true
end
},
{ name = 'nvim_lua' },
--{ name = 'nvim_lua' },
{ name = 'luasnip' },
{ name = 'nvim_lsp_signature_help' },
{ name = 'path' },
@ -181,10 +180,10 @@ return {
})
},
experimental = {
ghost_text = true,
native_menu = false,
},
--experimental = {
-- ghost_text = true,
-- native_menu = false,
--},
}
end,
},
@ -193,8 +192,10 @@ return {
dependencies = {
"williamboman/mason-lspconfig.nvim",
"williamboman/mason.nvim",
"j-hui/fidget.nvim",
},
config = function()
require("fidget").setup()
vim.api.nvim_create_augroup("_mason", { clear = true })
require("mason").setup({
PATH = "skip",
@ -208,10 +209,12 @@ return {
max_concurrent_installers = 10,
})
local mason_lspconfig = require "mason-lspconfig"
local mason_lspconfig = require("mason-lspconfig")
mason_lspconfig.setup({
ensure_installed = {},
ensure_installed = {
},
automatic_installation = true
})
@ -248,9 +251,10 @@ return {
vim.keymap.set('n', '<space>ge', function() vim.diagnostic.goto_next() end, bufopts)
vim.keymap.set('n', '<space>gE', function() vim.diagnostic.goto_prev() end, bufopts)
vim.keymap.set('n', '<space>fo', function() vim.lsp.buf.format { async = true } end, bufopts)
vim.keymap.set('i', '<C-h>', vim.lsp.buf.signature_help, bufopts)
end
local lspconfig = require "lspconfig"
local lspconfig = require("lspconfig")
-- ADD NVIM CMP AS A CAPABILITY
local lsp_defaults = lspconfig.util.default_config
@ -274,5 +278,5 @@ return {
end,
}
end
}
},
}

View file

@ -40,7 +40,6 @@ return {
end,
},
},
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
opts = {
highlight = { enable = true },
indent = { enable = true },

View file

@ -1,274 +0,0 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
_G._packer = _G._packer or {}
_G._packer.inside_compile = true
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
if threshold then
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
end
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/tsousa/.cache/nvim/packer_hererocks/2.1.1702233742/share/lua/5.1/?.lua;/home/tsousa/.cache/nvim/packer_hererocks/2.1.1702233742/share/lua/5.1/?/init.lua;/home/tsousa/.cache/nvim/packer_hererocks/2.1.1702233742/lib/luarocks/rocks-5.1/?.lua;/home/tsousa/.cache/nvim/packer_hererocks/2.1.1702233742/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/tsousa/.cache/nvim/packer_hererocks/2.1.1702233742/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
LuaSnip = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip"
},
["cmp-buffer"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-cmdline"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
url = "https://github.com/hrsh7th/cmp-cmdline"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
["cmp-nvim-lsp-signature-help"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help",
url = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help"
},
["cmp-nvim-lua"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
url = "https://github.com/hrsh7th/cmp-nvim-lua"
},
["cmp-path"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/cmp-path",
url = "https://github.com/hrsh7th/cmp-path"
},
cmp_luasnip = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
url = "https://github.com/saadparwaiz1/cmp_luasnip"
},
["dressing.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/dressing.nvim",
url = "https://github.com/stevearc/dressing.nvim"
},
["fidget.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/fidget.nvim",
url = "https://github.com/j-hui/fidget.nvim"
},
["friendly-snippets"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/friendly-snippets",
url = "https://github.com/rafamadriz/friendly-snippets"
},
["gruvbox.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/gruvbox.nvim",
url = "https://github.com/ellisonleao/gruvbox.nvim"
},
harpoon = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/harpoon",
url = "https://github.com/theprimeagen/harpoon"
},
["lualine.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/lualine.nvim",
url = "https://github.com/nvim-lualine/lualine.nvim"
},
["mason-lspconfig.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
url = "https://github.com/williamboman/mason-lspconfig.nvim"
},
["mason.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
["none-ls.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/none-ls.nvim",
url = "https://github.com/nvimtools/none-ls.nvim"
},
nvim = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/nvim",
url = "https://github.com/catppuccin/nvim"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-colorizer.lua"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua",
url = "https://github.com/norcalli/nvim-colorizer.lua"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-treesitter-context"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/nvim-treesitter-context",
url = "https://github.com/romgrk/nvim-treesitter-context"
},
["nvim-web-devicons"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
url = "https://github.com/nvim-tree/nvim-web-devicons"
},
orgmode = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/orgmode",
url = "https://github.com/nvim-orgmode/orgmode"
},
["packer.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
playground = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/playground",
url = "https://github.com/nvim-treesitter/playground"
},
["plenary.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["popup.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/popup.nvim",
url = "https://github.com/nvim-lua/popup.nvim"
},
["telescope.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
["todo-comments.nvim"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/todo-comments.nvim",
url = "https://github.com/folke/todo-comments.nvim"
},
undotree = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/undotree",
url = "https://github.com/mbbill/undotree"
},
["vim-alloy"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/vim-alloy",
url = "https://github.com/runoshun/vim-alloy"
},
["vim-fugitive"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/vim-fugitive",
url = "https://github.com/tpope/vim-fugitive"
},
["vim-surround"] = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/vim-surround",
url = "https://github.com/tpope/vim-surround"
},
vimtex = {
loaded = true,
path = "/home/tsousa/.local/share/nvim/site/pack/packer/start/vimtex",
url = "https://github.com/lervag/vimtex"
}
}
time([[Defining packer_plugins]], false)
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead")
end
_G._packer.needs_bufread = false
if should_profile then save_profiles() end
end)
if not no_errors then
error_msg = error_msg:gsub('"', '\\"')
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end