mirror of https://github.com/sgoudham/dotfiles.git
refactor(nvim): reformat with stylua
parent
dcd88bf26c
commit
4c00a4bea6
@ -1,3 +1,3 @@
|
||||
return {
|
||||
{ "superhawk610/ascii-blocks.nvim", cmd = "AsciiBlockify" },
|
||||
{ "superhawk610/ascii-blocks.nvim", cmd = "AsciiBlockify" },
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
return {
|
||||
{ "cloudysake/asciitree.nvim", cmd = "AsciiTree" },
|
||||
{ "cloudysake/asciitree.nvim", cmd = "AsciiTree" },
|
||||
}
|
||||
|
@ -1,16 +1,13 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup({
|
||||
disable_in_macro = true,
|
||||
})
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
local cmp = require('cmp')
|
||||
cmp.event:on(
|
||||
'confirm_done',
|
||||
cmp_autopairs.on_confirm_done()
|
||||
)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup({
|
||||
disable_in_macro = true,
|
||||
})
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
local cmp = require("cmp")
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -1,59 +1,59 @@
|
||||
return {
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local cp = require("catppuccin.palettes").get_palette()
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local cp = require("catppuccin.palettes").get_palette()
|
||||
|
||||
require("catppuccin").setup({
|
||||
flavour = "mocha",
|
||||
transparent_background = true,
|
||||
term_colors = true,
|
||||
no_italic = true,
|
||||
integrations = {
|
||||
mason = true,
|
||||
native_lsp = { enabled = true },
|
||||
navic = {
|
||||
enabled = true,
|
||||
custom_bg = "NONE",
|
||||
},
|
||||
noice = true,
|
||||
notify = true,
|
||||
dap = {
|
||||
enabled = true,
|
||||
enable_ui = true,
|
||||
},
|
||||
cmp = true,
|
||||
treesitter = true,
|
||||
overseer = true,
|
||||
telescope = true,
|
||||
which_key = true,
|
||||
},
|
||||
color_overrides = {
|
||||
mocha = {
|
||||
base = "#000000",
|
||||
mantle = "#000000",
|
||||
surface2 = cp.subtext0,
|
||||
overlay0 = cp.subtext0,
|
||||
},
|
||||
},
|
||||
custom_highlights = {
|
||||
ErrorMsg = { fg = cp.red, style = { "bold" } },
|
||||
LspInfoBorder = { link = "FloatBorder" },
|
||||
PmenuSel = { bg = cp.surface0 },
|
||||
FloatBorder = { fg = cp.overlay0, bg = "NONE" },
|
||||
TelescopeBorder = { link = "FloatBorder" },
|
||||
TelescopeMatching = { link = "TelescopeNormal" },
|
||||
TelescopeSelection = { fg = "NONE", bg = cp.surface0 },
|
||||
TelescopeTitle = { fg = cp.subtext0 },
|
||||
QuickScopePrimary = { fg = cp.maroon },
|
||||
QuickScopeSecondary = { fg = cp.peach },
|
||||
-- MiniIndentscopeSymbol = { fg = cp.blue },
|
||||
},
|
||||
})
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
end,
|
||||
},
|
||||
require("catppuccin").setup({
|
||||
flavour = "mocha",
|
||||
transparent_background = true,
|
||||
term_colors = true,
|
||||
no_italic = true,
|
||||
integrations = {
|
||||
mason = true,
|
||||
native_lsp = { enabled = true },
|
||||
navic = {
|
||||
enabled = true,
|
||||
custom_bg = "NONE",
|
||||
},
|
||||
noice = true,
|
||||
notify = true,
|
||||
dap = {
|
||||
enabled = true,
|
||||
enable_ui = true,
|
||||
},
|
||||
cmp = true,
|
||||
treesitter = true,
|
||||
overseer = true,
|
||||
telescope = true,
|
||||
which_key = true,
|
||||
},
|
||||
color_overrides = {
|
||||
mocha = {
|
||||
base = "#000000",
|
||||
mantle = "#000000",
|
||||
surface2 = cp.subtext0,
|
||||
overlay0 = cp.subtext0,
|
||||
},
|
||||
},
|
||||
custom_highlights = {
|
||||
ErrorMsg = { fg = cp.red, style = { "bold" } },
|
||||
LspInfoBorder = { link = "FloatBorder" },
|
||||
PmenuSel = { bg = cp.surface0 },
|
||||
FloatBorder = { fg = cp.overlay0, bg = "NONE" },
|
||||
TelescopeBorder = { link = "FloatBorder" },
|
||||
TelescopeMatching = { link = "TelescopeNormal" },
|
||||
TelescopeSelection = { fg = "NONE", bg = cp.surface0 },
|
||||
TelescopeTitle = { fg = cp.subtext0 },
|
||||
QuickScopePrimary = { fg = cp.red },
|
||||
QuickScopeSecondary = { fg = cp.peach },
|
||||
-- MiniIndentscopeSymbol = { fg = cp.blue },
|
||||
},
|
||||
})
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
return {
|
||||
{ "uga-rosa/ccc.nvim", config = { highlighter = { auto_enable = true } } },
|
||||
{ "uga-rosa/ccc.nvim", config = { highlighter = { auto_enable = true } } },
|
||||
}
|
||||
|
@ -1,110 +1,110 @@
|
||||
local has_words_before = function()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local cmp_under_comparator = require("cmp-under-comparator")
|
||||
local lspkind = require("lspkind")
|
||||
local luasnip = require("luasnip")
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local cmp_under_comparator = require("cmp-under-comparator")
|
||||
local lspkind = require("lspkind")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<A-k>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
||||
["<A-j>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
||||
["<A-p>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<A-n>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete({}),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}),
|
||||
sorting = {
|
||||
comparators = {
|
||||
cmp.config.compare.offset,
|
||||
cmp.config.compare.exact,
|
||||
cmp.config.compare.score,
|
||||
cmp_under_comparator.under,
|
||||
cmp.config.compare.kind,
|
||||
cmp.config.compare.sort_text,
|
||||
cmp.config.compare.length,
|
||||
cmp.config.compare.order,
|
||||
},
|
||||
},
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = "symbol",
|
||||
maxwidth = 30,
|
||||
ellipsis_char = "…",
|
||||
}),
|
||||
},
|
||||
})
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<A-k>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
||||
["<A-j>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
||||
["<A-p>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<A-n>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete({}),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
cmp.setup.cmdline({ "/", "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}),
|
||||
sorting = {
|
||||
comparators = {
|
||||
cmp.config.compare.offset,
|
||||
cmp.config.compare.exact,
|
||||
cmp.config.compare.score,
|
||||
cmp_under_comparator.under,
|
||||
cmp.config.compare.kind,
|
||||
cmp.config.compare.sort_text,
|
||||
cmp.config.compare.length,
|
||||
cmp.config.compare.order,
|
||||
},
|
||||
},
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = "symbol",
|
||||
maxwidth = 30,
|
||||
ellipsis_char = "…",
|
||||
}),
|
||||
},
|
||||
})
|
||||
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"lukas-reineke/cmp-under-comparator",
|
||||
cmp.setup.cmdline({ "/", "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"lukas-reineke/cmp-under-comparator",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
return {
|
||||
{
|
||||
"andythigpen/nvim-coverage",
|
||||
config = true,
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
{
|
||||
"andythigpen/nvim-coverage",
|
||||
config = true,
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
}
|
||||
|
@ -1,90 +1,90 @@
|
||||
local get_python_path = function()
|
||||
for _, client in pairs(vim.lsp.buf_get_clients()) do
|
||||
if client.name == "pyright" then
|
||||
local path = client.config.settings.python.pythonPath
|
||||
if path ~= nil then
|
||||
return path
|
||||
else
|
||||
return "python"
|
||||
end
|
||||
end
|
||||
for _, client in pairs(vim.lsp.buf_get_clients()) do
|
||||
if client.name == "pyright" then
|
||||
local path = client.config.settings.python.pythonPath
|
||||
if path ~= nil then
|
||||
return path
|
||||
else
|
||||
return "python"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"jayp0521/mason-nvim-dap.nvim",
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
local mason_dap = require("mason-nvim-dap")
|
||||
{
|
||||
"jayp0521/mason-nvim-dap.nvim",
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
local mason_dap = require("mason-nvim-dap")
|
||||
|
||||
mason_dap.setup({
|
||||
ensure_installed = { "python", "codelldb" },
|
||||
automatic_setup = true,
|
||||
})
|
||||
mason_dap.setup_handlers({
|
||||
-- default handler
|
||||
function(source)
|
||||
require("mason-nvim-dap.automatic_setup")(source)
|
||||
end,
|
||||
|
||||
-- custom handlers
|
||||
python = function(_)
|
||||
dap.adapters.python = {
|
||||
type = "executable",
|
||||
command = "debugpy-adapter",
|
||||
}
|
||||
|
||||
dap.configurations.python = {
|
||||
{
|
||||
name = "Launch current file",
|
||||
type = "python",
|
||||
request = "launch",
|
||||
program = "${file}",
|
||||
pythonPath = get_python_path,
|
||||
},
|
||||
{
|
||||
name = "Launch pytest",
|
||||
type = "python",
|
||||
request = "launch",
|
||||
module = "pytest",
|
||||
pythonPath = get_python_path,
|
||||
},
|
||||
}
|
||||
end,
|
||||
})
|
||||
mason_dap.setup({
|
||||
ensure_installed = { "python", "codelldb" },
|
||||
automatic_setup = true,
|
||||
})
|
||||
mason_dap.setup_handlers({
|
||||
-- default handler
|
||||
function(source)
|
||||
require("mason-nvim-dap.automatic_setup")(source)
|
||||
end,
|
||||
|
||||
-- apply suggestions from catppuccin theme
|
||||
local sign = vim.fn.sign_define
|
||||
-- custom handlers
|
||||
python = function(_)
|
||||
dap.adapters.python = {
|
||||
type = "executable",
|
||||
command = "debugpy-adapter",
|
||||
}
|
||||
|
||||
sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = "" })
|
||||
sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = "" })
|
||||
sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = "" })
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>db",
|
||||
vim.cmd.DapToggleBreakpoint,
|
||||
desc = "Toggle breakpoint",
|
||||
},
|
||||
dap.configurations.python = {
|
||||
{
|
||||
"<leader>du",
|
||||
function()
|
||||
require("dapui").toggle({})
|
||||
end,
|
||||
desc = "Toggle UI",
|
||||
name = "Launch current file",
|
||||
type = "python",
|
||||
request = "launch",
|
||||
program = "${file}",
|
||||
pythonPath = get_python_path,
|
||||
},
|
||||
{
|
||||
"<leader>dx",
|
||||
vim.cmd.DapContinue,
|
||||
desc = "Start / Continue",
|
||||
name = "Launch pytest",
|
||||
type = "python",
|
||||
request = "launch",
|
||||
module = "pytest",
|
||||
pythonPath = get_python_path,
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"mfussenegger/nvim-dap",
|
||||
{ "rcarriga/nvim-dap-ui", config = true },
|
||||
{ "theHamsta/nvim-dap-virtual-text", config = true },
|
||||
},
|
||||
}
|
||||
end,
|
||||
})
|
||||
|
||||
-- apply suggestions from catppuccin theme
|
||||
local sign = vim.fn.sign_define
|
||||
|
||||
sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = "" })
|
||||
sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = "" })
|
||||
sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = "" })
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>db",
|
||||
vim.cmd.DapToggleBreakpoint,
|
||||
desc = "Toggle breakpoint",
|
||||
},
|
||||
{
|
||||
"<leader>du",
|
||||
function()
|
||||
require("dapui").toggle({})
|
||||
end,
|
||||
desc = "Toggle UI",
|
||||
},
|
||||
{
|
||||
"<leader>dx",
|
||||
vim.cmd.DapContinue,
|
||||
desc = "Start / Continue",
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"mfussenegger/nvim-dap",
|
||||
{ "rcarriga/nvim-dap-ui", config = true },
|
||||
{ "theHamsta/nvim-dap-virtual-text", config = true },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
return {
|
||||
{
|
||||
"ja-ford/delaytrain.nvim",
|
||||
config = {
|
||||
grace_period = 3,
|
||||
ignore_filetypes = { "help", "NvimTr*", "lazy", "mason" },
|
||||
},
|
||||
{
|
||||
"ja-ford/delaytrain.nvim",
|
||||
config = {
|
||||
grace_period = 3,
|
||||
ignore_filetypes = { "help", "NvimTr*", "lazy", "mason" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,27 +1,27 @@
|
||||
return {
|
||||
{
|
||||
"feline-nvim/feline.nvim",
|
||||
config = function()
|
||||
local feline = require("feline")
|
||||
local ctp_feline = require("catppuccin.groups.integrations.feline")
|
||||
{
|
||||
"feline-nvim/feline.nvim",
|
||||
config = function()
|
||||
local feline = require("feline")
|
||||
local ctp_feline = require("catppuccin.groups.integrations.feline")
|
||||
|
||||
feline.setup({
|
||||
components = ctp_feline.get(),
|
||||
force_inactive = {
|
||||
filetypes = {
|
||||
-- "^NvimTree$",
|
||||
"^packer$",
|
||||
"^startify$",
|
||||
"^fugitive$",
|
||||
"^fugitiveblame$",
|
||||
"^qf$",
|
||||
"^help$",
|
||||
},
|
||||
},
|
||||
})
|
||||
-- catppuccin statusline
|
||||
ctp_feline.setup({})
|
||||
end,
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
feline.setup({
|
||||
components = ctp_feline.get(),
|
||||
force_inactive = {
|
||||
filetypes = {
|
||||
-- "^NvimTree$",
|
||||
"^packer$",
|
||||
"^startify$",
|
||||
"^fugitive$",
|
||||
"^fugitiveblame$",
|
||||
"^qf$",
|
||||
"^help$",
|
||||
},
|
||||
},
|
||||
})
|
||||
-- catppuccin statusline
|
||||
ctp_feline.setup({})
|
||||
end,
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
-- misc plugins
|
||||
return {
|
||||
{ "kana/vim-textobj-entire", dependencies = { "kana/vim-textobj-user" } },
|
||||
"kevinhwang91/nvim-bqf",
|
||||
"stevearc/dressing.nvim",
|
||||
"mong8se/actually.nvim",
|
||||
"andweeb/presence.nvim",
|
||||
{ "kana/vim-textobj-entire", dependencies = { "kana/vim-textobj-user" } },
|
||||
"kevinhwang91/nvim-bqf",
|
||||
"stevearc/dressing.nvim",
|
||||
"mong8se/actually.nvim",
|
||||
"andweeb/presence.nvim",
|
||||
}
|
||||
|
@ -1,188 +1,196 @@
|
||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||
end
|
||||
|
||||
vim.diagnostic.config({
|
||||
float = { border = "rounded" },
|
||||
update_in_insert = true,
|
||||
float = { border = "rounded" },
|
||||
update_in_insert = true,
|
||||
})
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" })
|
||||
|
||||
local default_config = {
|
||||
on_attach = function(client, bufnr)
|
||||
require("lsp-format").on_attach(client)
|
||||
on_attach = function(client, bufnr)
|
||||
require("lsp-format").on_attach(client)
|
||||
|
||||
-- add lsp-only keybinds
|
||||
local map = function(sequence, cmd, desc)
|
||||
vim.keymap.set("n", sequence, cmd, { buffer = bufnr, desc = desc })
|
||||
end
|
||||
-- add lsp-only keybinds
|
||||
local map = function(sequence, cmd, desc)
|
||||
vim.keymap.set("n", sequence, cmd, { buffer = bufnr, desc = desc })
|
||||
end
|
||||
|
||||
map("gd", function()
|
||||
require("telescope.builtin").lsp_definitions()
|
||||
end, "LSP Definitions")
|
||||
map("gr", function()
|
||||
require("telescope.builtin").lsp_references()
|
||||
end, "LSP References")
|
||||
map("gI", function()
|
||||
require("telescope.builtin").lsp_implementations()
|
||||
end, "LSP Implementations")
|
||||
map("K", vim.lsp.buf.hover, "Hover")
|
||||
map("]d", vim.diagnostic.goto_next, "Next diagnostic")
|
||||
map("[d", vim.diagnostic.goto_prev, "Previous diagnostic")
|
||||
map("K", vim.lsp.buf.hover, "Hover")
|
||||
map("]d", vim.diagnostic.goto_next, "Next diagnostic")
|
||||
map("[d", vim.diagnostic.goto_prev, "Previous diagnostic")
|
||||
|
||||
map("<leader>la", vim.lsp.buf.code_action, "Code Action")
|
||||
map("<leader>lr", vim.lsp.buf.rename, "Rename")
|
||||
map("<leader>lf", vim.lsp.buf.format, "Format")
|
||||
map("<leader>li", "<cmd>LspInfo<cr>", "LSP Info")
|
||||
map("<leader>lI", "<cmd>Mason<cr>", "Mason Info")
|
||||
map("<leader>lw", function()
|
||||
require("telescope.builtin").diagnostics()
|
||||
end, "LSP Workplace Diagnostics")
|
||||
map("<leader>ld", function()
|
||||
require("telescope.builtin").diagnostics({ bufnr = 0 })
|
||||
end, "LSP Buffer Diagnostics")
|
||||
map("<leader>ls", function()
|
||||
require("telescope.builtin").lsp_document_symbols()
|
||||
end, "LSP Document Symbols")
|
||||
map("<leader>lS", function()
|
||||
require("telescope.builtin").lsp_workspace_symbols()
|
||||
end, "LSP Workplace Symbols")
|
||||
end,
|
||||
map("gs", vim.lsp.buf.signature_help, "LSP Signature Help")
|
||||
map("gD", vim.lsp.buf.declaration, "LSP Declarations")
|
||||
map("gd", function()
|
||||
require("telescope.builtin").lsp_definitions()
|
||||
end, "LSP Definitions")
|
||||
map("gr", function()
|
||||
require("telescope.builtin").lsp_references()
|
||||
end, "LSP References")
|
||||
map("gI", function()
|
||||
require("telescope.builtin").lsp_implementations()
|
||||
end, "LSP Implementations")
|
||||
map("gl", function()
|
||||
vim.diagnostic.open_float(0, {
|
||||
scope = "line",
|
||||
})
|
||||
end)
|
||||
|
||||
map("<leader>la", vim.lsp.buf.code_action, "Code Action")
|
||||
map("<leader>lr", vim.lsp.buf.rename, "Rename")
|
||||
map("<leader>lf", vim.lsp.buf.format, "Format")
|
||||
map("<leader>li", "<cmd>LspInfo<cr>", "LSP Info")
|
||||
map("<leader>lI", "<cmd>Mason<cr>", "Mason Info")
|
||||
map("<leader>lw", function()
|
||||
require("telescope.builtin").diagnostics()
|
||||
end, "LSP Workplace Diagnostics")
|
||||
map("<leader>ld", function()
|
||||
require("telescope.builtin").diagnostics({ bufnr = 0 })
|
||||
end, "LSP Buffer Diagnostics")
|
||||
map("<leader>ls", function()
|
||||
require("telescope.builtin").lsp_document_symbols()
|
||||
end, "LSP Document Symbols")
|
||||
map("<leader>lS", function()
|
||||
require("telescope.builtin").lsp_workspace_symbols()
|
||||
end, "LSP Workplace Symbols")
|
||||
end,
|
||||
}
|
||||
|
||||
local custom_config = function(config)
|
||||
local merged_config = vim.deepcopy(default_config)
|
||||
merged_config = vim.tbl_extend("force", merged_config, config)
|
||||
return merged_config
|
||||
local merged_config = vim.deepcopy(default_config)
|
||||
merged_config = vim.tbl_extend("force", merged_config, config)
|
||||
return merged_config
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require("lspconfig.ui.windows").default_options.border = "rounded"
|
||||
end,
|
||||
dependencies = {
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("lspconfig.ui.windows").default_options.border = "rounded"
|
||||
end,
|
||||
dependencies = {
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "rust_analyzer", "pyright", "sumneko_lua" },
|
||||
})
|
||||
require("mason-lspconfig").setup_handlers({
|
||||
-- default handler
|
||||
function(server_name)
|
||||
require("lspconfig")[server_name].setup(default_config)
|
||||
end,
|
||||
["rust_analyzer"] = function()
|
||||
-- https://github.com/simrat39/rust-tools.nvim/issues/300
|
||||
local config = custom_config({
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
inlayHints = { locationLinks = false },
|
||||
},
|
||||
},
|
||||
})
|
||||
require("rust-tools").setup({
|
||||
server = config,
|
||||
dap = {
|
||||
adapter = {
|
||||
type = "server",
|
||||
port = "${port}",
|
||||
host = "127.0.0.1",
|
||||
executable = {
|
||||
command = "codelldb",
|
||||
args = { "--port", "${port}" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
["pyright"] = function()
|
||||
require("py_lsp").setup(default_config)
|
||||
end,
|
||||
["hls"] = function()
|
||||
local ht = require("haskell-tools")
|
||||
local def_opts = { noremap = true, silent = true }
|
||||
ht.setup({
|
||||
hls = {
|
||||
on_attach = function(client, bufnr)
|
||||
local opts = vim.tbl_extend("keep", def_opts, { buffer = bufnr })
|
||||
-- haskell-language-server relies heavily on codeLenses,
|
||||
-- so auto-refresh (see advanced configuration) is enabled by default
|
||||
-- vim.keymap.set("n", "<space>ca", vim.lsp.codelens.run, opts)
|
||||
-- vim.keymap.set("n", "<space>hs", ht.hoogle.hoogle_signature, opts)
|
||||
end,
|
||||
},
|
||||
})
|
||||
-- Suggested keymaps that do not depend on haskell-language-server
|
||||
-- Toggle a GHCi repl for the current package
|
||||
vim.keymap.set("n", "<leader>rr", ht.repl.toggle, def_opts)
|
||||
-- Toggle a GHCi repl for the current buffer
|
||||
vim.keymap.set("n", "<leader>rf", function()
|
||||
ht.repl.toggle(vim.api.nvim_buf_get_name(0))
|
||||
end, def_opts)
|
||||
vim.keymap.set("n", "<leader>rq", ht.repl.quit, def_opts)
|
||||
end,
|
||||
["sumneko_lua"] = function()
|
||||
require("lspconfig")["sumneko_lua"].setup(custom_config({
|
||||
settings = {
|
||||
Lua = {
|
||||
format = {
|
||||
enable = false,
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}))
|
||||
end,
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
{ "folke/neodev.nvim", config = true },
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "rust_analyzer", "pyright", "sumneko_lua" },
|
||||
})
|
||||
require("mason-lspconfig").setup_handlers({
|
||||
-- default handler
|
||||
function(server_name)
|
||||
require("lspconfig")[server_name].setup(default_config)
|
||||
end,
|
||||
["rust_analyzer"] = function()
|
||||
-- https://github.com/simrat39/rust-tools.nvim/issues/300
|
||||
local config = custom_config({
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
inlayHints = { locationLinks = false },
|
||||
},
|
||||
},
|
||||
},
|
||||
"simrat39/rust-tools.nvim",
|
||||
"mrcjkb/haskell-tools.nvim",
|
||||
"HallerPatrick/py_lsp.nvim",
|
||||
{ "SmiteshP/nvim-navic", config = { highlight = true } },
|
||||
"onsails/lspkind.nvim",
|
||||
{ "lukas-reineke/lsp-format.nvim", config = true },
|
||||
"folke/neodev.nvim",
|
||||
"ray-x/lsp_signature.nvim",
|
||||
},
|
||||
},
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua.with({
|
||||
extra_args = { "--indent-type", "spaces" },
|
||||
}),
|
||||
-- null_ls.builtins.formatting.black,
|
||||
-- null_ls.builtins.formatting.isort.with({
|
||||
-- extra_args = { "--profile", "black" },
|
||||
-- }),
|
||||
})
|
||||
require("rust-tools").setup({
|
||||
server = config,
|
||||
dap = {
|
||||
adapter = {
|
||||
type = "server",
|
||||
port = "${port}",
|
||||
host = "127.0.0.1",
|
||||
executable = {
|
||||
command = "codelldb",
|
||||
args = { "--port", "${port}" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
["pyright"] = function()
|
||||
require("py_lsp").setup(default_config)
|
||||
end,
|
||||
["hls"] = function()
|
||||
local ht = require("haskell-tools")
|
||||
local def_opts = { noremap = true, silent = true }
|
||||
ht.setup({
|
||||
hls = {
|
||||
on_attach = function(client, bufnr)
|
||||
local opts = vim.tbl_extend("keep", def_opts, { buffer = bufnr })
|
||||
-- haskell-language-server relies heavily on codeLenses,
|
||||
-- so auto-refresh (see advanced configuration) is enabled by default
|
||||
-- vim.keymap.set("n", "<space>ca", vim.lsp.codelens.run, opts)
|
||||
-- vim.keymap.set("n", "<space>hs", ht.hoogle.hoogle_signature, opts)
|
||||
end,
|
||||
},
|
||||
})
|
||||
-- Suggested keymaps that do not depend on haskell-language-server
|
||||
-- Toggle a GHCi repl for the current package
|
||||
vim.keymap.set("n", "<leader>rr", ht.repl.toggle, def_opts)
|
||||
-- Toggle a GHCi repl for the current buffer
|
||||
vim.keymap.set("n", "<leader>rf", function()
|
||||
ht.repl.toggle(vim.api.nvim_buf_get_name(0))
|
||||
end, def_opts)
|
||||
vim.keymap.set("n", "<leader>rq", ht.repl.quit, def_opts)
|
||||
end,
|
||||
["sumneko_lua"] = function()
|
||||
require("lspconfig")["sumneko_lua"].setup(custom_config({
|
||||
settings = {
|
||||
Lua = {
|
||||
format = {
|
||||
enable = false,
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}))
|
||||
end,
|
||||
})
|
||||
end,
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
{ "folke/neodev.nvim", config = true },
|
||||
},
|
||||
},
|
||||
"simrat39/rust-tools.nvim",
|
||||
"mrcjkb/haskell-tools.nvim",
|
||||
"HallerPatrick/py_lsp.nvim",
|
||||
{ "SmiteshP/nvim-navic", config = { highlight = true } },
|
||||
"onsails/lspkind.nvim",
|
||||
{ "lukas-reineke/lsp-format.nvim", config = true },
|
||||
"folke/neodev.nvim",
|
||||
"ray-x/lsp_signature.nvim",
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
config = {
|
||||
ensure_installed = { "stylua" },
|
||||
},
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua.with({
|
||||
extra_args = { "--indent-type", "spaces" },
|
||||
}),
|
||||
-- null_ls.builtins.formatting.black,
|
||||
-- null_ls.builtins.formatting.isort.with({
|
||||
-- extra_args = { "--profile", "black" },
|
||||
-- }),
|
||||
},
|
||||
})
|
||||
end,
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
config = {
|
||||
ensure_installed = { "stylua" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = {
|
||||
ui = { border = "rounded" },
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = {
|
||||
ui = { border = "rounded" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,22 +1,22 @@
|
||||
return {
|
||||
{
|
||||
"echasnovski/mini.nvim",
|
||||
config = function()
|
||||
-- add gc/gcc actions, gc textobject
|
||||
require("mini.comment").setup({})
|
||||
{
|
||||
"echasnovski/mini.nvim",
|
||||
config = function()
|
||||
-- add gc/gcc actions, gc textobject
|
||||
require("mini.comment").setup({})
|
||||
|
||||
-- autochange dir
|
||||
-- require("mini.misc").setup({})
|
||||
-- MiniMisc.setup_auto_root()
|
||||
-- autochange dir
|
||||
-- require("mini.misc").setup({})
|
||||
-- MiniMisc.setup_auto_root()
|
||||
|
||||
-- highlight word under cursor
|
||||
require("mini.cursorword").setup({ delay = 0 })
|
||||
-- highlight word under cursor
|
||||
require("mini.cursorword").setup({ delay = 0 })
|
||||
|
||||
-- indent lines, `i` textobject, `]i`/`[i` motions
|
||||
require("mini.indentscope").setup({
|
||||
draw = { delay = 0 },
|
||||
symbol = "│",
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- indent lines, `i` textobject, `]i`/`[i` motions
|
||||
require("mini.indentscope").setup({
|
||||
draw = { delay = 0 },
|
||||
symbol = "│",
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -1,35 +1,35 @@
|
||||
return {
|
||||
-- disabled until https://github.com/folke/noice.nvim/issues/298 is fixed
|
||||
-- {
|
||||
-- "folke/noice.nvim",
|
||||
-- config = {
|
||||
-- lsp = {
|
||||
-- progress = { enabled = false },
|
||||
--
|
||||
-- -- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
-- override = {
|
||||
-- ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
-- ["vim.lsp.util.stylize_markdown"] = true,
|
||||
-- ["cmp.entry.get_documentation"] = true,
|
||||
-- },
|
||||
-- },
|
||||
-- -- you can enable a preset for easier configuration
|
||||
-- presets = {
|
||||
-- bottom_search = true,
|
||||
-- long_message_to_split = true,
|
||||
-- lsp_doc_border = true,
|
||||
-- },
|
||||
-- },
|
||||
-- dependencies = {
|
||||
-- "MunifTanjim/nui.nvim",
|
||||
-- {
|
||||
-- "rcarriga/nvim-notify",
|
||||
-- config = {
|
||||
-- background_colour = require("catppuccin.palettes").get_palette("mocha").base,
|
||||
-- render = "minimal",
|
||||
-- top_down = false,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- disabled until https://github.com/folke/noice.nvim/issues/298 is fixed
|
||||
-- {
|
||||
-- "folke/noice.nvim",
|
||||
-- config = {
|
||||
-- lsp = {
|
||||
-- progress = { enabled = false },
|
||||
--
|
||||
-- -- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
-- override = {
|
||||
-- ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
-- ["vim.lsp.util.stylize_markdown"] = true,
|
||||
-- ["cmp.entry.get_documentation"] = true,
|
||||
-- },
|
||||
-- },
|
||||
-- -- you can enable a preset for easier configuration
|
||||
-- presets = {
|
||||
-- bottom_search = true,
|
||||
-- long_message_to_split = true,
|
||||
-- lsp_doc_border = true,
|
||||
-- },
|
||||
-- },
|
||||
-- dependencies = {
|
||||
-- "MunifTanjim/nui.nvim",
|
||||
-- {
|
||||
-- "rcarriga/nvim-notify",
|
||||
-- config = {
|
||||
-- background_colour = require("catppuccin.palettes").get_palette("mocha").base,
|
||||
-- render = "minimal",
|
||||
-- top_down = false,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/overseer.nvim",
|
||||
config = true,
|
||||
cmd = { "OverseerRun", "OverseerToggle" },
|
||||
keys = {
|
||||
{ "<leader>tr", vim.cmd.OverseerRun, desc = "Run Task" },
|
||||
{ "<leader>tt", vim.cmd.OverseerToggle, desc = "Toggle task results" },
|
||||
},
|
||||
{
|
||||
"stevearc/overseer.nvim",
|
||||
config = true,
|
||||
cmd = { "OverseerRun", "OverseerToggle" },
|
||||
keys = {
|
||||
{ "<leader>tr", vim.cmd.OverseerRun, desc = "Run Task" },
|
||||
{ "<leader>tt", vim.cmd.OverseerToggle, desc = "Toggle task results" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
return {
|
||||
{
|
||||
"unblevable/quick-scope",
|
||||
init = function()
|
||||
vim.g.qs_highlight_on_keys = { "f", "F", "t", "T" }
|
||||
end,
|
||||
},
|
||||
{
|
||||
"unblevable/quick-scope",
|
||||
init = function()
|
||||
vim.g.qs_highlight_on_keys = { "f", "F", "t", "T" }
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
return {
|
||||
{
|
||||
"roobert/search-replace.nvim",
|
||||
config = function()
|
||||
require("search-replace").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"roobert/search-replace.nvim",
|
||||
config = function()
|
||||
require("search-replace").setup({})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
return {
|
||||
{ "kylechui/nvim-surround", config = true },
|
||||
{ "kylechui/nvim-surround", config = true },
|
||||
}
|
||||
|
@ -1,29 +1,29 @@
|
||||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
config = function()
|
||||
require("telescope").load_extension("projects")
|
||||
require("telescope").load_extension("fzy_native")
|
||||
require("telescope").load_extension("catppuccin")
|
||||
require("telescope").load_extension("smart_open")
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>ff", "<cmd>Telescope smart_open<cr>", "Find files" },
|
||||
{ "<leader>fp", "<cmd>Telescope projects<cr>", "All Projects" },
|
||||
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", "Recent Files" },
|
||||
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", "Live grep" },
|
||||
{ "<leader>fc", "<cmd>Telescope catppuccin<cr>", "Catppuccin Colours" },
|
||||
{ "<leader>fj", "<cmd>Telescope jumplist<cr>", "Jumplist" },
|
||||
},
|
||||
cmd = "Telescope",
|
||||
dependencies = {
|
||||
"backwardspy/telescope-catppuccin.nvim",
|
||||
{
|
||||
"nvim-telescope/telescope-fzy-native.nvim",
|
||||
dependencies = { "kkharji/sqlite.lua" },
|
||||
},
|
||||
"danielfalk/smart-open.nvim",
|
||||
"backwardspy/telescope-catppuccin.nvim",
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
config = function()
|
||||
require("telescope").load_extension("projects")
|
||||
require("telescope").load_extension("fzy_native")
|
||||
require("telescope").load_extension("catppuccin")
|
||||
require("telescope").load_extension("smart_open")
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>ff", "<cmd>Telescope smart_open<cr>", "Find files" },
|
||||
{ "<leader>fp", "<cmd>Telescope projects<cr>", "All Projects" },
|
||||
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", "Recent Files" },
|
||||
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", "Live grep" },
|
||||
{ "<leader>fc", "<cmd>Telescope catppuccin<cr>", "Catppuccin Colours" },
|
||||
{ "<leader>fj", "<cmd>Telescope jumplist<cr>", "Jumplist" },
|
||||
},
|
||||
cmd = "Telescope",
|
||||
dependencies = {
|
||||
"backwardspy/telescope-catppuccin.nvim",
|
||||
{
|
||||
"nvim-telescope/telescope-fzy-native.nvim",
|
||||
dependencies = { "kkharji/sqlite.lua" },
|
||||
},
|
||||
"danielfalk/smart-open.nvim",
|
||||
"backwardspy/telescope-catppuccin.nvim",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,31 +1,31 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = function()
|
||||
local ts_update = require("nvim-treesitter.install").update({ with_sync = true })
|
||||
ts_update()
|
||||
end,
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = "all",
|
||||
highlight = { enable = true },
|
||||
indent = { enable = false },
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
["aa"] = "@parameter.outer",
|
||||
["ia"] = "@parameter.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" },
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = function()
|
||||
local ts_update = require("nvim-treesitter.install").update({ with_sync = true })
|
||||
ts_update()
|
||||
end,
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = "all",
|
||||
highlight = { enable = true },
|
||||
indent = { enable = false },
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
["aa"] = "@parameter.outer",
|
||||
["ia"] = "@parameter.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" },
|
||||
},
|
||||
}
|
||||
|
@ -1,29 +1,29 @@
|
||||
return {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
config = function()
|
||||
local wk = require("which-key")
|
||||
wk.setup({
|
||||
window = {
|
||||
border = "rounded",
|
||||
},
|
||||
})
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
config = function()
|
||||
local wk = require("which-key")
|
||||
wk.setup({
|
||||
window = {
|
||||
border = "rounded",
|
||||
},
|
||||
})
|
||||
|
||||
wk.register({
|
||||
g = { name = "Go to" },
|
||||
["]"] = { name = "Next" },
|
||||
["["] = { name = "Previous" },
|
||||
})
|
||||
wk.register({
|
||||
g = { name = "Go to" },
|
||||
["]"] = { name = "Next" },
|
||||
["["] = { name = "Previous" },
|
||||
})
|
||||
|
||||
wk.register({
|
||||
f = { name = "Find" },
|
||||
g = { name = "Git" },
|
||||
-- j = { name = "Jump" },
|
||||
l = { name = "LSP" },
|
||||
-- o = { name = "Open" },
|
||||
t = { name = "Tasks" },
|
||||
d = { name = "Debug" },
|
||||
}, { prefix = "<leader>" })
|
||||
end,
|
||||
},
|
||||
wk.register({
|
||||
f = { name = "Find" },
|
||||
g = { name = "Git" },
|
||||
-- j = { name = "Jump" },
|
||||
l = { name = "LSP" },
|
||||
-- o = { name = "Open" },
|
||||
t = { name = "Tasks" },
|
||||
d = { name = "Debug" },
|
||||
}, { prefix = "<leader>" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -1,20 +1,20 @@
|
||||
local extremely_zen = function()
|
||||
require("zen-mode").toggle({ plugins = { twilight = { enabled = true } } })
|
||||
require("zen-mode").toggle({ plugins = { twilight = { enabled = true } } })
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"folke/zen-mode.nvim",
|
||||
opts = {
|
||||
plugins = {
|
||||
twilight = { enabled = false },
|
||||
},
|
||||
},
|
||||
cmd = { "ZenMode" },
|
||||
keys = {
|
||||
{ "<leader>zz", "<cmd>ZenMode<cr>", desc = "Zen Mode" },
|
||||
{ "<leader>Z", extremely_zen, desc = "Extremely Zen Mode" },
|
||||
},
|
||||
dependencies = { "folke/twilight.nvim" },
|
||||
{
|
||||
"folke/zen-mode.nvim",
|
||||
opts = {
|
||||
plugins = {
|
||||
twilight = { enabled = false },
|
||||
},
|
||||
},
|
||||
cmd = { "ZenMode" },
|
||||
keys = {
|
||||
{ "<leader>zz", "<cmd>ZenMode<cr>", desc = "Zen Mode" },
|
||||
{ "<leader>Z", extremely_zen, desc = "Extremely Zen Mode" },
|
||||
},
|
||||
dependencies = { "folke/twilight.nvim" },
|
||||
},
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
column_width = 120
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferDouble"
|
||||
call_parentheses = "Always"
|
||||
collapse_simple_statement = "Never"
|
Loading…
Reference in New Issue