updates
This commit is contained in:
parent
d1812e9e8b
commit
ca39598ec9
@ -4,6 +4,7 @@ require("mason").setup {
|
||||
|
||||
-- Setup lspconfig.
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
local navic = require("nvim-navic")
|
||||
|
||||
-- LSP hotkey config
|
||||
local opts = { noremap = true, silent = true }
|
||||
@ -14,7 +15,10 @@ vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(_, bufnr)
|
||||
local on_attach = function(client, bufnr)
|
||||
if client.server_capabilities.documentSymbolProvider then
|
||||
navic.attach(client, bufnr)
|
||||
end
|
||||
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
@ -43,3 +43,4 @@ vimp.noremap({ 'silent' }, '<leader>n', [[:NvimTreeToggle<CR>]])
|
||||
vimp.noremap({ 'silent' }, '<leader>ff', [[:Telescope find_files<CR>]])
|
||||
vimp.noremap({ 'silent' }, '<leader>fg', [[:Telescope live_grep<CR>]])
|
||||
vimp.noremap({ 'silent' }, '<leader>fb', [[:Telescope buffers<CR>]])
|
||||
vimp.noremap({ 'silent' }, '<leader>fp', function() require 'telescope'.extensions.projects.projects {} end)
|
||||
|
@ -96,6 +96,13 @@ return {
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"ahmedkhalf/project.nvim",
|
||||
config = function()
|
||||
require("project_nvim").setup {}
|
||||
end
|
||||
},
|
||||
|
||||
|
||||
-- https://github.com/ellisonleao/glow.nvim
|
||||
{
|
||||
@ -145,6 +152,52 @@ return {
|
||||
lazy = true
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require('telescope').load_extension('projects')
|
||||
end
|
||||
},
|
||||
|
||||
-- https://github.com/SmiteshP/nvim-navic
|
||||
{
|
||||
"SmiteshP/nvim-navic",
|
||||
dependencies = "neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require('nvim-navic').setup({
|
||||
icons = {
|
||||
File = " ",
|
||||
Module = " ",
|
||||
Namespace = " ",
|
||||
Package = " ",
|
||||
Class = " ",
|
||||
Method = " ",
|
||||
Property = " ",
|
||||
Field = " ",
|
||||
Constructor = " ",
|
||||
Enum = "練",
|
||||
Interface = "練",
|
||||
Function = " ",
|
||||
Variable = " ",
|
||||
Constant = " ",
|
||||
String = " ",
|
||||
Number = " ",
|
||||
Boolean = "◩ ",
|
||||
Array = " ",
|
||||
Object = " ",
|
||||
Key = " ",
|
||||
Null = "ﳠ ",
|
||||
EnumMember = " ",
|
||||
Struct = " ",
|
||||
Event = " ",
|
||||
Operator = " ",
|
||||
TypeParameter = " ",
|
||||
},
|
||||
highlight = false,
|
||||
separator = " > ",
|
||||
depth_limit = 0,
|
||||
depth_limit_indicator = "..",
|
||||
safe_output = true
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
-- https://github.com/nvim-tree/nvim-tree.lua
|
||||
@ -155,6 +208,12 @@ return {
|
||||
},
|
||||
config = function()
|
||||
require('nvim-tree').setup {
|
||||
sync_root_with_cwd = true,
|
||||
respect_buf_cwd = true,
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_root = true
|
||||
},
|
||||
sort_by = "case_sensitive",
|
||||
view = {
|
||||
adaptive_size = true,
|
||||
@ -346,7 +405,13 @@ return {
|
||||
'hoob3rt/lualine.nvim',
|
||||
dependencies = { { 'nvim-tree/nvim-web-devicons' } },
|
||||
config = function()
|
||||
local navic = require("nvim-navic")
|
||||
require('lualine').setup({
|
||||
sections = {
|
||||
lualine_c = {
|
||||
{ navic.get_location, cond = navic.is_available },
|
||||
}
|
||||
},
|
||||
options = {
|
||||
theme = 'pywal-nvim'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user