diff --git a/lua/keymap.lua b/lua/keymap.lua index 804f1ad..8669a4f 100644 --- a/lua/keymap.lua +++ b/lua/keymap.lua @@ -1,6 +1,6 @@ return { { - { "i", "x", "n", "s" }, + { "i", "x", "n", "s" }, "", "w", { desc = "Save file" }, @@ -12,37 +12,37 @@ return { { desc = "New File" }, }, { - { "n", "i" }, + { "n", "i" }, "", "u", { desc = "Undo" }, }, { - { "n", "i" }, + { "n", "i" }, "", "redo", { desc = "Undo" }, }, { - { "n", "i" }, + { "n", "i" }, "", "<", { desc = "Remove Tab" }, }, { - { "n", "i" }, + { "n", "i" }, "", "Telescope", { desc = "Open Telescope" }, }, { - { "n", "i" }, + { "n", "i" }, "", "", { desc = "Scroll sideways" }, }, { - { "n", "i" }, + { "n", "i" }, "", "", { desc = "Scroll sideways" }, @@ -114,7 +114,7 @@ return { { desc = "Window Right" }, }, { - { "n", "i" }, + { "n", "i" }, "", "NvimTreeToggle", { desc = "Toggle Neotree" }, @@ -142,5 +142,5 @@ return { "", "Telescope current_buffer_fuzzy_find", { noremap = true, desc = "Find" }, - }, + } } diff --git a/lua/plugins/adwaita.lua b/lua/plugins/adwaita.lua deleted file mode 100644 index 6f8ecb1..0000000 --- a/lua/plugins/adwaita.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - { - "Mofiqul/adwaita.nvim", - priority = 1000, - lazy = false, - }, -} diff --git a/lua/plugins/barbar.lua b/lua/plugins/barbar.lua index 4afc472..dd62135 100644 --- a/lua/plugins/barbar.lua +++ b/lua/plugins/barbar.lua @@ -4,6 +4,7 @@ return { init = function() vim.g.barbar_auto_setup = false end, + version = '^1.7.0', opts = function() local options = require("options") return { diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua deleted file mode 100644 index 7f93b1b..0000000 --- a/lua/plugins/cmp.lua +++ /dev/null @@ -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({ - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - [""] = 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, - }, -} diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua deleted file mode 100644 index 64fbf2d..0000000 --- a/lua/plugins/conform.lua +++ /dev/null @@ -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" }, - }, - }, - }, -} diff --git a/lua/plugins/coq.lua b/lua/plugins/coq.lua new file mode 100644 index 0000000..1076400 --- /dev/null +++ b/lua/plugins/coq.lua @@ -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" + } + } + } +} diff --git a/lua/plugins/eagle.lua b/lua/plugins/eagle.lua deleted file mode 100644 index f399885..0000000 --- a/lua/plugins/eagle.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - { - "soulis-1256/eagle.nvim", - config = function() - require("eagle").setup({ - border = "none", - }) - end, - }, -} diff --git a/lua/plugins/lightbulb.lua b/lua/plugins/lightbulb.lua index ce3b3db..abe1285 100644 --- a/lua/plugins/lightbulb.lua +++ b/lua/plugins/lightbulb.lua @@ -16,7 +16,8 @@ return { -- See |vim.lsp.util.open_floating_preview| and |nvim_open_win|. -- Note that some options may be overridden by |open_floating_preview|. win_opts = { - focusable = false, + focusable = true, + border = "none", }, }, }, diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 7038450..17356c2 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -5,6 +5,7 @@ return { "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim", }, + priority = 500, opts = { diagnostics = { underline = true, @@ -30,18 +31,22 @@ return { require("mason").setup() + local coq = require('coq') local handlers = { -- The first entry (without a key) will be the default handler -- and will be called for each installed server that doesn't have -- a dedicated handler. 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) + -- setup lsp-format + require("lsp-format").on_attach(client, bufnr) + -- setup navic if client.server_capabilities["documentSymbolProvider"] then require("nvim-navic").attach(client, bufnr) end - end, - }) + end + })) end, } @@ -58,4 +63,7 @@ return { require("lspconfig").gdscript.setup({}) end, }, + { + 'lukas-reineke/lsp-format.nvim', + } } diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 2f8ee5b..cfccf16 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -33,6 +33,7 @@ return { lualine_b = { { "filename", + color = "lualine_b_terminal", symbols = { modified = "", -- Text to show when the file is modified. readonly = "", -- Text to show when the file is non-modifiable or readonly. @@ -45,6 +46,11 @@ return { { "branch", icon = "󰊤", + on_click = function() + vim.defer_fn(function() + vim.cmd("Telescope git_branches") + end, 100) + end, }, { "diff", @@ -64,7 +70,7 @@ return { { function() local client_id = vim.lsp.get_client_by_id(1) - return " LSP ~ " .. client_id.name + return " " .. client_id.name end, on_click = function() vim.defer_fn(function() @@ -84,6 +90,7 @@ return { sources = { "nvim_diagnostic", }, + always_visible = true, update_in_insert = true, on_click = function() vim.defer_fn(function() diff --git a/lua/plugins/moderndark.lua b/lua/plugins/moderndark.lua deleted file mode 100644 index abcf060..0000000 --- a/lua/plugins/moderndark.lua +++ /dev/null @@ -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, - }, -} diff --git a/lua/plugins/satellite.lua b/lua/plugins/satellite.lua deleted file mode 100644 index 2c8af0e..0000000 --- a/lua/plugins/satellite.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - { - "lewis6991/satellite.nvim", - opts = {}, - }, -} diff --git a/lua/plugins/statuscol.lua b/lua/plugins/statuscol.lua index f2b9801..08d01f5 100644 --- a/lua/plugins/statuscol.lua +++ b/lua/plugins/statuscol.lua @@ -1,6 +1,7 @@ return { { "luukvbaal/statuscol.nvim", + priority = 1000, config = function() local builtin = require("statuscol.builtin") require("statuscol").setup({ diff --git a/lua/plugins/tokyonight.lua b/lua/plugins/tokyonight.lua deleted file mode 100644 index 5c4fb1a..0000000 --- a/lua/plugins/tokyonight.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - { - "folke/tokyonight.nvim", - lazy = false, - priority = 1000, - opts = {}, - }, -} diff --git a/lua/plugins/ufo.lua b/lua/plugins/ufo.lua index 3270ebb..eb5b378 100644 --- a/lua/plugins/ufo.lua +++ b/lua/plugins/ufo.lua @@ -2,7 +2,7 @@ return { { "kevinhwang91/nvim-ufo", event = { - "InsertEnter", + "LspAttach", }, dependencies = { "kevinhwang91/promise-async", diff --git a/lua/plugins/vscode.lua b/lua/plugins/vscode.lua index 8c69930..a0b3550 100644 --- a/lua/plugins/vscode.lua +++ b/lua/plugins/vscode.lua @@ -3,14 +3,20 @@ return { "Mofiqul/vscode.nvim", lazy = false, priority = 1000, - opts = { - color_overrides = {}, - group_overrides = { - DiffDelete = { - fg = "#5A5A5A", - bg = "#1f1f1f", - }, - }, - }, + config = function() + local colors = require('vscode.colors').get_colors() + require('vscode').setup({ + color_overrides = {}, + group_overrides = { + DiffDelete = { + fg = "#5A5A5A", bg = "#1f1f1f", + }, + Pmenu = { + fg = colors.vscFront, + bg = colors.vscBack + } + } + }) + end }, }