Migrate to blink.cmp

This commit is contained in:
Fabian Becker
2025-09-23 13:48:58 +02:00
parent b4ef587ca5
commit d1c4eccc55
7 changed files with 411 additions and 400 deletions

View File

@@ -2,56 +2,39 @@ if vim.g.vscode then
return
end
local Remap = require("halfdan.keymap")
local nnoremap = Remap.nnoremap
local inoremap = Remap.inoremap
vim.diagnostic.config({
underline = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.WARN] = "",
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.WARN] = "",
[vim.diagnostic.severity.INFO] = "",
[vim.diagnostic.severity.HINT] = "", -- optional, you can pick any icon
},
},
virtual_text = true, -- or { prefix = "●" } for customization
update_in_insert = false,
severity_sort = true,
})
-- Set Default Prefix.
-- Note: You can set a prefix per lsp server in the lv-globals.lua file
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
signs = true,
underline = true,
}
)
-- Setup for nvim-notify
vim.lsp.set_log_level(2)
local convert_lsp_log_level_to_neovim_log_level = function(lsp_log_level)
if lsp_log_level == 1 then
return 4
elseif lsp_log_level == 2 then
return 3
elseif lsp_log_level == 3 then
return 2
elseif lsp_log_level == 4 then
return 1
end
end
local levels = {
"ERROR",
"WARN",
"INFO",
"DEBUG",
[0] = "TRACE",
-- Map LSP message types (1=Error, 2=Warning, 3=Info, 4=Log) to vim.log.levels
local severity_map = {
[1] = vim.log.levels.ERROR,
[2] = vim.log.levels.WARN,
[3] = vim.log.levels.INFO,
[4] = vim.log.levels.DEBUG,
}
---@diagnostic disable-next-line: unused-vararg
vim.lsp.handlers["window/showMessage"] = function(_, result, ...)
if require("vim.lsp.log").should_log(convert_lsp_log_level_to_neovim_log_level(result.type)) then
vim.notify(result.message, levels[result.type])
vim.lsp.handlers["window/showMessage"] = function(_, result, ctx, _)
local lvl = severity_map[result.type] or vim.log.levels.INFO
if vim.lsp.log.should_log(lvl) then
local client = vim.lsp.get_client_by_id(ctx.client_id)
local title = client and ("LSP | " .. client.name) or "LSP"
vim.notify(result.message, lvl, { title = title })
end
end
@@ -97,8 +80,13 @@ end, { noremap = true, silent = true })
-- Global mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
vim.keymap.set('n', ']d', function()
vim.diagnostic.jump_next()
end, { desc = "Go to next diagnostic" })
vim.keymap.set('n', '[d', function()
vim.diagnostic.jump_prev()
end, { desc = "Go to previous diagnostic" })
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
-- Use LspAttach autocommand to only map the following keys
@@ -155,8 +143,26 @@ vim.lsp.config("lua_ls", {
},
})
-- Enable it
vim.lsp.enable("lua_ls")
local neodev = require("neodev")
-- must run before enabling lua_ls
neodev.setup({})
vim.lsp.config("lua_ls", {
settings = {
Lua = {
runtime = { version = "LuaJIT" },
diagnostics = { globals = { "vim" } },
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false,
},
telemetry = { enable = false },
},
},
})
vim.lsp.config('gopls', {
cmd = { "gopls" },
@@ -173,6 +179,7 @@ vim.lsp.config('gopls', {
},
})
vim.lsp.enable 'lua_ls'
vim.lsp.enable 'gopls'
vim.lsp.config('expert', {

View File

@@ -1,48 +0,0 @@
if vim.g.vscode then
return
end
require'nvim-treesitter.configs'.setup {
textobjects = {
select = {
enable = true,
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
-- You can choose the select mode (default is charwise 'v')
selection_modes = {
['@parameter.outer'] = 'v', -- charwise
['@function.outer'] = 'V', -- linewise
['@class.outer'] = '<c-v>', -- blockwise
},
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]m"] = "@function.outer",
["]]"] = "@class.outer",
},
goto_next_end = {
["]M"] = "@function.outer",
["]["] = "@class.outer",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[["] = "@class.outer",
},
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
},
},
}

View File

@@ -2,48 +2,43 @@
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"FTerm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
"cmp-git": { "branch": "main", "commit": "b24309c386c9666c549a1abaedd4956541676d06" },
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"editorconfig-vim": { "branch": "master", "commit": "6a58b7c11f79c0e1d0f20533b3f42f2a11490cf8" },
"fzf-lua": { "branch": "main", "commit": "c2d9b8693792c6dd810162d9e8c90782cec19404" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"fzf-lua": { "branch": "main", "commit": "2388dcd61731ae158bf7dad2ae0419291837e557" },
"git-blame.nvim": { "branch": "master", "commit": "9874ec1ec8bc53beb33b7cd82c092b85271a578b" },
"gruvbox-baby": { "branch": "main", "commit": "bd52e62d8134647090108189e69c8b3cd18bdbbf" },
"hardtime.nvim": { "branch": "main", "commit": "6d7664d5bdfaea44c5f50b29f5239fab7b00c273" },
"hardtime.nvim": { "branch": "main", "commit": "b4e431934af1fe224a3a801f632c008278cb7628" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" },
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
"lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" },
"lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" },
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" },
"neogit": { "branch": "master", "commit": "6617978288d58eb121754b5dd890e893d9a7e8d6" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "ed057048a281b418d5318dd5153f9486daa517a3" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"neogit": { "branch": "master", "commit": "704ed34e957c8702df994bdcc8404e134d1e8212" },
"neorg": { "branch": "main", "commit": "e206c9642f4a115cd836e76c98ef785623d335bc" },
"neorg-telescope": { "branch": "main", "commit": "7fb6ca6a632c3c095601d379a664c0c1f802dc6c" },
"neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" },
"neotest": { "branch": "master", "commit": "2cf3544fb55cdd428a9a1b7154aea9c9823426e8" },
"neotest-elixir": { "branch": "master", "commit": "a242aebeaa6997c1c149138ff77f6cacbe33b6fc" },
"neotest-golang": { "branch": "main", "commit": "0ada81e50429a071cc7d349301762e4ee04dcb2a" },
"neotest-golang": { "branch": "main", "commit": "f5bd0488ced4ec266917f7b85f9e896436ab6d3a" },
"neotest-rust": { "branch": "main", "commit": "2c9941d4a358839918fac21d20fc8fef0e1ad05f" },
"neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-dap": { "branch": "master", "commit": "7523676a4be17644587aa47e4d42f6f7646d4727" },
"nvim-dap": { "branch": "master", "commit": "7367cec8e8f7a0b1e4566af9a7ef5959d11206a7" },
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
"nvim-lspconfig": { "branch": "master", "commit": "aafecf5b8bc0a768f1a97e3a6d5441e64dee79f9" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
"nvim-treesitter": { "branch": "main", "commit": "5a70b1eb8cbdf6c7f0a59dfb7356ad198421b620" },
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
"outline.nvim": { "branch": "main", "commit": "6b62f73a6bf317531d15a7ae1b724e85485d8148" },
"pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" },
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"rose-pine": { "branch": "main", "commit": "72a04c4065345b51b56aed4859ea1d884f734097" },
@@ -52,7 +47,7 @@
"smart-open.nvim": { "branch": "0.2.x", "commit": "560d8f16e17977c8303db6f9660db58a4415ca41" },
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
"telescope-dap.nvim": { "branch": "master", "commit": "783366bd6c1e7fa0a5c59c07db37f49c805a28df" },
"telescope-egrepify.nvim": { "branch": "master", "commit": "8da5e3ba5faf3bdd6bbfaccb3eb3b8e7ebf9b131" },
"telescope-egrepify.nvim": { "branch": "master", "commit": "5e6fb91f52a595a0dd554c7eea022c467ff80d86" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },

View File

@@ -10,7 +10,7 @@ else
require("halfdan.neogit")
-- require('halfdan.globals')
require('halfdan.keymap')
require('halfdan.cmp')
-- require('halfdan.cmp')
require('halfdan.colorscheme')
require('halfdan.treesitter')
require('halfdan.telescope')

View File

@@ -16,305 +16,361 @@ if vim.g.vscode then
end
require("lazy").setup({
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"nvim-telescope/telescope.nvim", -- optional
"sindrets/diffview.nvim", -- optional
"ibhagwan/fzf-lua", -- optional
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"nvim-telescope/telescope.nvim", -- optional
"sindrets/diffview.nvim", -- optional
"ibhagwan/fzf-lua", -- optional
},
config = true
},
{'airblade/vim-gitgutter'},
-- Load .editorconfig files
{'editorconfig/editorconfig-vim'},
{
"m4xshen/hardtime.nvim",
lazy = false,
dependencies = { "MunifTanjim/nui.nvim" },
opts = {},
},
{
"karb94/neoscroll.nvim",
opts = {},
},
{'junegunn/vim-easy-align'},
-- Goodies
{'tpope/vim-fugitive'},
{'tpope/vim-surround'}, -- ✅
{'tpope/vim-dispatch'},
-- Treesitter
{
'nvim-treesitter/nvim-treesitter',
branch = 'main',
build = ':TSUpdate',
},
-- Testing
{'vim-test/vim-test'},
{
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim",
-- plugins
"fredrikaverpil/neotest-golang",
"jfpedroza/neotest-elixir",
"rouge8/neotest-rust",
}
},
{"nvim-neotest/neotest-vim-test" },
{'akinsho/toggleterm.nvim', version = "*", config = function()
require('toggleterm').setup({
open_mapping = [[<C-\>]],
start_in_insert = true,
direction = "horizontal",
autochdir = false,
size = 20,
highlights = {
FloatBorder = { link = "ToggleTermBorder" },
Normal = { link = "ToggleTerm" },
NormalFloat = { link = "ToggleTerm" },
},
config = true
},
{'airblade/vim-gitgutter'},
winbar = {
enabled = true,
name_formatter = function(term)
return term.name
end,
},
})
end},
-- Load .editorconfig files
{'editorconfig/editorconfig-vim'},
{
"m4xshen/hardtime.nvim",
lazy = false,
dependencies = { "MunifTanjim/nui.nvim" },
opts = {},
},
{
"karb94/neoscroll.nvim",
opts = {},
},
{'junegunn/vim-easy-align'},
-- Goodies
{'tpope/vim-fugitive'},
{'tpope/vim-surround'}, -- ✅
{'tpope/vim-dispatch'},
-- Treesitter
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
},
{ 'nvim-treesitter/playground', after = 'nvim-treesitter' },
{ 'nvim-treesitter/nvim-treesitter-textobjects', after = 'nvim-treesitter' },
-- Testing
{'vim-test/vim-test'},
{
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim",
-- plugins
"fredrikaverpil/neotest-golang",
"jfpedroza/neotest-elixir",
"rouge8/neotest-rust",
{'f-person/git-blame.nvim'},
-- Status Line and Bufferline
{
'nvim-lualine/lualine.nvim',
dependencies = {'kyazdani42/nvim-web-devicons'},
event = { "BufReadPost", "BufNewFile" },
opts = function()
local monokai_opts = require("halfdan.util").opts("monokai-pro.nvim")
return {
float = vim.tbl_contains(monokai_opts.background_clear or {}, "neo-tree"),
separator = "bubble", -- bubble | triangle
---@type any
colorful = true,
}
},
{"nvim-neotest/neotest-vim-test" },
{'akinsho/toggleterm.nvim', version = "*", config = function()
require('toggleterm').setup({
open_mapping = [[<C-\>]],
start_in_insert = true,
direction = "horizontal",
autochdir = false,
size = 20,
highlights = {
FloatBorder = { link = "ToggleTermBorder" },
Normal = { link = "ToggleTerm" },
NormalFloat = { link = "ToggleTerm" },
},
winbar = {
enabled = true,
name_formatter = function(term)
return term.name
end,
},
})
end},
end,
config = function(_, opts)
local lualine_config = require("halfdan.lualine")
lualine_config.setup(opts)
lualine_config.load()
end,
},
{'f-person/git-blame.nvim'},
-- Status Line and Bufferline
{
'nvim-lualine/lualine.nvim',
dependencies = {'kyazdani42/nvim-web-devicons'},
event = { "BufReadPost", "BufNewFile" },
opts = function()
local monokai_opts = require("halfdan.util").opts("monokai-pro.nvim")
return {
float = vim.tbl_contains(monokai_opts.background_clear or {}, "neo-tree"),
separator = "bubble", -- bubble | triangle
---@type any
colorful = true,
}
end,
config = function(_, opts)
local lualine_config = require("halfdan.lualine")
lualine_config.setup(opts)
lualine_config.load()
end,
},
{'rcarriga/nvim-notify'},
{'rcarriga/nvim-notify'},
{
"nvim-neorg/neorg",
lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
version = "*", -- Pin Neorg to the latest stable release
config = function()
require('neorg').setup({
load = {
["core.defaults"] = {},
["core.dirman"] = {
config = {
workspaces = {
work = "~/org/work",
home = "~/org/home",
},
index = "index.norg",
}
},
["core.completion"] = {
config = {
engine = "nvim-cmp",
},
},
["core.concealer"] = {},
["core.journal"] = {
config = {
strategy = "flat",
},
},
["core.integrations.telescope"] = {},
}
})
end,
},
{'nvim-neorg/neorg-telescope'},
{'justinmk/vim-sneak'},
{'machakann/vim-highlightedyank'},
{
'nvimdev/lspsaga.nvim',
config = function()
require('lspsaga').setup({
symbol_in_winbar = {
enable = false,
{
"nvim-neorg/neorg",
lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
version = "*", -- Pin Neorg to the latest stable release
config = function()
require('neorg').setup({
load = {
["core.defaults"] = {},
["core.dirman"] = {
config = {
workspaces = {
work = "~/org/work",
home = "~/org/home",
},
lightbulb = {
enable = false,
}
})
end,
dependencies = {
'nvim-treesitter/nvim-treesitter', -- optional
'nvim-tree/nvim-web-devicons' -- optional
}
},
{
'hrsh7th/nvim-cmp',
dependencies = {
{ 'hrsh7th/cmp-buffer', after = 'nvim-cmp' },
'hrsh7th/cmp-nvim-lsp',
'onsails/lspkind.nvim',
{ 'hrsh7th/cmp-path', after = 'nvim-cmp' },
{ 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' },
{ 'hrsh7th/cmp-cmdline', after = 'nvim-cmp', event = 'CmdlineEnter' },
{'petertriho/cmp-git', after = 'nvim-cmp'},
}
},
-- Used to display LSP status in Lualine
{'nvim-lua/lsp-status.nvim'},
{
"hedyhli/outline.nvim",
lazy = true,
cmd = { "Outline", "OutlineOpen" },
keys = { -- Example mapping to toggle outline
{ "<leader>o", "<cmd>Outline<CR>", desc = "Toggle outline" },
},
opts = {
-- Your setup opts here
},
},
{
'numToStr/Comment.nvim',
config = function()
require('Comment').setup()
end
},
-- Telescope fuzzy find files/grep
{'nvim-lua/popup.nvim'},
{'nvim-lua/plenary.nvim'},
{
"fdschmidt93/telescope-egrepify.nvim",
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
},
{'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
{'nvim-telescope/telescope.nvim'},
{'nvim-telescope/telescope-dap.nvim'},
{
"danielfalk/smart-open.nvim",
branch = "0.2.x",
dependencies = {"kkharji/sqlite.lua"}
},
{'numToStr/FTerm.nvim'},
-- Debugging
"mfussenegger/nvim-dap",
"rcarriga/nvim-dap-ui",
"nvim-neotest/nvim-nio",
"theHamsta/nvim-dap-virtual-text",
"leoluz/nvim-dap-go",
-- => Language Support
{'rust-lang/rust.vim'},
{
'mrcjkb/rustaceanvim',
version = '^6', -- Recommended
lazy = false, -- This plugin is already lazy
},
{'tpope/vim-projectionist'},
-- themes & colorschemes
{ "rose-pine/neovim", name = "rose-pine" },
{'luisiacc/gruvbox-baby'},
{'akinsho/bufferline.nvim', version = "*", dependencies = 'nvim-tree/nvim-web-devicons',
keys = {
{ "<C-1>", "<Cmd>BufferLineGoToBuffer 1<CR>", desc = "Go to buffer 1" },
{ "<C-2>", "<Cmd>BufferLineGoToBuffer 2<CR>", desc = "Go to buffer 2" },
{ "<C-3>", "<Cmd>BufferLineGoToBuffer 3<CR>", desc = "Go to buffer 3" },
{ "<C-4>", "<Cmd>BufferLineGoToBuffer 4<CR>", desc = "Go to buffer 4" },
{ "<C-5>", "<Cmd>BufferLineGoToBuffer 5<CR>", desc = "Go to buffer 5" },
{ "<C-6>", "<Cmd>BufferLineGoToBuffer 6<CR>", desc = "Go to buffer 6" },
{ "<C-7>", "<Cmd>BufferLineGoToBuffer 7<CR>", desc = "Go to buffer 7" },
{ "<C-8>", "<Cmd>BufferLineGoToBuffer 8<CR>", desc = "Go to buffer 8" },
{ "<C-9>", "<Cmd>BufferLineGoToBuffer 9<CR>", desc = "Go to buffer 9" },
{ "<S-l>", "<Cmd>BufferLineCycleNext<CR>", desc = "Next buffer" },
{ "<S-h>", "<Cmd>BufferLineCyclePrev<CR>", desc = "Previous buffer" },
{ "<A-S-l>", "<Cmd>BufferLineMoveNext<CR>", desc = "Move buffer right" },
{ "<A-S-h>", "<Cmd>BufferLineMovePrev<CR>", desc = "Move buffer left" },
},
opts = function()
local monokai_opts = require("halfdan.util").opts("monokai-pro.nvim")
return {
options = {
diagnostics = "nvim_lsp", -- | "nvim_lsp" | "coc",
-- separator_style = "", -- | "thick" | "thin" | "slope" | { 'any', 'any' },
separator_style = { "", "" }, -- | "thick" | "thin" | { 'any', 'any' },
-- separator_style = "slant", -- | "thick" | "thin" | { 'any', 'any' },
indicator = {
-- icon = " ",
-- style = 'icon',
style = "underline",
},
close_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
diagnostics_indicator = function(count, _, _, _)
if count > 9 then
return "9+"
end
return tostring(count)
end,
numbers = function(opts)
return string.format('%s', opts.raise(opts.ordinal))
end,
offsets = {
{
filetype = "neo-tree",
text = "EXPLORER",
text_align = "center",
separator = vim.tbl_contains(monokai_opts.background_clear or {}, "neo-tree"), -- set to `true` if clear background of neo-tree
},
{
filetype = "NvimTree",
text = "EXPLORER",
text_align = "center",
separator = vim.tbl_contains(monokai_opts.background_clear or {}, "nvim-tree"), -- set to `true` if clear background of neo-tree
},
},
hover = {
enabled = true,
delay = 0,
reveal = { "close" },
index = "index.norg",
}
},
-- ["core.completion"] = {
-- config = {
-- engine = "nvim-cmp",
-- },
-- },
["core.concealer"] = {},
["core.journal"] = {
config = {
strategy = "flat",
},
},
["core.integrations.telescope"] = {},
}
end,
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
}
})
end,
},
{'nvim-neorg/neorg-telescope'},
{'justinmk/vim-sneak'},
{'machakann/vim-highlightedyank'},
{
'nvimdev/lspsaga.nvim',
config = function()
require('lspsaga').setup({
symbol_in_winbar = {
enable = false,
},
lightbulb = {
enable = false,
}
})
end,
dependencies = {
'nvim-treesitter/nvim-treesitter', -- optional
'nvim-tree/nvim-web-devicons' -- optional
}
},
-- {
-- 'hrsh7th/nvim-cmp',
-- dependencies = {
-- { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' },
-- 'hrsh7th/cmp-nvim-lsp',
-- 'onsails/lspkind.nvim',
-- { 'hrsh7th/cmp-path', after = 'nvim-cmp' },
-- { 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' },
-- { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp', event = 'CmdlineEnter' },
-- {'petertriho/cmp-git', after = 'nvim-cmp'},
-- }
-- },
{
'saghen/blink.cmp',
dependencies = { 'rafamadriz/friendly-snippets' },
version = '1.*',
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
-- 'super-tab' for mappings similar to vscode (tab to accept)
-- 'enter' for enter to accept
-- 'none' for no mappings
--
-- All presets have the following mappings:
-- C-space: Open menu or open docs if already open
-- C-n/C-p or Up/Down: Select next/previous item
-- C-e: Hide menu
-- C-k: Toggle signature help (if signature.enabled = true)
--
-- See :h blink-cmp-config-keymap for defining your own keymap
keymap = { preset = 'super-tab' },
appearance = {
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = 'mono'
},
-- (Default) Only show the documentation popup when manually triggered
completion = { documentation = { auto_show = false } },
-- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend`
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' },
},
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
--
-- See the fuzzy documentation for more information
fuzzy = { implementation = "prefer_rust" }
},
opts_extend = { "sources.default" }
},
-- Used to display LSP status in Lualine
{'nvim-lua/lsp-status.nvim'},
{
"hedyhli/outline.nvim",
lazy = true,
cmd = { "Outline", "OutlineOpen" },
keys = { -- Example mapping to toggle outline
{ "<leader>o", "<cmd>Outline<CR>", desc = "Toggle outline" },
},
opts = {
-- Your setup opts here
},
},
{
'numToStr/Comment.nvim',
config = function()
require('Comment').setup()
end
},
-- Telescope fuzzy find files/grep
{'nvim-lua/popup.nvim'},
{'nvim-lua/plenary.nvim'},
{
"fdschmidt93/telescope-egrepify.nvim",
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
},
{'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
{'nvim-telescope/telescope.nvim'},
{'nvim-telescope/telescope-dap.nvim'},
{
"danielfalk/smart-open.nvim",
branch = "0.2.x",
dependencies = {"kkharji/sqlite.lua"}
},
{'numToStr/FTerm.nvim'},
-- Debugging
"mfussenegger/nvim-dap",
"rcarriga/nvim-dap-ui",
"nvim-neotest/nvim-nio",
"theHamsta/nvim-dap-virtual-text",
"leoluz/nvim-dap-go",
-- => Language Support
{
"folke/neodev.nvim",
config = function()
require("neodev").setup({})
end
},
{'neovim/nvim-lspconfig'},
{'rust-lang/rust.vim'},
{
'mrcjkb/rustaceanvim',
version = '^6', -- Recommended
lazy = false, -- This plugin is already lazy
},
{'tpope/vim-projectionist'},
-- themes & colorschemes
{ "rose-pine/neovim", name = "rose-pine" },
{'luisiacc/gruvbox-baby'},
{'akinsho/bufferline.nvim', version = "*", dependencies = 'nvim-tree/nvim-web-devicons',
keys = {
{ "<C-1>", "<Cmd>BufferLineGoToBuffer 1<CR>", desc = "Go to buffer 1" },
{ "<C-2>", "<Cmd>BufferLineGoToBuffer 2<CR>", desc = "Go to buffer 2" },
{ "<C-3>", "<Cmd>BufferLineGoToBuffer 3<CR>", desc = "Go to buffer 3" },
{ "<C-4>", "<Cmd>BufferLineGoToBuffer 4<CR>", desc = "Go to buffer 4" },
{ "<C-5>", "<Cmd>BufferLineGoToBuffer 5<CR>", desc = "Go to buffer 5" },
{ "<C-6>", "<Cmd>BufferLineGoToBuffer 6<CR>", desc = "Go to buffer 6" },
{ "<C-7>", "<Cmd>BufferLineGoToBuffer 7<CR>", desc = "Go to buffer 7" },
{ "<C-8>", "<Cmd>BufferLineGoToBuffer 8<CR>", desc = "Go to buffer 8" },
{ "<C-9>", "<Cmd>BufferLineGoToBuffer 9<CR>", desc = "Go to buffer 9" },
{ "<S-l>", "<Cmd>BufferLineCycleNext<CR>", desc = "Next buffer" },
{ "<S-h>", "<Cmd>BufferLineCyclePrev<CR>", desc = "Previous buffer" },
{ "<A-S-l>", "<Cmd>BufferLineMoveNext<CR>", desc = "Move buffer right" },
{ "<A-S-h>", "<Cmd>BufferLineMovePrev<CR>", desc = "Move buffer left" },
},
opts = function()
local monokai_opts = require("halfdan.util").opts("monokai-pro.nvim")
return {
options = {
diagnostics = "nvim_lsp", -- | "nvim_lsp" | "coc",
-- separator_style = "", -- | "thick" | "thin" | "slope" | { 'any', 'any' },
separator_style = { "", "" }, -- | "thick" | "thin" | { 'any', 'any' },
-- separator_style = "slant", -- | "thick" | "thin" | { 'any', 'any' },
indicator = {
-- icon = " ",
-- style = 'icon',
style = "underline",
},
close_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
diagnostics_indicator = function(count, _, _, _)
if count > 9 then
return "9+"
end
return tostring(count)
end,
numbers = function(opts)
return string.format('%s', opts.raise(opts.ordinal))
end,
offsets = {
{
filetype = "neo-tree",
text = "EXPLORER",
text_align = "center",
separator = vim.tbl_contains(monokai_opts.background_clear or {}, "neo-tree"), -- set to `true` if clear background of neo-tree
},
{
filetype = "NvimTree",
text = "EXPLORER",
text_align = "center",
separator = vim.tbl_contains(monokai_opts.background_clear or {}, "nvim-tree"), -- set to `true` if clear background of neo-tree
},
},
hover = {
enabled = true,
delay = 0,
reveal = { "close" },
},
},
}
end,
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
}
}
})

View File

@@ -2,7 +2,7 @@ if vim.g.vscode then
return
end
require('nvim-treesitter.configs').setup({
require('nvim-treesitter').setup({
ensure_installed = { "python", "go", "elixir", "heex", "rust", "gomod", "json", "lua", "yaml", "norg", "query", "markdown", "markdown_inline", "gleam", "zig", "odin"},
ignore_install = { "haskell" },
highlight = {

View File

@@ -9,5 +9,6 @@
"language": "lua",
"path": "./snippets/lua.json"
}
]
}
}