Make view nicer
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 22s Details

This commit is contained in:
Yannick Reiß 2024-07-26 07:42:31 +02:00
parent e1711a1180
commit 9c504e284f
5 changed files with 30 additions and 38 deletions

View File

@ -54,11 +54,12 @@ cmp.setup({
{ name = "path" }, { name = "path" },
{ name = "nvim_lsp", keyword_length = 2 }, { name = "nvim_lsp", keyword_length = 2 },
{ name = "nvim_lsp_signature_help" }, { name = "nvim_lsp_signature_help" },
-- { name = "nvim_lua", keyword_length = 2 }, { name = "nvim_lua", keyword_length = 2 },
{ name = "buffer", keyword_length = 2 }, { name = "buffer", keyword_length = 2 },
{ name = "calc" }, { name = "calc" },
{ name = "lua-latex-symbols", option = { cache = true } }, { name = "lua-latex-symbols", option = { cache = true } },
{ name = "cmp_tabnine", keyword_length = 3 }, { name = "cmp_tabnine", keyword_length = 20 },
{ name = "fuzzy_buffer", keyword_length = 4 },
}), }),
-- add formatting of the different sources -- add formatting of the different sources
@ -67,13 +68,12 @@ cmp.setup({
format = function(entry, item) format = function(entry, item)
local menu_icon = { local menu_icon = {
nvim_lsp = "λ", nvim_lsp = "λ",
-- ultisnips = "⋗", path = "󰴠",
path = "🌐",
calc = "Σ", calc = "Σ",
buffer = "📚", buffer = "",
lualatexsymbols = "𝕋", lualatexsymbols = "󰿈",
spell = "📚", spell = "󰘝",
fuzzy_buffer = "📄", fuzzy_buffer = "",
cmp_tabnine = "🖳", cmp_tabnine = "🖳",
} }
item.menu = menu_icon[entry.source.name] item.menu = menu_icon[entry.source.name]
@ -82,26 +82,19 @@ cmp.setup({
}, },
}) })
-- Set configuration for specific filetype.
cmp.setup.filetype("gitcommit", {
sources = cmp.config.sources({
{ name = "cmp_git" }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = "buffer" },
}),
})
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ "/", "?" }, { cmp.setup.cmdline({ "/", "?" }, {
mapping = cmp.mapping.preset.cmdline(), mapping = cmp.mapping.preset.cmdline(),
sources = { sources = {
{ name = "buffer" }, { name = "buffer" },
{ name = "fuzzy_path", keyword_length = 4 },
}, },
formatting = { formatting = {
fields = { "menu", "abbr", "kind" }, fields = { "menu", "abbr", "kind" },
format = function(entry, item) format = function(entry, item)
local menu_icon = { local menu_icon = {
buffer = "📚", buffer = "󰱼",
fuzzy_path = "",
} }
item.menu = menu_icon[entry.source.name] item.menu = menu_icon[entry.source.name]
return item return item
@ -114,17 +107,17 @@ cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(), mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = "path" }, { name = "path" },
{ name = "cmdline_history", keyword_length = 8 }, { name = "cmdline_history", keyword_length = 24 },
}, { }, {
{ name = "cmdline" }, { name = "cmdline", keyword_length = 1 },
}), }),
formatting = { formatting = {
fields = { "menu", "abbr", "kind" }, fields = { "menu", "abbr", "kind" },
format = function(entry, item) format = function(entry, item)
local menu_icon = { local menu_icon = {
path = "🌐", path = "󰙅",
cmdline = "💻", cmdline = "",
cmdline_history = "📰", cmdline_history = "󰂺 ",
} }
item.menu = menu_icon[entry.source.name] item.menu = menu_icon[entry.source.name]
return item return item

View File

@ -38,8 +38,8 @@ require("telescope").load_extension("ultisnips")
vim.keymap.set("n", "<leader>fs", require("telescope").extensions.ultisnips.ultisnips, {}) vim.keymap.set("n", "<leader>fs", require("telescope").extensions.ultisnips.ultisnips, {})
-- NERDTree Config -- NERDTree Config
vim.g.NERDTreeDirArrowExpandable = "" vim.g.NERDTreeDirArrowExpandable = ""
vim.g.NERDTreeDirArrowCollapsible = "" vim.g.NERDTreeDirArrowCollapsible = ""
-- Git-Blame configuration -- Git-Blame configuration
vim.g.gitblame_message_template = " => <author> • <date> • <summary>" vim.g.gitblame_message_template = " => <author> • <date> • <summary>"
@ -53,7 +53,7 @@ require("mason").setup(require("mason").setup({
ui = { ui = {
icons = { icons = {
package_installed = "", package_installed = "",
package_pending = "", package_pending = "󰔟",
package_uninstalled = "", package_uninstalled = "",
}, },
}, },
@ -87,7 +87,7 @@ require("lspconfig").verible.setup({
vim.keymap.set("n", "<C-t>", ":FloatermNew --height=0.9 --width=0.9 --wintype=float --name=terminal <CR>") vim.keymap.set("n", "<C-t>", ":FloatermNew --height=0.9 --width=0.9 --wintype=float --name=terminal <CR>")
-- Set default colorscheme -- Set default colorscheme
vim.cmd("colo vim-monokai-tasty") vim.cmd("colo tokyonight-night")
-- Formatter configuration -- Formatter configuration
vim.cmd([[ vim.cmd([[
@ -108,6 +108,7 @@ local linters = {
markdown = { "languagetool" }, markdown = { "languagetool" },
latex = { "languagetool" }, latex = { "languagetool" },
tex = { "languagetool" }, tex = { "languagetool" },
plaintex = { "languagetool" },
ada = { "gnat" }, ada = { "gnat" },
} }

View File

@ -23,6 +23,7 @@ return {
"p00f/nvim-ts-rainbow", "p00f/nvim-ts-rainbow",
"cohama/lexima.vim", "cohama/lexima.vim",
"ryanoasis/vim-devicons", "ryanoasis/vim-devicons",
"tiagofumo/vim-nerdtree-syntax-highlight",
{ {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
tag = "0.1.5", tag = "0.1.5",
@ -49,7 +50,7 @@ return {
"dmitmel/cmp-cmdline-history", "dmitmel/cmp-cmdline-history",
"amarakon/nvim-cmp-lua-latex-symbols", "amarakon/nvim-cmp-lua-latex-symbols",
"f3fora/cmp-spell", "f3fora/cmp-spell",
{ "petertriho/cmp-git", requires = "nvim-lua/plenary.nvim" }, { "tzachar/cmp-fuzzy-buffer", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } },
"williamboman/mason.nvim", "williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim", "williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
@ -59,7 +60,6 @@ return {
{ "nvim-telescope/telescope-fzf-native.nvim", run = "make" }, { "nvim-telescope/telescope-fzf-native.nvim", run = "make" },
{ "tzachar/fuzzy.nvim", requires = { "nvim-telescope/telescope-fzf-native.nvim" } }, { "tzachar/fuzzy.nvim", requires = { "nvim-telescope/telescope-fzf-native.nvim" } },
{ "tzachar/cmp-fuzzy-buffer", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } }, { "tzachar/cmp-fuzzy-buffer", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } },
-- "quangnguyen30192/cmp-nvim-ultisnips",
"mihaifm/bufstop", "mihaifm/bufstop",
"https://git.nickr.eu/yannickreiss/nvim-sourcer.git", "https://git.nickr.eu/yannickreiss/nvim-sourcer.git",
{ "tzachar/cmp-fuzzy-buffer", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } }, { "tzachar/cmp-fuzzy-buffer", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } },

View File

@ -1,14 +1,12 @@
-- in tools.lua -- in tools.lua
local api = vim.api local api = vim.api
local M = {}; local M = {}
function M.makeScratch() function M.makeScratch()
vim.bo[0].buftype = nofile -- set the current buffer's (buffer 0) buftype to nofile vim.bo[0].buftype = nofile -- set the current buffer's (buffer 0) buftype to nofile
vim.bo[0].bufhidden = hide vim.bo[0].bufhidden = hide
vim.bo[0].swapfile = false vim.bo[0].swapfile = false
end; end
return M
return M;

View File

@ -33,7 +33,7 @@ vim.o.guifont = "Source Code Pro:h13"
vim.opt.termguicolors = true vim.opt.termguicolors = true
vim.cmd("colorscheme slate") vim.cmd("colorscheme slate")
vim.keymap.set("n", "<M-+>", ":colo tokyonight-day<CR>") vim.keymap.set("n", "<M-+>", ":colo tokyonight-day<CR>")
vim.keymap.set("n", "<M-->", ":colo tokyonight-moon<CR>") vim.keymap.set("n", "<M-->", ":colo tokyonight-night<CR>")
vim.opt.mouse = "" vim.opt.mouse = ""