Split plugin configuration options into config directory, keep spec in plugin directory
This commit is contained in:
parent
1447abb240
commit
04ff522a0c
24
config/nvim/lua/config/catppuccin.lua
Normal file
24
config/nvim/lua/config/catppuccin.lua
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
return {
|
||||||
|
flavour = "macchiato",
|
||||||
|
transparent_background = true,
|
||||||
|
term_colors = true,
|
||||||
|
integrations = {
|
||||||
|
dashboard = true,
|
||||||
|
gitsigns = true,
|
||||||
|
indent_blankline = {
|
||||||
|
enabled = true,
|
||||||
|
colored_indent_levels = true,
|
||||||
|
},
|
||||||
|
cmp = true,
|
||||||
|
native_lsp = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
notify = true,
|
||||||
|
nvimtree = true,
|
||||||
|
treesitter = true,
|
||||||
|
treesitter_context = true,
|
||||||
|
telescope = true,
|
||||||
|
lsp_trouble = true,
|
||||||
|
which_key = true,
|
||||||
|
},
|
||||||
|
}
|
31
config/nvim/lua/config/dashboard.lua
Normal file
31
config/nvim/lua/config/dashboard.lua
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
return {
|
||||||
|
theme = "hyper",
|
||||||
|
config = {
|
||||||
|
week_header = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
shortcut = {
|
||||||
|
{ desc = " Update", group = "@property", action = "Lazy update", key = "u" },
|
||||||
|
{
|
||||||
|
icon = " ",
|
||||||
|
icon_hl = "@variable",
|
||||||
|
desc = "Files",
|
||||||
|
group = "Label",
|
||||||
|
action = "Telescope find_files",
|
||||||
|
key = "f",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
desc = " Apps",
|
||||||
|
group = "DiagnosticHint",
|
||||||
|
action = "Telescope app",
|
||||||
|
key = "a",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
desc = " dotfiles",
|
||||||
|
group = "Number",
|
||||||
|
action = "Telescope dotfiles",
|
||||||
|
key = "d",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
6
config/nvim/lua/config/diffview.lua
Normal file
6
config/nvim/lua/config/diffview.lua
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
return {
|
||||||
|
enhanced_diff_hl = true,
|
||||||
|
file_panel = {
|
||||||
|
listing_style = "list",
|
||||||
|
},
|
||||||
|
}
|
2
config/nvim/lua/config/feline.lua
Normal file
2
config/nvim/lua/config/feline.lua
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
local components = require("ui.feline_components").get()
|
||||||
|
return { components = components }
|
45
config/nvim/lua/config/gitsigns.lua
Normal file
45
config/nvim/lua/config/gitsigns.lua
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
return {
|
||||||
|
signcolumn = true,
|
||||||
|
numhl = true,
|
||||||
|
linehl = false,
|
||||||
|
current_line_blame = true,
|
||||||
|
word_diff = false,
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
local gs = package.loaded.gitsigns
|
||||||
|
|
||||||
|
local function map(mode, l, r, opts)
|
||||||
|
opts = opts or {}
|
||||||
|
opts.buffer = bufnr
|
||||||
|
vim.keymap.set(mode, l, r, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Navigation
|
||||||
|
map("n", "]c", function()
|
||||||
|
if vim.wo.diff then return "]c" end
|
||||||
|
vim.schedule(function() gs.next_hunk() end)
|
||||||
|
return "<Ignore>"
|
||||||
|
end, { expr = true })
|
||||||
|
|
||||||
|
map("n", "[c", function()
|
||||||
|
if vim.wo.diff then return "[c" end
|
||||||
|
vim.schedule(function() gs.prev_hunk() end)
|
||||||
|
return "<Ignore>"
|
||||||
|
end, { expr = true })
|
||||||
|
|
||||||
|
-- Actions
|
||||||
|
map({ "n", "v" }, "<leader>hs", ":Gitsigns stage_hunk<CR>")
|
||||||
|
map({ "n", "v" }, "<leader>hr", ":Gitsigns reset_hunk<CR>")
|
||||||
|
map("n", "<leader>hS", gs.stage_buffer)
|
||||||
|
map("n", "<leader>hu", gs.undo_stage_hunk)
|
||||||
|
map("n", "<leader>hR", gs.reset_buffer)
|
||||||
|
map("n", "<leader>hp", gs.preview_hunk)
|
||||||
|
map("n", "<leader>hb", function() gs.blame_line { full = true } end)
|
||||||
|
map("n", "<leader>tb", gs.toggle_current_line_blame)
|
||||||
|
map("n", "<leader>hd", gs.diffthis)
|
||||||
|
map("n", "<leader>hD", function() gs.diffthis "~" end)
|
||||||
|
map("n", "<leader>td", gs.toggle_deleted)
|
||||||
|
|
||||||
|
-- Text object
|
||||||
|
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>")
|
||||||
|
end,
|
||||||
|
}
|
12
config/nvim/lua/config/indent_blankline.lua
Normal file
12
config/nvim/lua/config/indent_blankline.lua
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
return {
|
||||||
|
show_current_context = true,
|
||||||
|
show_current_context_start = false,
|
||||||
|
char_highlight_list = {
|
||||||
|
"IndentBlanklineIndent1",
|
||||||
|
"IndentBlanklineIndent2",
|
||||||
|
"IndentBlanklineIndent3",
|
||||||
|
"IndentBlanklineIndent4",
|
||||||
|
"IndentBlanklineIndent5",
|
||||||
|
"IndentBlanklineIndent6",
|
||||||
|
},
|
||||||
|
}
|
20
config/nvim/lua/config/neotree.lua
Normal file
20
config/nvim/lua/config/neotree.lua
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
return {
|
||||||
|
close_if_last_window = true,
|
||||||
|
filesystem = {
|
||||||
|
filtered_items = {
|
||||||
|
hide_dotfiles = false,
|
||||||
|
},
|
||||||
|
group_empty_dirs = true,
|
||||||
|
},
|
||||||
|
buffers = {
|
||||||
|
follow_current_file = true,
|
||||||
|
group_empty_dirs = true,
|
||||||
|
},
|
||||||
|
git_status = {
|
||||||
|
group_empty_dirs = true,
|
||||||
|
},
|
||||||
|
source_selector = {
|
||||||
|
winbar = true,
|
||||||
|
statusline = false,
|
||||||
|
},
|
||||||
|
}
|
3
config/nvim/lua/config/notify.lua
Normal file
3
config/nvim/lua/config/notify.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
return {
|
||||||
|
background_colour = "#000000",
|
||||||
|
}
|
6
config/nvim/lua/config/nvim_test.lua
Normal file
6
config/nvim/lua/config/nvim_test.lua
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
return {
|
||||||
|
termOpts = {
|
||||||
|
direction = "horizontal",
|
||||||
|
keep_one = true,
|
||||||
|
},
|
||||||
|
}
|
17
config/nvim/lua/config/telescope.lua
Normal file
17
config/nvim/lua/config/telescope.lua
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
local trouble = require "trouble.providers.telescope"
|
||||||
|
return {
|
||||||
|
defaults = {
|
||||||
|
layout_strategy = "flex",
|
||||||
|
mappings = {
|
||||||
|
i = { ["<c-t>"] = trouble.open_with_trouble },
|
||||||
|
n = { ["<c-t>"] = trouble.open_with_trouble },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
fzf = {
|
||||||
|
fuzzy = true, -- false will only do exact matching
|
||||||
|
override_generic_sorter = true, -- override the generic sorter
|
||||||
|
override_file_sorter = true, -- override the file sorter
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
7
config/nvim/lua/config/treesitter.lua
Normal file
7
config/nvim/lua/config/treesitter.lua
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
return {
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
additional_vim_regex_highlighting = false,
|
||||||
|
disable = { "fortran" },
|
||||||
|
},
|
||||||
|
}
|
7
config/nvim/lua/config/trouble.lua
Normal file
7
config/nvim/lua/config/trouble.lua
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
return {
|
||||||
|
mode = "workspace_diagnostics",
|
||||||
|
auto_open = false,
|
||||||
|
auto_close = false,
|
||||||
|
auto_preview = true,
|
||||||
|
auto_jump = { "lsp_definitions", "lsp_references", "lsp_implementations" },
|
||||||
|
}
|
|
@ -1,3 +1,5 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
|
@ -13,39 +15,33 @@ for type, icon in pairs(signs) do
|
||||||
end
|
end
|
||||||
|
|
||||||
require("neodev").setup()
|
require("neodev").setup()
|
||||||
|
|
||||||
local on_attach = require "lsp.attach"
|
|
||||||
local lsp_flags = require "lsp.flags"
|
|
||||||
local lspconfig = require "lspconfig"
|
local lspconfig = require "lspconfig"
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
|
||||||
|
M.on_attach = require "lsp.attach"
|
||||||
|
M.lsp_flags = require "lsp.flags"
|
||||||
|
M.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
lspconfig.pyright.setup {
|
lspconfig.pyright.setup {
|
||||||
on_attach = on_attach,
|
on_attach = M.on_attach,
|
||||||
flags = lsp_flags,
|
flags = M.lsp_flags,
|
||||||
capabilities = capabilities,
|
capabilities = M.capabilities,
|
||||||
}
|
}
|
||||||
|
|
||||||
lspconfig.fortls.setup {
|
lspconfig.fortls.setup {
|
||||||
on_attach = on_attach,
|
on_attach = M.on_attach,
|
||||||
flags = lsp_flags,
|
flags = M.lsp_flags,
|
||||||
capabilities = capabilities,
|
capabilities = M.capabilities,
|
||||||
}
|
}
|
||||||
|
|
||||||
lspconfig.lua_ls.setup {
|
lspconfig.lua_ls.setup {
|
||||||
on_attach = on_attach,
|
on_attach = M.on_attach,
|
||||||
flags = lsp_flags,
|
flags = M.lsp_flags,
|
||||||
capabilities = capabilities,
|
capabilities = M.capabilities,
|
||||||
}
|
}
|
||||||
|
|
||||||
lspconfig.texlab.setup {
|
lspconfig.texlab.setup {
|
||||||
on_attach = on_attach,
|
on_attach = M.on_attach,
|
||||||
flags = lsp_flags,
|
flags = M.lsp_flags,
|
||||||
capabilities = capabilities,
|
capabilities = M.capabilities,
|
||||||
}
|
|
||||||
|
|
||||||
require("null-ls").setup {
|
|
||||||
sources = require "lsp.null_ls_sources",
|
|
||||||
on_attach = on_attach,
|
|
||||||
flags = lsp_flags,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
}
|
||||||
|
return M
|
|
@ -3,36 +3,12 @@ return {
|
||||||
name = "catppuccin",
|
name = "catppuccin",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
init = function()
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
require "ui.fillchars"
|
require "ui.fillchars"
|
||||||
require("catppuccin").setup {
|
end,
|
||||||
flavour = "macchiato",
|
config = function()
|
||||||
-- transparent_background = true,
|
require("catppuccin").setup(require "config.catppuccin")
|
||||||
term_colors = true,
|
|
||||||
dim_inactive = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
integrations = {
|
|
||||||
dashboard = true,
|
|
||||||
gitsigns = true,
|
|
||||||
indent_blankline = {
|
|
||||||
enabled = true,
|
|
||||||
colored_indent_levels = true,
|
|
||||||
},
|
|
||||||
cmp = true,
|
|
||||||
native_lsp = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
notify = true,
|
|
||||||
nvimtree = true,
|
|
||||||
treesitter = true,
|
|
||||||
treesitter_context = true,
|
|
||||||
telescope = true,
|
|
||||||
lsp_trouble = true,
|
|
||||||
which_key = true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
vim.cmd.colorscheme "catppuccin"
|
vim.cmd.colorscheme "catppuccin"
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"glepnir/dashboard-nvim",
|
"glepnir/dashboard-nvim",
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
config = function()
|
|
||||||
require("dashboard").setup {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
week_header = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{ desc = " Update", group = "@property", action = "Lazy update", key = "u" },
|
|
||||||
{
|
|
||||||
icon = " ",
|
|
||||||
icon_hl = "@variable",
|
|
||||||
desc = "Files",
|
|
||||||
group = "Label",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
key = "f",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = " Apps",
|
|
||||||
group = "DiagnosticHint",
|
|
||||||
action = "Telescope app",
|
|
||||||
key = "a",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = " dotfiles",
|
|
||||||
group = "Number",
|
|
||||||
action = "Telescope dotfiles",
|
|
||||||
key = "d",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
dependencies = { { "nvim-tree/nvim-web-devicons" } },
|
dependencies = { { "nvim-tree/nvim-web-devicons" } },
|
||||||
|
config = function() require("dashboard").setup(require "config.dashboard") end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,5 @@ return {
|
||||||
"DiffviewOpen",
|
"DiffviewOpen",
|
||||||
"DiffviewFileHistory",
|
"DiffviewFileHistory",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function() require("diffview").setup(require "config.diffview") end,
|
||||||
require("diffview").setup {
|
|
||||||
enhanced_diff_hl = true,
|
|
||||||
file_panel = {
|
|
||||||
listing_style = "list",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"feline-nvim/feline.nvim",
|
"feline-nvim/feline.nvim",
|
||||||
dependencies = { require "plugins.catppuccin" },
|
dependencies = { require "plugins.catppuccin" },
|
||||||
config = function()
|
config = function() require("feline").setup(require "config.feline") end,
|
||||||
local components = require("ui.feline_components").get()
|
|
||||||
require("feline").setup { components = components }
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,51 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = function()
|
config = function() require("gitsigns").setup(require "config.gitsigns") end,
|
||||||
require("gitsigns").setup {
|
|
||||||
signcolumn = true,
|
|
||||||
numhl = true,
|
|
||||||
linehl = false,
|
|
||||||
current_line_blame = true,
|
|
||||||
word_diff = false,
|
|
||||||
on_attach = function(bufnr)
|
|
||||||
local gs = package.loaded.gitsigns
|
|
||||||
|
|
||||||
local function map(mode, l, r, opts)
|
|
||||||
opts = opts or {}
|
|
||||||
opts.buffer = bufnr
|
|
||||||
vim.keymap.set(mode, l, r, opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Navigation
|
|
||||||
map("n", "]c", function()
|
|
||||||
if vim.wo.diff then return "]c" end
|
|
||||||
vim.schedule(function() gs.next_hunk() end)
|
|
||||||
return "<Ignore>"
|
|
||||||
end, { expr = true })
|
|
||||||
|
|
||||||
map("n", "[c", function()
|
|
||||||
if vim.wo.diff then return "[c" end
|
|
||||||
vim.schedule(function() gs.prev_hunk() end)
|
|
||||||
return "<Ignore>"
|
|
||||||
end, { expr = true })
|
|
||||||
|
|
||||||
-- Actions
|
|
||||||
map({ "n", "v" }, "<leader>hs", ":Gitsigns stage_hunk<CR>")
|
|
||||||
map({ "n", "v" }, "<leader>hr", ":Gitsigns reset_hunk<CR>")
|
|
||||||
map("n", "<leader>hS", gs.stage_buffer)
|
|
||||||
map("n", "<leader>hu", gs.undo_stage_hunk)
|
|
||||||
map("n", "<leader>hR", gs.reset_buffer)
|
|
||||||
map("n", "<leader>hp", gs.preview_hunk)
|
|
||||||
map("n", "<leader>hb", function() gs.blame_line { full = true } end)
|
|
||||||
map("n", "<leader>tb", gs.toggle_current_line_blame)
|
|
||||||
map("n", "<leader>hd", gs.diffthis)
|
|
||||||
map("n", "<leader>hD", function() gs.diffthis "~" end)
|
|
||||||
map("n", "<leader>td", gs.toggle_deleted)
|
|
||||||
|
|
||||||
-- Text object
|
|
||||||
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = function()
|
config = function() require("indent_blankline").setup(require "config.indent_blankline") end,
|
||||||
require("indent_blankline").setup {
|
|
||||||
show_current_context = true,
|
|
||||||
show_current_context_start = false,
|
|
||||||
char_highlight_list = {
|
|
||||||
"IndentBlanklineIndent1",
|
|
||||||
"IndentBlanklineIndent2",
|
|
||||||
"IndentBlanklineIndent3",
|
|
||||||
"IndentBlanklineIndent4",
|
|
||||||
"IndentBlanklineIndent5",
|
|
||||||
"IndentBlanklineIndent6",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,13 @@ return {
|
||||||
{ "folke/neodev.nvim" },
|
{ "folke/neodev.nvim" },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require "lsp.init"
|
local config = require "lsp.config"
|
||||||
|
require("null-ls").setup {
|
||||||
|
sources = require "lsp.null_ls_sources",
|
||||||
|
on_attach = config.on_attach,
|
||||||
|
flags = config.lsp_flags,
|
||||||
|
capabilities = config.capabilities,
|
||||||
|
}
|
||||||
require "lsp.cmp"
|
require "lsp.cmp"
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,25 +9,6 @@ return {
|
||||||
cmd = "Neotree",
|
cmd = "Neotree",
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]
|
vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]
|
||||||
require("neo-tree").setup {
|
require("neo-tree").setup(require "config.neotree")
|
||||||
close_if_last_window = true,
|
|
||||||
filesystem = {
|
|
||||||
filtered_items = {
|
|
||||||
hide_dotfiles = false,
|
|
||||||
},
|
|
||||||
group_empty_dirs = true,
|
|
||||||
},
|
|
||||||
buffers = {
|
|
||||||
follow_current_file = true,
|
|
||||||
group_empty_dirs = true,
|
|
||||||
},
|
|
||||||
git_status = {
|
|
||||||
group_empty_dirs = true,
|
|
||||||
},
|
|
||||||
source_selector = {
|
|
||||||
winbar = true,
|
|
||||||
statusline = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
return {
|
return {
|
||||||
"rcarriga/nvim-notify",
|
"rcarriga/nvim-notify",
|
||||||
config = function()
|
config = function()
|
||||||
require("notify").setup {
|
require("notify").setup(require "config.notify")
|
||||||
background_colour = "#000000",
|
|
||||||
}
|
|
||||||
vim.notify = require "notify"
|
vim.notify = require "notify"
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,12 +9,5 @@ return {
|
||||||
"TestVisit",
|
"TestVisit",
|
||||||
"TestInfo",
|
"TestInfo",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function() require("nvim-test").setup(require "config.nvim_test") end,
|
||||||
require("nvim-test").setup {
|
|
||||||
termOpts = {
|
|
||||||
direction = "horizontal",
|
|
||||||
keep_one = true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
}
|
|
@ -12,25 +12,7 @@ return {
|
||||||
cmd = "Telescope",
|
cmd = "Telescope",
|
||||||
config = function()
|
config = function()
|
||||||
require "telescope.actions"
|
require "telescope.actions"
|
||||||
local trouble = require "trouble.providers.telescope"
|
require("telescope").setup(require "config.telescope")
|
||||||
|
|
||||||
require("telescope").setup {
|
|
||||||
defaults = {
|
|
||||||
layout_strategy = "cursor",
|
|
||||||
mappings = {
|
|
||||||
i = { ["<c-t>"] = trouble.open_with_trouble },
|
|
||||||
n = { ["<c-t>"] = trouble.open_with_trouble },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
fzf = {
|
|
||||||
fuzzy = true, -- false will only do exact matching
|
|
||||||
override_generic_sorter = true, -- override the generic sorter
|
|
||||||
override_file_sorter = true, -- override the file sorter
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require("telescope").load_extension "fzf"
|
require("telescope").load_extension "fzf"
|
||||||
require("telescope").load_extension "notify"
|
require("telescope").load_extension "notify"
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = function()
|
config = function() require("nvim-treesitter.configs").setup(require "config.treesitter") end,
|
||||||
require("nvim-treesitter.configs").setup {
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
additional_vim_regex_highlighting = false,
|
|
||||||
disable = { "fortran" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,5 @@ return {
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
dependencies = "nvim-tree/nvim-web-devicons",
|
dependencies = "nvim-tree/nvim-web-devicons",
|
||||||
cmd = "TroubleToggle",
|
cmd = "TroubleToggle",
|
||||||
config = function()
|
config = function() require("trouble").setup(require "config.trouble") end,
|
||||||
require("trouble").setup {
|
|
||||||
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
|
||||||
auto_open = false, -- automatically open the list when you have diagnostics
|
|
||||||
auto_close = false, -- automatically close the list when you have no diagnostics
|
|
||||||
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
|
|
||||||
auto_jump = { "lsp_definitions", "lsp_references", "lsp_implementations" }, -- for the given modes, automatically jump if there is only a single result
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue