Move aerial config into own file, fix deprecation warnings
This commit is contained in:
parent
a88e999d4a
commit
d481a424bf
2
init.lua
2
init.lua
|
@ -43,8 +43,8 @@ vim.opt.smartindent=true
|
|||
vim.opt.splitbelow=true
|
||||
vim.opt.splitright=true
|
||||
|
||||
require 'keymaps'
|
||||
require 'plugins'
|
||||
require 'keymaps'
|
||||
require 'config_lsp'
|
||||
|
||||
vim.notify = require("notify")
|
||||
|
|
|
@ -6,21 +6,6 @@ vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
|||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- Setup aerial
|
||||
require('aerial').setup{
|
||||
close_behavior = "global",
|
||||
on_attach = function(bufnr)
|
||||
-- Toggle the aerial window with <leader>a
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>k', '<cmd>AerialToggle!<CR>', {})
|
||||
-- Jump forwards/backwards with '{' and '}'
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '{', '<cmd>AerialPrev<CR>', {})
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '}', '<cmd>AerialNext<CR>', {})
|
||||
-- Jump up the tree with '[[' or ']]'
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '[[', '<cmd>AerialPrevUp<CR>', {})
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', ']]', '<cmd>AerialNextUp<CR>', {})
|
||||
end,
|
||||
}
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
|
@ -117,7 +102,7 @@ cmp.setup.cmdline(':', {
|
|||
})
|
||||
|
||||
-- Setup lspconfig.
|
||||
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
|
||||
require('lspconfig')['pylsp'].setup{
|
||||
cmd = {os.getenv( "HOME" ).."/.pyenv/versions/neovim3/bin/pylsp"},
|
||||
|
|
13
lua/config_plugins/config_aerial.lua
Normal file
13
lua/config_plugins/config_aerial.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
require('aerial').setup{
|
||||
on_attach = function(bufnr)
|
||||
-- Toggle the aerial window with <leader>a
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>k', '<cmd>AerialToggle!<CR>', {})
|
||||
-- Jump forwards/backwards with '{' and '}'
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '{', '<cmd>AerialPrev<CR>', {})
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '}', '<cmd>AerialNext<CR>', {})
|
||||
-- Jump up the tree with '[[' or ']]'
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '[[', '<cmd>AerialPrevUp<CR>', {})
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', ']]', '<cmd>AerialNextUp<CR>', {})
|
||||
end,
|
||||
}
|
||||
|
|
@ -33,6 +33,7 @@ require('packer').startup(function(use)
|
|||
use 'folke/trouble.nvim'
|
||||
end)
|
||||
|
||||
require 'config_plugins/config_aerial'
|
||||
require 'config_plugins/config_gitsigns'
|
||||
require 'config_plugins/config_lualine'
|
||||
require 'config_plugins/config_nightfox'
|
||||
|
|
Loading…
Reference in a new issue