various changes

This commit is contained in:
Sven Vogel 2024-05-17 00:30:15 +02:00
parent cf3594a8a9
commit a32e59eca1
16 changed files with 94 additions and 178 deletions

View File

@ -142,5 +142,5 @@ return {
"<C-f>", "<C-f>",
"<cmd>Telescope current_buffer_fuzzy_find<CR>", "<cmd>Telescope current_buffer_fuzzy_find<CR>",
{ noremap = true, desc = "Find" }, { noremap = true, desc = "Find" },
}, }
} }

View File

@ -1,7 +0,0 @@
return {
{
"Mofiqul/adwaita.nvim",
priority = 1000,
lazy = false,
},
}

View File

@ -4,6 +4,7 @@ return {
init = function() init = function()
vim.g.barbar_auto_setup = false vim.g.barbar_auto_setup = false
end, end,
version = '^1.7.0',
opts = function() opts = function()
local options = require("options") local options = require("options")
return { return {

View File

@ -1,89 +0,0 @@
return {
{
"hrsh7th/nvim-cmp",
dependencies = {
-- extra completion plugins
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-path",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-calc",
"hrsh7th/cmp-emoji",
"kdheepak/cmp-latex-symbols",
-- snippets
"saadparwaiz1/cmp_luasnip",
"L3MON4D3/LuaSnip",
"onsails/lspkind.nvim",
},
config = function(_, _)
local cmp = require("cmp")
cmp.setup({
window = {
completion = {
border = "none",
scrollbar = false,
winhighlight = "Normal:Pmenu,FloatBorder:FloatBorder,Search:None",
},
documentation = {
border = "none",
scrollbar = false,
winhighlight = "Normal:Pmenu,FloatBorder:FloatBorder,Search:None",
},
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
completion = {
completeopt = "longest,menuone,noinsert,noselect",
},
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
}, {
{ name = "calc" },
{ name = "emoji" },
{ name = "cmdline" },
{ name = "latex_symbols" },
}),
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping({
i = function(fallback)
if cmp.visible() and cmp.get_active_entry() then
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
else
fallback()
end
end,
s = cmp.mapping.confirm({ select = true }),
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
}),
}),
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, item)
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, item)
local strings = vim.split(kind.kind, "%s", { trimempty = true })
kind.kind = (strings[1] or "") .. " "
kind.menu = " (" .. (strings[2] or "") .. ")"
return kind
end,
},
experimental = {
ghost_text = {
hl_group = "NonText",
},
},
})
end,
},
}

View File

@ -1,20 +0,0 @@
return {
{
"stevearc/conform.nvim",
opts = {
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_fallback = true,
},
formatters = {
injected = { options = { ignore_errors = true } },
},
formatters_by_ft = {
lua = { "stylua" },
sh = { "shfmt" },
c = { "clangd-format" },
},
},
},
}

46
lua/plugins/coq.lua Normal file
View File

@ -0,0 +1,46 @@
return {
{
"ms-jpq/coq_nvim",
branch = 'coq',
build = function(_)
vim.cmd("COQdeps")
end,
config = function(_, _)
vim.cmd("COQnow -s")
end,
init = function(_)
vim.g.coq_settings = {
display = {
ghost_text = {
enabled = true,
context = { "", "" },
highlight_group = "NonText"
},
pum = {
fast_close = false,
kind_context = { " ", " " },
source_context = { "", " " },
},
icons = {
spacing = 1,
mode = "short"
},
preview = {
border = "single",
x_max_len = 25,
}
}
}
end,
dependencies = {
{
'ms-jpq/coq.artifacts',
branch = "artifacts"
},
{
"ms-jpq/coq.thirdparty",
branch = "3p"
}
}
}
}

View File

@ -1,10 +0,0 @@
return {
{
"soulis-1256/eagle.nvim",
config = function()
require("eagle").setup({
border = "none",
})
end,
},
}

View File

@ -16,7 +16,8 @@ return {
-- See |vim.lsp.util.open_floating_preview| and |nvim_open_win|. -- See |vim.lsp.util.open_floating_preview| and |nvim_open_win|.
-- Note that some options may be overridden by |open_floating_preview|. -- Note that some options may be overridden by |open_floating_preview|.
win_opts = { win_opts = {
focusable = false, focusable = true,
border = "none",
}, },
}, },
}, },

View File

@ -5,6 +5,7 @@ return {
"williamboman/mason.nvim", "williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim", "williamboman/mason-lspconfig.nvim",
}, },
priority = 500,
opts = { opts = {
diagnostics = { diagnostics = {
underline = true, underline = true,
@ -30,18 +31,22 @@ return {
require("mason").setup() require("mason").setup()
local coq = require('coq')
local handlers = { local handlers = {
-- The first entry (without a key) will be the default handler -- The first entry (without a key) will be the default handler
-- and will be called for each installed server that doesn't have -- and will be called for each installed server that doesn't have
-- a dedicated handler. -- a dedicated handler.
function(server_name) -- default handler (optional) function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup({ require("lspconfig")[server_name].setup(coq.lsp_ensure_capabilities({
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
-- setup lsp-format
require("lsp-format").on_attach(client, bufnr)
-- setup navic
if client.server_capabilities["documentSymbolProvider"] then if client.server_capabilities["documentSymbolProvider"] then
require("nvim-navic").attach(client, bufnr) require("nvim-navic").attach(client, bufnr)
end end
end, end
}) }))
end, end,
} }
@ -58,4 +63,7 @@ return {
require("lspconfig").gdscript.setup({}) require("lspconfig").gdscript.setup({})
end, end,
}, },
{
'lukas-reineke/lsp-format.nvim',
}
} }

View File

@ -33,6 +33,7 @@ return {
lualine_b = { lualine_b = {
{ {
"filename", "filename",
color = "lualine_b_terminal",
symbols = { symbols = {
modified = "", -- Text to show when the file is modified. modified = "", -- Text to show when the file is modified.
readonly = "", -- Text to show when the file is non-modifiable or readonly. readonly = "", -- Text to show when the file is non-modifiable or readonly.
@ -45,6 +46,11 @@ return {
{ {
"branch", "branch",
icon = "󰊤", icon = "󰊤",
on_click = function()
vim.defer_fn(function()
vim.cmd("Telescope git_branches")
end, 100)
end,
}, },
{ {
"diff", "diff",
@ -64,7 +70,7 @@ return {
{ {
function() function()
local client_id = vim.lsp.get_client_by_id(1) local client_id = vim.lsp.get_client_by_id(1)
return "LSP ~ " .. client_id.name return "" .. client_id.name
end, end,
on_click = function() on_click = function()
vim.defer_fn(function() vim.defer_fn(function()
@ -84,6 +90,7 @@ return {
sources = { sources = {
"nvim_diagnostic", "nvim_diagnostic",
}, },
always_visible = true,
update_in_insert = true, update_in_insert = true,
on_click = function() on_click = function()
vim.defer_fn(function() vim.defer_fn(function()

View File

@ -1,14 +0,0 @@
return {
{
"gmr458/vscode_modern_theme.nvim",
lazy = false,
priority = 1000,
config = function()
require("vscode_modern").setup({
cursorline = true,
transparent_background = false,
nvim_tree_darker = true,
})
end,
},
}

View File

@ -1,6 +0,0 @@
return {
{
"lewis6991/satellite.nvim",
opts = {},
},
}

View File

@ -1,6 +1,7 @@
return { return {
{ {
"luukvbaal/statuscol.nvim", "luukvbaal/statuscol.nvim",
priority = 1000,
config = function() config = function()
local builtin = require("statuscol.builtin") local builtin = require("statuscol.builtin")
require("statuscol").setup({ require("statuscol").setup({

View File

@ -1,8 +0,0 @@
return {
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
},
}

View File

@ -2,7 +2,7 @@ return {
{ {
"kevinhwang91/nvim-ufo", "kevinhwang91/nvim-ufo",
event = { event = {
"InsertEnter", "LspAttach",
}, },
dependencies = { dependencies = {
"kevinhwang91/promise-async", "kevinhwang91/promise-async",

View File

@ -3,14 +3,20 @@ return {
"Mofiqul/vscode.nvim", "Mofiqul/vscode.nvim",
lazy = false, lazy = false,
priority = 1000, priority = 1000,
opts = { config = function()
local colors = require('vscode.colors').get_colors()
require('vscode').setup({
color_overrides = {}, color_overrides = {},
group_overrides = { group_overrides = {
DiffDelete = { DiffDelete = {
fg = "#5A5A5A", fg = "#5A5A5A", bg = "#1f1f1f",
bg = "#1f1f1f",
},
},
}, },
Pmenu = {
fg = colors.vscFront,
bg = colors.vscBack
}
}
})
end
}, },
} }