style: minor changes
This commit is contained in:
parent
2bbf65ae35
commit
6f7482b299
5 changed files with 33 additions and 30 deletions
|
|
@ -3,14 +3,12 @@ return {
|
||||||
opts = {},
|
opts = {},
|
||||||
config = function()
|
config = function()
|
||||||
require("aerial").setup({
|
require("aerial").setup({
|
||||||
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
|
|
||||||
on_attach = function(bufnr)
|
on_attach = function(bufnr)
|
||||||
-- Jump forwards/backwards with '{' and '}'
|
-- Jump forwards/backwards with '{' and '}'
|
||||||
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
|
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
|
||||||
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
|
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
-- You probably also want to set a keymap to toggle aerial
|
|
||||||
vim.keymap.set("n", "<leader>a", "<cmd>AerialToggle!<CR>")
|
vim.keymap.set("n", "<leader>a", "<cmd>AerialToggle!<CR>")
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,9 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
float = {
|
float = {
|
||||||
-- Padding around the floating window
|
-- padding = 4,
|
||||||
padding = 4,
|
max_width = 0.65,
|
||||||
max_width = 80,
|
max_height = 0.4,
|
||||||
max_height = 25,
|
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
win_options = {
|
win_options = {
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
|
|
|
||||||
|
|
@ -2,19 +2,24 @@
|
||||||
-- list to help you solve all the trouble your code is causing.
|
-- list to help you solve all the trouble your code is causing.
|
||||||
-- https://github.com/folke/trouble.nvim
|
-- https://github.com/folke/trouble.nvim
|
||||||
return {
|
return {
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
keys = {
|
opts = {
|
||||||
-- TODO: add more keymaps
|
open_no_results = true,
|
||||||
{
|
auto_close = true,
|
||||||
"<leader>q",
|
indent_guides = false,
|
||||||
"<cmd>Trouble diagnostics toggle filter.buf=0 focus=true<cr>",
|
},
|
||||||
desc = "Diagnostics (Trouble)",
|
keys = {
|
||||||
},
|
-- TODO: add more keymaps
|
||||||
},
|
{
|
||||||
opts = {
|
"<leader>q",
|
||||||
open_no_results = true,
|
"<cmd>Trouble diagnostics toggle filter.buf=0 focus=false<cr>",
|
||||||
auto_close = true,
|
desc = "Diagnostics (Trouble)",
|
||||||
indent_guides = false,
|
},
|
||||||
},
|
-- {
|
||||||
|
-- "<leader>z",
|
||||||
|
-- "<cmd>Trouble lsp_document_symbols toggle filter.buf=0 focus=false win.position=right<cr>",
|
||||||
|
-- desc = "Symbols (Trouble)",
|
||||||
|
-- },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,8 @@ vim.opt.timeoutlen = 300
|
||||||
|
|
||||||
-- Set completeopt to have a better completion experience
|
-- Set completeopt to have a better completion experience
|
||||||
-- https://neovim.io/doc/user/options.html
|
-- https://neovim.io/doc/user/options.html
|
||||||
vim.opt.completeopt = "menuone,noselect"
|
-- vim.opt.completeopt = "menuone,noselect"
|
||||||
|
vim.opt.completeopt = "menuone,noselect,fuzzy,nosort"
|
||||||
|
|
||||||
-- Split windows appear below, not above
|
-- Split windows appear below, not above
|
||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
|
|
|
||||||
|
|
@ -69,14 +69,14 @@ vim.keymap.set("n", "J", "mzJ`z") -- when merging lines, keep cursor
|
||||||
-- )
|
-- )
|
||||||
|
|
||||||
-- Apply conform.nvim formatting on keypress (same as on save)
|
-- Apply conform.nvim formatting on keypress (same as on save)
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>o", function()
|
-- vim.keymap.set({ "n", "v" }, "<leader>o", function()
|
||||||
local conform = require("conform")
|
-- local conform = require("conform")
|
||||||
conform.format({
|
-- conform.format({
|
||||||
lsp_fallback = true,
|
-- lsp_fallback = true,
|
||||||
async = false,
|
-- async = false,
|
||||||
timeout_ms = 500,
|
-- timeout_ms = 500,
|
||||||
})
|
-- })
|
||||||
end, { desc = "Format file or range (in visual mode)" })
|
-- end, { desc = "Format file or range (in visual mode)" })
|
||||||
|
|
||||||
-- Go to next diagnostic item (any severity)
|
-- Go to next diagnostic item (any severity)
|
||||||
vim.keymap.set("n", "<leader>da", function()
|
vim.keymap.set("n", "<leader>da", function()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue