More neovim plugins and making LSP usable
This commit is contained in:
parent
4c5f638171
commit
9732210f0b
@ -12,7 +12,8 @@ set -gx EDITOR nvim
|
|||||||
|
|
||||||
set -gx MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
set -gx MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||||
set -gx DOTNET_CLI_TELEMETRY_OPTOUT 1
|
set -gx DOTNET_CLI_TELEMETRY_OPTOUT 1
|
||||||
bind -M insert \cx restore_job
|
|
||||||
|
bind \cx restore_job
|
||||||
|
|
||||||
if [ (uname -r | sed -n 's/.*\( *Microsoft *\).*/\1/ip') ]
|
if [ (uname -r | sed -n 's/.*\( *Microsoft *\).*/\1/ip') ]
|
||||||
set -gx DISPLAY 127.0.0.1:0.0
|
set -gx DISPLAY 127.0.0.1:0.0
|
||||||
|
3
.config/fish/functions/m.fish
Normal file
3
.config/fish/functions/m.fish
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
function m --wraps=magit --description 'alias m magit'
|
||||||
|
magit $argv;
|
||||||
|
end
|
@ -1,6 +1,6 @@
|
|||||||
function restore_job
|
function restore_job
|
||||||
if jobs > /dev/null
|
if jobs > /dev/null
|
||||||
fg
|
fg
|
||||||
fish_prompt
|
clear
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4,7 +4,17 @@ local set = vim.opt
|
|||||||
|
|
||||||
set.clipboard = 'unnamedplus'
|
set.clipboard = 'unnamedplus'
|
||||||
set.wrap = false
|
set.wrap = false
|
||||||
set.number = true set.relativenumber = true set.ignorecase = true set.smartcase = true set.termguicolors = true set.swapfile = false set.backup = false set.undodir = os.getenv("XDG_CACHE_HOME") .. "/nvim/undo" set.undofile = true set.hlsearch = false
|
set.linebreak = true
|
||||||
|
set.number = true
|
||||||
|
set.relativenumber = true
|
||||||
|
set.ignorecase = true
|
||||||
|
set.smartcase = true
|
||||||
|
set.termguicolors = true
|
||||||
|
set.swapfile = false
|
||||||
|
set.backup = false
|
||||||
|
set.undodir = os.getenv('XDG_CACHE_HOME') .. '/nvim/undo'
|
||||||
|
set.undofile = true
|
||||||
|
set.hlsearch = false
|
||||||
set.incsearch = true
|
set.incsearch = true
|
||||||
set.cursorline = true
|
set.cursorline = true
|
||||||
-- set.cmdheight = 0
|
-- set.cmdheight = 0
|
||||||
@ -13,31 +23,31 @@ set.mouse = 'a'
|
|||||||
set.splitright = true
|
set.splitright = true
|
||||||
set.splitbelow = true
|
set.splitbelow = true
|
||||||
set.updatetime = 600
|
set.updatetime = 600
|
||||||
set.signcolumn = "yes"
|
set.signcolumn = 'yes'
|
||||||
set.tabstop = 4
|
set.tabstop = 4
|
||||||
set.softtabstop = 4
|
set.softtabstop = 4
|
||||||
set.shiftwidth = 4
|
set.shiftwidth = 4
|
||||||
set.expandtab = true
|
set.expandtab = true
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = ' '
|
||||||
|
|
||||||
map("v", "J", ":m '>+1<CR>gv=gv")
|
map('v', 'J', ":m '>+1<CR>gv=gv")
|
||||||
map("v", "K", ":m '<-2<CR>gv=gv")
|
map('v', 'K', ":m '<-2<CR>gv=gv")
|
||||||
map("x", "J", ":m '>+1<CR>gv-gv", opts)
|
map('x', 'J', ":m '>+1<CR>gv-gv", opts)
|
||||||
map("x", "K", ":m '<-2<CR>gv-gv", opts)
|
map('x', 'K', ":m '<-2<CR>gv-gv", opts)
|
||||||
|
|
||||||
map("v", "<", "<gv", opts)
|
map('v', "<", '<gv', opts)
|
||||||
map("v", ">", ">gv", opts)
|
map('v', ">", '>gv', opts)
|
||||||
|
|
||||||
map("n", "J", "mzJ`z")
|
map('n', 'J', 'mzJ`z')
|
||||||
|
|
||||||
map("n", "<C-s>", vim.cmd.w)
|
map('n', '<C-s>', vim.cmd.w)
|
||||||
map("n", "<C-q>", vim.cmd.wq)
|
map('n', '<C-q>', vim.cmd.wq)
|
||||||
map("n", "<C-S-r>", vim.cmd.source)
|
map('n', '<C-S-r>', vim.cmd.source)
|
||||||
map("n", "<C-r>", "<nop>")
|
map('n', '<C-r>', "<nop>")
|
||||||
|
|
||||||
map("n", "vv", "^vg_", { noremap = true })
|
map('n', 'vv', "^vg_", { noremap = true })
|
||||||
|
|
||||||
map("n", "-", vim.cmd.Ex, {})
|
map('n', '-', vim.cmd.Ex, {})
|
||||||
map('n', 'U', vim.cmd.redo)
|
map('n', 'U', vim.cmd.redo)
|
||||||
|
|
||||||
local ts = require('telescope.builtin')
|
local ts = require('telescope.builtin')
|
||||||
@ -47,6 +57,8 @@ map('n', '<leader><leader>g', ts.live_grep, {})
|
|||||||
map('n', '<leader><leader>b', ts.buffers, {})
|
map('n', '<leader><leader>b', ts.buffers, {})
|
||||||
map('n', '<leader><leader>t', ts.help_tags, {})
|
map('n', '<leader><leader>t', ts.help_tags, {})
|
||||||
map('n', '<leader><leader>c', ts.commands, {})
|
map('n', '<leader><leader>c', ts.commands, {})
|
||||||
|
map('n', '<leader><leader>d', ts.diagnostics, {})
|
||||||
|
map('n', '<leader><leader>s', ts.lsp_document_symbols, {})
|
||||||
|
|
||||||
-- TODO If we use this one a lot, might be better to bind it to something easier
|
-- TODO If we use this one a lot, might be better to bind it to something easier
|
||||||
map('n', '<leader>bb', ':b#<CR>')
|
map('n', '<leader>bb', ':b#<CR>')
|
||||||
@ -68,10 +80,10 @@ map('n', '<leader>wj', '<C-w>J')
|
|||||||
map('n', '<leader>wk', '<C-w>K')
|
map('n', '<leader>wk', '<C-w>K')
|
||||||
map('n', '<leader>wl', '<C-w>L')
|
map('n', '<leader>wl', '<C-w>L')
|
||||||
|
|
||||||
map("n", "<C-Up>", ":resize -2<CR>", opts)
|
map('n', '<C-Up>', ':resize -2<CR>', opts)
|
||||||
map("n", "<C-Down>", ":resize +2<CR>", opts)
|
map('n', '<C-Down>', ':resize +2<CR>', opts)
|
||||||
map("n", "<C-Left>", ":vertical resize -2<CR>", opts)
|
map('n', '<C-Left>', ':vertical resize -2<CR>', opts)
|
||||||
map("n", "<C-Right>", ":vertical resize +2<CR>", opts)
|
map('n', '<C-Right>', ':vertical resize +2<CR>', opts)
|
||||||
|
|
||||||
map('n', '<C-h>', '<C-w>h', {})
|
map('n', '<C-h>', '<C-w>h', {})
|
||||||
map('n', '<C-j>', '<C-w>j', {})
|
map('n', '<C-j>', '<C-w>j', {})
|
||||||
@ -82,14 +94,14 @@ map('n', '<C-l>', '<C-w>l', {})
|
|||||||
--
|
--
|
||||||
-- neogit.setup {}
|
-- neogit.setup {}
|
||||||
|
|
||||||
map("n", "<leader>tw", ":set wrap!<CR>")
|
map('n', '<leader>tw', ':set wrap!<CR>')
|
||||||
|
|
||||||
function get_lsp_client_info()
|
function get_lsp_client_info()
|
||||||
-- local info = vim.lsp.buf.completion()
|
-- local info = vim.lsp.buf.completion()
|
||||||
local pickers = require "telescope.pickers"
|
local pickers = require 'telescope.pickers'
|
||||||
local finders = require "telescope.finders"
|
local finders = require 'telescope.finders'
|
||||||
local previewers = require "telescope.previewers"
|
local previewers = require 'telescope.previewers'
|
||||||
local conf = require("telescope.config").values
|
local conf = require('telescope.config').values
|
||||||
|
|
||||||
local params = vim.lsp.util.make_position_params()
|
local params = vim.lsp.util.make_position_params()
|
||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
@ -98,22 +110,22 @@ function get_lsp_client_info()
|
|||||||
client.request('textDocument/completion', params, function(arg1, arg2, arg3, arg4)
|
client.request('textDocument/completion', params, function(arg1, arg2, arg3, arg4)
|
||||||
local i = 0
|
local i = 0
|
||||||
for key,value in pairs(arg2.items) do
|
for key,value in pairs(arg2.items) do
|
||||||
if value.textEdit.newText ~= nil and value.textEdit.newText ~= "" and i < 100 then
|
if value.textEdit.newText ~= nil and value.textEdit.newText ~= '' and i < 100 then
|
||||||
table.insert(comp_text, value.textEdit.newText)
|
table.insert(comp_text, value.textEdit.newText)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
pickers.new(opts, {
|
pickers.new(opts, {
|
||||||
prompt_title = "Lsp autocomplete",
|
prompt_title = 'Lsp autocomplete',
|
||||||
finder = finders.new_table {
|
finder = finders.new_table {
|
||||||
-- results = { "red", "green", "blue" }
|
-- results = { 'red', 'green', 'blue' }
|
||||||
results = comp_text
|
results = comp_text
|
||||||
},
|
},
|
||||||
previewer = previewers.new_buffer_previewer(
|
previewer = previewers.new_buffer_previewer(
|
||||||
{
|
{
|
||||||
title = "LSP Documentation",
|
title = 'LSP Documentation',
|
||||||
define_preview = function(self, entry, status)
|
define_preview = function(self, entry, status)
|
||||||
return "DO IT"
|
return 'DO IT'
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
@ -124,34 +136,3 @@ function get_lsp_client_info()
|
|||||||
end
|
end
|
||||||
|
|
||||||
map('i', '<C-y>', get_lsp_client_info)
|
map('i', '<C-y>', get_lsp_client_info)
|
||||||
|
|
||||||
-- _request('textDocument/completion', params, function(err, response)
|
|
||||||
-- if err or response == nil then
|
|
||||||
-- return args.abort()
|
|
||||||
-- end
|
|
||||||
-- args.callback(compe.helper.convert_lsp({
|
|
||||||
-- keyword_pattern_offset = args.keyword_pattern_offset,
|
|
||||||
-- context = args.context,
|
|
||||||
-- request = params,
|
|
||||||
-- response = response,
|
|
||||||
-- }))
|
|
||||||
-- end)
|
|
||||||
--
|
|
||||||
-- function Source._request(self, params, callback)
|
|
||||||
-- local params = vim.lsp.util.make_position_params()
|
|
||||||
-- if self.request_ids['textDocument/completion'] ~= nil then
|
|
||||||
-- self.client.cancel_request(self.request_ids['textDocument/completion'])
|
|
||||||
-- self.request_ids['textDocument/completion'] = nil
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- local _, request_id
|
|
||||||
-- _, request_id = self.client.request('textDocument/completion', params, function(arg1, arg2, arg3, arg4)
|
|
||||||
-- print("hello1")
|
|
||||||
-- if self.request_ids['textDocument/completion'] ~= request_id then
|
|
||||||
-- return
|
|
||||||
-- end
|
|
||||||
-- print("hello2")
|
|
||||||
-- end)
|
|
||||||
-- self.request_ids['textDocument/completion'] = request_id
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
|
@ -12,7 +12,7 @@ end
|
|||||||
local packer_bootstrap = ensure_packer()
|
local packer_bootstrap = ensure_packer()
|
||||||
|
|
||||||
-- Use a protected call so we don't error out on first use
|
-- Use a protected call so we don't error out on first use
|
||||||
local status_ok, packer = pcall(require, "packer")
|
local status_ok, packer = pcall(require, 'packer')
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -21,7 +21,7 @@ end
|
|||||||
packer.init({
|
packer.init({
|
||||||
display = {
|
display = {
|
||||||
open_fn = function()
|
open_fn = function()
|
||||||
return require("packer.util").float({ border = "rounded" })
|
return require('packer.util').float({ border = 'rounded' })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -39,7 +39,7 @@ packer.startup(function(use)
|
|||||||
use {
|
use {
|
||||||
'marko-cerovac/material.nvim',
|
'marko-cerovac/material.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.material_style = "palenight"
|
vim.g.material_style = 'palenight'
|
||||||
vim.cmd [[colorscheme material]]
|
vim.cmd [[colorscheme material]]
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
@ -57,12 +57,36 @@ packer.startup(function(use)
|
|||||||
use {
|
use {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
config = function()
|
config = function()
|
||||||
local rt = require("rust-tools")
|
local rt = require('rust-tools')
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
local on_attach = function(_, bufnr)
|
local border = {
|
||||||
show_hints = false
|
{"🭽", "FloatBorder"},
|
||||||
|
{"▔", "FloatBorder"},
|
||||||
|
{"🭾", "FloatBorder"},
|
||||||
|
{"▕", "FloatBorder"},
|
||||||
|
{"🭿", "FloatBorder"},
|
||||||
|
{"▁", "FloatBorder"},
|
||||||
|
{"🭼", "FloatBorder"},
|
||||||
|
{"▏", "FloatBorder"},
|
||||||
|
}
|
||||||
|
|
||||||
toggle_hints = function()
|
local handlers = {
|
||||||
|
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border}),
|
||||||
|
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {border = border }),
|
||||||
|
}
|
||||||
|
|
||||||
|
local on_attach = function(_, bufnr)
|
||||||
|
show_diagnostics = true
|
||||||
|
local toggle_diagnostics = function()
|
||||||
|
if show_diagnostics then
|
||||||
|
vim.diagnostic.enable()
|
||||||
|
else
|
||||||
|
vim.diagnostic.disable()
|
||||||
|
end
|
||||||
|
show_diagnostics = not show_diagnostics
|
||||||
|
end
|
||||||
|
show_hints = false
|
||||||
|
local toggle_hints = function()
|
||||||
if show_hints then
|
if show_hints then
|
||||||
rt.inlay_hints.enable()
|
rt.inlay_hints.enable()
|
||||||
else
|
else
|
||||||
@ -70,10 +94,12 @@ packer.startup(function(use)
|
|||||||
end
|
end
|
||||||
show_hints = not show_hints
|
show_hints = not show_hints
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.diagnostic.config {
|
vim.diagnostic.config {
|
||||||
float = { border = "rounded" },
|
float = { border = 'rounded' },
|
||||||
}
|
}
|
||||||
vim.keymap.set("n", "<leader>ti", toggle_hints)
|
vim.keymap.set('n', '<leader>te', toggle_diagnostics)
|
||||||
|
vim.keymap.set('n', '<leader>ti', toggle_hints)
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = true,
|
virtual_text = true,
|
||||||
signs = true,
|
signs = true,
|
||||||
@ -81,11 +107,10 @@ packer.startup(function(use)
|
|||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
severity_sort = false,
|
severity_sort = false,
|
||||||
})
|
})
|
||||||
-- Mappings.
|
|
||||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
|
||||||
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
||||||
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
|
vim.keymap.set('n', '<C-space>', rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
vim.keymap.set('n', '<Leader>a', rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
||||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
|
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
|
||||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||||
@ -106,11 +131,15 @@ packer.startup(function(use)
|
|||||||
vim.keymap.set('n', '<space>ee', vim.diagnostic.open_float, opts)
|
vim.keymap.set('n', '<space>ee', vim.diagnostic.open_float, opts)
|
||||||
vim.keymap.set('n', '<M-S-e>', vim.diagnostic.goto_prev, opts)
|
vim.keymap.set('n', '<M-S-e>', vim.diagnostic.goto_prev, opts)
|
||||||
vim.keymap.set('n', '<M-e>', vim.diagnostic.goto_next, opts)
|
vim.keymap.set('n', '<M-e>', vim.diagnostic.goto_next, opts)
|
||||||
|
|
||||||
|
rt.inlay_hints.disable()
|
||||||
|
vim.diagnostic.disable()
|
||||||
end
|
end
|
||||||
rt.setup({
|
rt.setup({
|
||||||
server = {
|
server = {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities
|
capabilities = capabilities,
|
||||||
|
handlers = handlers
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
@ -119,13 +148,26 @@ packer.startup(function(use)
|
|||||||
use 'hrsh7th/cmp-buffer'
|
use 'hrsh7th/cmp-buffer'
|
||||||
use 'hrsh7th/cmp-path'
|
use 'hrsh7th/cmp-path'
|
||||||
use 'hrsh7th/cmp-cmdline'
|
use 'hrsh7th/cmp-cmdline'
|
||||||
|
use 'hrsh7th/cmp-nvim-lua'
|
||||||
|
use 'hrsh7th/cmp-nvim-lsp-signature-help'
|
||||||
|
use 'saadparwaiz1/cmp_luasnip'
|
||||||
|
use 'L3MON4D3/LuaSnip'
|
||||||
use {
|
use {
|
||||||
'hrsh7th/nvim-cmp',
|
'hrsh7th/nvim-cmp',
|
||||||
config = function()
|
config = function()
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
completion = {
|
view = {
|
||||||
autocomplete = false
|
entries = {name = 'wildmenu', separator = '|' }
|
||||||
|
},
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require'luasnip'.lsp_expand(args.body)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
completion = cmp.config.window.bordered(),
|
||||||
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||||
@ -135,6 +177,8 @@ packer.startup(function(use)
|
|||||||
['<C-f>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
['<C-f>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'nvim_lsp_signature_help' },
|
||||||
|
{ name = 'nvim_lua' },
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
@ -149,26 +193,19 @@ packer.startup(function(use)
|
|||||||
use {
|
use {
|
||||||
'simrat39/rust-tools.nvim'
|
'simrat39/rust-tools.nvim'
|
||||||
}
|
}
|
||||||
use {
|
|
||||||
'WhoIsSethDaniel/toggle-lsp-diagnostics.nvim',
|
|
||||||
config = function()
|
|
||||||
require'toggle_lsp_diagnostics'.init()
|
|
||||||
vim.keymap.set('n', '<Leader>te', vim.cmd.ToggleDiag)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
use {
|
use {
|
||||||
'j-hui/fidget.nvim',
|
'j-hui/fidget.nvim',
|
||||||
after = 'rust-tools.nvim',
|
after = 'rust-tools.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
require("fidget").setup({})
|
require('fidget').setup({})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
use 'mfussenegger/nvim-dap'
|
use 'mfussenegger/nvim-dap'
|
||||||
use {
|
use {
|
||||||
"rcarriga/nvim-dap-ui",
|
'rcarriga/nvim-dap-ui',
|
||||||
requires = {"mfussenegger/nvim-dap"},
|
requires = {'mfussenegger/nvim-dap'},
|
||||||
config = function()
|
config = function()
|
||||||
require("dapui").setup()
|
require('dapui').setup()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
use 'mbbill/undotree'
|
use 'mbbill/undotree'
|
||||||
@ -183,16 +220,30 @@ packer.startup(function(use)
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
"kylechui/nvim-surround",
|
'kylechui/nvim-surround',
|
||||||
tag = "*", -- Use for stability; omit to use `main` branch for the latest features
|
tag = '*', -- Use for stability; omit to use `main` branch for the latest features
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-surround").setup({})
|
require('nvim-surround').setup({})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
'm4xshen/autoclose.nvim',
|
'm4xshen/autoclose.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
require("autoclose").setup({})
|
require('autoclose').setup({})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'ggandor/leap.nvim',
|
||||||
|
config = function()
|
||||||
|
require('leap').add_default_mappings()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
"folke/zen-mode.nvim",
|
||||||
|
config = function()
|
||||||
|
require("zen-mode").setup {
|
||||||
|
vim.keymap.set('n', '<leader>tz', vim.cmd.ZenMode)
|
||||||
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
-- use { 'TimUntersberger/neogit', requires = 'nvim-lua/plenary.nvim' }
|
-- use { 'TimUntersberger/neogit', requires = 'nvim-lua/plenary.nvim' }
|
||||||
@ -208,7 +259,7 @@ local augroup = vim.api.nvim_create_augroup
|
|||||||
|
|
||||||
autocmd(('BufWritePost'), {
|
autocmd(('BufWritePost'), {
|
||||||
group = augroup('packer_user_config', { clear = true }),
|
group = augroup('packer_user_config', { clear = true }),
|
||||||
pattern = "plugins.lua",
|
pattern = 'plugins.lua',
|
||||||
once = true,
|
once = true,
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.cmd('source ~/.config/nvim/lua/plugins.lua')
|
vim.cmd('source ~/.config/nvim/lua/plugins.lua')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user