more neovim lsp improvements

This commit is contained in:
Freya Murphy 2023-10-10 00:15:27 -04:00
parent d1a61d882d
commit 1a509d6e84
No known key found for this signature in database
GPG key ID: 988032A5638EE799
6 changed files with 68 additions and 16 deletions

View file

@ -1,18 +1,19 @@
local opts = { noremap = true, silent = true }
local keymap = vim.api.nvim_set_keymap
local keymap = vim.keymap.set
local builtin = require('telescope.builtin')
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
keymap('', '<leader>', '<Nop>', opts)
keymap('n', '<leader>e', ':NvimTreeToggle %<CR>', opts)
local builtin = require('telescope.builtin')
local keymap = vim.keymap.set
keymap('n', '<leader>e', vim.cmd.NvimTreeToggle)
keymap('n', '<leader>m', vim.cmd.Mason)
keymap('n', '<leader>h', vim.cmd.noh)
keymap('n', '<leader>p', vim.cmd.PlugUpdate)
keymap('n', '<leader>ff', builtin.find_files, {})
keymap('n', '<leader>fg', builtin.live_grep, {})
keymap('n', '<leader>fb', builtin.buffers, {})
keymap('n', '<leader>fh', builtin.help_tags, {})
keymap('n', '<leader>u', vim.cmd.UndotreeToggle)
keymap('n', '<leader>gs', vim.cmd.Git)
keymap('n', '<leader>t', function() require('trouble').toggle() end)

View file

@ -71,3 +71,6 @@ lsp.setup()
vim.diagnostic.config({
virtual_text = true
})
require("neodev").setup()
require("nvim-surround").setup()

View file

@ -24,5 +24,14 @@ Plug('L3MON4D3/LuaSnip')
Plug('williamboman/mason.nvim')
Plug('williamboman/mason-lspconfig.nvim')
Plug('VonHeikemen/lsp-zero.nvim', { branch = 'v3.x' })
Plug('akinsho/bufferline.nvim', { tag = '*' })
Plug('folke/neodev.nvim')
Plug('RRethy/vim-illuminate')
Plug('SmiteshP/nvim-navic')
Plug('utilyre/barbecue.nvim')
Plug('j-hui/fidget.nvim', { tag = 'legacy' })
Plug('rcarriga/nvim-notify')
Plug('folke/trouble.nvim')
Plug('kylechui/nvim-surround')
vim.call('plug#end')

View file

@ -1,7 +1,3 @@
local options = {
termguicolors = true
}
local catppuccin = require('catppuccin')
catppuccin.setup({
@ -10,6 +6,21 @@ catppuccin.setup({
cmp = true,
nvimtree = true,
treesitter = true,
illuminate = {
enabled = true,
lsp = false
},
barbecue = {
dim_dirname = true, -- directory name is dimmed by default
bold_basename = true,
dim_context = false,
alt_background = false,
},
coc_nvim = true,
fidget = true,
markdown = true,
notify = true,
lsp_trouble = true,
},
})
@ -32,3 +43,13 @@ require('lualine').setup {
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" })
vim.opt.termguicolors = true
require("bufferline").setup{}
require("barbecue").setup()
require("barbecue.ui").toggle(true)
require("fidget").setup {
window = {
blend = 0,
},
}

View file

@ -29,7 +29,26 @@ end
require("nvim-tree").setup({
sort_by = "case_sensitive",
view = {
adaptive_size = false,
centralize_selection = true,
width = 30,
side = "left",
preserve_window_proportions = false,
number = false,
relativenumber = false,
signcolumn = "yes",
float = {
enable = false,
quit_on_focus_loss = true,
open_win_config = {
relative = "editor",
border = "rounded",
width = 30,
height = 30,
row = 1,
col = 1,
},
},
},
renderer = {
group_empty = true,

View file

@ -7,7 +7,6 @@ set.clipboard = "unnamedplus"
set.hlsearch = true
set.autoindent = true
set.ttyfast = true
set.cc = '80'
set.number = true
set.relativenumber = true
set.rnu = true