add outline + way to open float diagnostic

master
Rostyslav Hnatyshyn 3 weeks ago
parent d4f42e8858
commit a5f3fe65b0
  1. 11
      nvim/cheatsheet.txt
  2. 31
      nvim/init.lua

@ -15,8 +15,15 @@ List workspace folders | <space>wl
## Gitsigns
Toggle deleted | <leader>td
Diff | <leader> hd
Preview hunk | <leader> hp
Diff | <leader>hd
Preview hunk | <leader>hp
Reset hunk | <leader>hr
## Misc
Outline | <leader>o
Trouble | <leader>xx
Find in project | <leader>f
Open filetree | <leader>v
Edit luaconfig | <leader>ec
Source luaconfig | <leader>sc
Open diagnostic info in floating window |<leader>dd

@ -21,7 +21,8 @@ vim.wo.cursorline = true
vim.opt.hlsearch = false
vim.opt.wrap = true
vim.opt.showmatch = true
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' }
vim.opt.shortmess = vim.opt.shortmess + "c"
vim.g.python3_host_prog = '/home/frosty/.dotfiles/nvim/env/bin/python'
@ -85,6 +86,8 @@ nmap("<leader>f", "<cmd>Telescope live_grep<cr>")
nmap("<leader>t", "<cmd>FloatermToggle<cr>")
map("t", "<leader>t", "<cmd>FloatermToggle<cr>")
nmap("<leader>dd", "<cmd> lua vim.diagnostic.open_float() <CR>")
local augroup = vim.api.nvim_create_augroup("Lspformatting", {})
-- lsp on_attach mappings
@ -142,11 +145,20 @@ lsp.svelte.setup { on_attach = on_attach }
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.offsetEncoding = { "utf-16" }
lsp.clangd.setup { on_attach = on_attach, capabilities = capabilities }
lsp.ts_ls.setup { on_attach = function(client, bufnr)
on_attach(client, bufnr)
end, }
lsp.ts_ls.setup { on_attach = on_attach }
lsp.marksman.setup { on_attach = on_attach }
lsp.rust_analyzer.setup { on_attach = on_attach }
lsp.rust_analyzer.setup { on_attach = on_attach,
settings = {
["rust-analyzer"] = {
checkOnSave = true,
check = {
enable = true,
command = "clippy",
features = "all"
}
}
}
}
lsp.lua_ls.setup { on_attach = on_attach,
settings = {
Lua = {
@ -375,6 +387,15 @@ return require('packer').startup(function(use)
}
end
}
use {
"hedyhli/outline.nvim",
config = function()
nmap("<leader>o", "<cmd>Outline<CR>")
require("outline").setup {
-- Your setup opts here (leave empty to use defaults)
}
end,
}
use {
'akinsho/bufferline.nvim',
tag = "*",

Loading…
Cancel
Save