update nvim

This commit is contained in:
Guilherme Rugai Freire 2024-01-08 18:10:44 -03:00
parent 4c0f2a11b6
commit 30d937c6a3
No known key found for this signature in database
GPG Key ID: C246288AC51220BC
6 changed files with 35 additions and 10 deletions

View File

@ -2,11 +2,10 @@ local lsp = require("lsp-zero")
lsp.preset("recommended")
lsp.ensure_installed({
'tsserver',
'eslint',
'clangd',
'lua_ls',
require("mason").setup({})
require("mason-lspconfig").setup({
ensure_installed = {'lua_ls', 'clangd', 'eslint', 'tsserver'},
handlers = { lsp.default_setup }
})
-- Fix Undefined global 'vim'
@ -35,7 +34,7 @@ local cmp_mappings = lsp.defaults.cmp_mappings({
cmp_mappings['<Tab>'] = nil
cmp_mappings['<S-Tab>'] = nil
lsp.setup_nvim_cmp({
cmp.setup({
mapping = cmp_mappings
})

View File

@ -1,6 +1,6 @@
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all"
ensure_installed = { "help", "javascript", "typescript", "c", "lua", "css", "html" },
ensure_installed = { "javascript", "typescript", "c", "lua", "css", "html" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,

View File

@ -0,0 +1,25 @@
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
-- My plugins here
-- use 'foo1/bar1.nvim'
-- use 'foo2/bar2.nvim'
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if packer_bootstrap then
require('packer').sync()
end
end)

View File

@ -1,2 +1,3 @@
require("grfreire.bootstrap")
require("grfreire.remap")
require("grfreire.set")

View File

@ -11,7 +11,7 @@ return require('packer').startup(function(use)
-- Telescope fuzzyfinder
use {
'nvim-telescope/telescope.nvim', tag = '0.1.0',
'nvim-telescope/telescope.nvim', tag = '0.1.5',
-- or , branch = '0.1.x',
requires = { { 'nvim-lua/plenary.nvim' } }
}

View File

@ -49,8 +49,8 @@ local function save_profiles(threshold)
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/grfreire/.cache/nvim/packer_hererocks/2.1.1696795921/share/lua/5.1/?.lua;/home/grfreire/.cache/nvim/packer_hererocks/2.1.1696795921/share/lua/5.1/?/init.lua;/home/grfreire/.cache/nvim/packer_hererocks/2.1.1696795921/lib/luarocks/rocks-5.1/?.lua;/home/grfreire/.cache/nvim/packer_hererocks/2.1.1696795921/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/grfreire/.cache/nvim/packer_hererocks/2.1.1696795921/lib/lua/5.1/?.so"
local package_path_str = "/home/grfreire/.cache/nvim/packer_hererocks/2.1.1702233742/share/lua/5.1/?.lua;/home/grfreire/.cache/nvim/packer_hererocks/2.1.1702233742/share/lua/5.1/?/init.lua;/home/grfreire/.cache/nvim/packer_hererocks/2.1.1702233742/lib/luarocks/rocks-5.1/?.lua;/home/grfreire/.cache/nvim/packer_hererocks/2.1.1702233742/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/grfreire/.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