chore(nvim): a lot of changes
This commit is contained in:
parent
98d7e4b3d7
commit
8aeb7e3c87
12 changed files with 135 additions and 120 deletions
|
@ -25,18 +25,26 @@ return {
|
|||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
||||
providers = {
|
||||
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", fallbacks = { "lsp" } },
|
||||
lazydev = {
|
||||
name = "LazyDev",
|
||||
module = "lazydev.integrations.blink",
|
||||
fallbacks = { "lsp" }
|
||||
},
|
||||
},
|
||||
},
|
||||
signature = {
|
||||
enabled = true,
|
||||
window = {
|
||||
max_width = 160,
|
||||
max_height = 30,
|
||||
scrollbar = true,
|
||||
show_documentation = false,
|
||||
}
|
||||
},
|
||||
cmdline = {
|
||||
completion = {
|
||||
menu = {
|
||||
auto_show = true
|
||||
}
|
||||
}
|
||||
},
|
||||
completion = {
|
||||
accept = {
|
||||
auto_brackets = {
|
||||
|
|
|
@ -117,10 +117,19 @@ return {
|
|||
capabilities = capabilities,
|
||||
filetypes = { 'haskell', 'lhaskell', 'cabal' },
|
||||
})
|
||||
lspconfig["clangd"].setup({
|
||||
-- lspconfig["clangd"].setup({
|
||||
-- capabilities = capabilities,
|
||||
-- })
|
||||
lspconfig["texlab"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
lspconfig["texlab"].setup({
|
||||
lspconfig["bashls"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
lspconfig["zls"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
lspconfig["pyright"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
|
@ -165,11 +174,35 @@ return {
|
|||
rust = { "rustfmt" },
|
||||
go = { "gofmt" },
|
||||
json = { "jq" },
|
||||
bash = { "shfmt" }
|
||||
bash = { "shfmt", "beautysh" },
|
||||
zsh = { "beautysh" }
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
'mfussenegger/nvim-lint',
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
|
||||
lint.linters_by_ft = {
|
||||
go = { "golangcilint" },
|
||||
}
|
||||
|
||||
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>li", function()
|
||||
lint.try_lint()
|
||||
end, { desc = "Trigger linting for current file" })
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"lervag/vimtex",
|
||||
|
@ -180,6 +213,15 @@ return {
|
|||
else
|
||||
vim.g.vimtex_view_method = 'zathura'
|
||||
end
|
||||
vim.g.vimtex_quickfix_ignore_filters = {
|
||||
"warning",
|
||||
"Warning"
|
||||
}
|
||||
vim.g.vimtex_quickfix_open_on_warning = 0
|
||||
vim.g.vimtex_quickfix_ignore_filters = {
|
||||
'Overfull',
|
||||
'Underfull',
|
||||
}
|
||||
vim.g.vimtex_compiler_method = 'latexmk'
|
||||
vim.g.vimtex_compiler_latexmk = {
|
||||
out_dir = 'build',
|
||||
|
|
|
@ -25,6 +25,7 @@ return {
|
|||
statuscolumn = { enabled = true },
|
||||
dashboard = { enabled = true },
|
||||
input = { enabled = true },
|
||||
image = { enabled = true },
|
||||
lazygit = {
|
||||
vim.keymap.set('n', '<leader>lg', function()
|
||||
Snacks.lazygit.open()
|
||||
|
@ -46,5 +47,15 @@ return {
|
|||
end
|
||||
},
|
||||
"tpope/vim-fugitive",
|
||||
"pimalaya/himalaya-vim"
|
||||
{
|
||||
"afonsofrancof/worktrees.nvim",
|
||||
dev = true,
|
||||
opts = {
|
||||
mappings = {
|
||||
create = "<leader>wtc",
|
||||
delete = "<leader>wtd",
|
||||
switch = "<leader>wts",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ return {
|
|||
fzflua.setup({
|
||||
defaults = {
|
||||
winopts = {
|
||||
border = "single",
|
||||
border = "rounded",
|
||||
width = 0.6,
|
||||
height = 0.5,
|
||||
},
|
||||
|
|
24
.config/nvim/lua/plugins/statusline.lua
Normal file
24
.config/nvim/lua/plugins/statusline.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
return {
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
opts = {
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = { { 'filename', path = 1 } },
|
||||
lualine_x = { 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' }
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
|
@ -19,6 +19,15 @@ return {
|
|||
disable = { "latex" },
|
||||
use_languagetree = true,
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "gnn",
|
||||
node_incremental = "grn",
|
||||
scope_incremental = "grc",
|
||||
node_decremental = "grm",
|
||||
},
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
return {
|
||||
|
||||
{
|
||||
"vimpostor/vim-tpipeline",
|
||||
config = function()
|
||||
vim.g.tpipeline_restore = 0
|
||||
vim.g.tpipeline_autoembed = 0
|
||||
vim.o.laststatus = 0
|
||||
vim.g.tpipeline_statusline = '%=%l:%c'
|
||||
end
|
||||
},
|
||||
-- {
|
||||
-- "vimpostor/vim-tpipeline",
|
||||
-- config = function()
|
||||
-- vim.g.tpipeline_restore = 0
|
||||
-- vim.g.tpipeline_autoembed = 0
|
||||
-- vim.o.laststatus = 0
|
||||
-- vim.g.tpipeline_statusline = '%=%l:%c'
|
||||
-- end
|
||||
-- },
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
|
@ -36,6 +36,7 @@ return {
|
|||
},
|
||||
{
|
||||
'kevinhwang91/nvim-ufo',
|
||||
event = "VeryLazy",
|
||||
dependencies = 'kevinhwang91/promise-async',
|
||||
config = function()
|
||||
vim.o.foldcolumn = '0'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue