Compare commits

...

3 commits

Author SHA1 Message Date
77ed4bd950
fix: better blink-cmp config, no more render-markdown 2024-10-11 23:53:54 -07:00
c3a6a443ae
chore: get rid of lsp diagnostic by passing empty table to crates.nvim 2024-10-11 23:50:55 -07:00
09ae969265
flake.lock: Update
Flake lock file updates:

• Updated input 'blink-cmp':
    'github:Saghen/blink.cmp/fc348dac16f190042d20aee62ea61b66c7c1380a' (2024-10-09)
  → 'github:Saghen/blink.cmp/2f1b85bc4f15e2f3660550ef92161a93482f2fd8' (2024-10-12)
• Updated input 'nixCats':
    'github:BirdeeHub/nixCats-nvim/b02e9655894c402e9398369b94fab57d2bf5f359?dir=nix' (2024-10-02)
  → 'github:BirdeeHub/nixCats-nvim/63687d601963606934ba7c8262aa975fcd66600f?dir=nix' (2024-10-11)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/1366d1af8f58325602280e43ed6233849fb92216' (2024-10-08)
  → 'github:nixos/nixpkgs/b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221' (2024-10-10)
• Updated input 'plugins-typst-preview':
    'github:chomosuke/typst-preview.nvim/0354cc1a7a5174a2e69cdc21c4db9a3ee18bb20a' (2024-09-29)
  → 'github:chomosuke/typst-preview.nvim/a53a136f893a59635166afcb4f277f581bd4bc73' (2024-10-11)
2024-10-11 23:41:34 -07:00
4 changed files with 14 additions and 198 deletions

View file

@ -10,11 +10,11 @@
]
},
"locked": {
"lastModified": 1728503719,
"narHash": "sha256-LMRZFzq3kP1JBbIcjOuiKstOfShdKHpyIGB9/wgxttA=",
"lastModified": 1728709956,
"narHash": "sha256-rTw88OMPunviQM6LmNfgMyM2oHNcWD/VJdUp1OMvkMA=",
"owner": "Saghen",
"repo": "blink.cmp",
"rev": "fc348dac16f190042d20aee62ea61b66c7c1380a",
"rev": "2f1b85bc4f15e2f3660550ef92161a93482f2fd8",
"type": "github"
},
"original": {
@ -417,11 +417,11 @@
"nixCats": {
"locked": {
"dir": "nix",
"lastModified": 1727835465,
"narHash": "sha256-Sj/eP/K/MHxp6K/ZqAYGY7cT+iyebf3P5HTnS/mLFCM=",
"lastModified": 1728657329,
"narHash": "sha256-eKLrDi2dqyuzTyW1PgBPJ+VC+mKgo5AyIEGLO4PATgs=",
"owner": "BirdeeHub",
"repo": "nixCats-nvim",
"rev": "b02e9655894c402e9398369b94fab57d2bf5f359",
"rev": "63687d601963606934ba7c8262aa975fcd66600f",
"type": "github"
},
"original": {
@ -635,11 +635,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1728409405,
"narHash": "sha256-kk530XBUGDpt0DQbyUb3yDpSddPqF9PA5KTo/nsmmg0=",
"lastModified": 1728538411,
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1366d1af8f58325602280e43ed6233849fb92216",
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221",
"type": "github"
},
"original": {
@ -668,11 +668,11 @@
"plugins-typst-preview": {
"flake": false,
"locked": {
"lastModified": 1727642175,
"narHash": "sha256-n0TfcXJLlRXdS6S9dwYHN688IipVSDLVXEqyYs+ROG8=",
"lastModified": 1728689675,
"narHash": "sha256-UljxDPDLC6riWwbpoai6OBE6CSUrH+p9aUJwImFLS6I=",
"owner": "chomosuke",
"repo": "typst-preview.nvim",
"rev": "0354cc1a7a5174a2e69cdc21c4db9a3ee18bb20a",
"rev": "a53a136f893a59635166afcb4f277f581bd4bc73",
"type": "github"
},
"original": {

View file

@ -21,51 +21,6 @@ return {
snippet_backward = "<S-Tab>",
},
accept = {
create_undo_point = true,
auto_brackets = {
enabled = false,
default_brackets = { "(", ")" },
override_brackets_for_filetypes = {},
-- Overrides the default blocked filetypes
force_allow_filetypes = {},
blocked_filetypes = {},
-- Synchronously use the kind of the item to determine if brackets should be added
kind_resolution = {
enabled = true,
blocked_filetypes = { "typescript", "typescriptreact", "javascript", "javascriptreact", "vue" },
},
-- Asynchronously use semantic token to determine if brackets should be added
semantic_token_resolution = {
enabled = true,
blocked_filetypes = {},
},
},
},
trigger = {
completion = {
-- regex used to get the text when fuzzy matching
-- changing this may break some sources, so please report if you run into issues
-- todo: shouldnt this also affect the accept command? should this also be per language?
keyword_regex = "[%w_\\-]",
-- LSPs can indicate when to show the completion window via trigger characters
-- however, some LSPs (*cough* tsserver *cough*) return characters that would essentially
-- always show the window. We block these by default
blocked_trigger_characters = { " ", "\n", "\t" },
-- when true, will show the completion window when the cursor comes after a trigger character when entering insert mode
show_on_insert_on_trigger_character = true,
},
signature_help = {
enabled = false,
blocked_trigger_characters = {},
blocked_retrigger_characters = {},
-- when true, will show the signature help window when the cursor comes after a trigger character when entering insert mode
show_on_insert_on_trigger_character = true,
},
},
fuzzy = {
-- frencency tracks the most recently/frequently used items and boosts the score of the item
use_frecency = true,
@ -78,7 +33,7 @@ return {
prebuiltBinaries = {
-- Whether or not to automatically download a prebuilt binary from github. If this is set to `false`
-- you will need to manually build the fuzzy binary dependencies by running `cargo build --release`
download = true,
download = false,
-- When downloading a prebuilt binary force the downloader to resolve this version. If this is uset
-- then the downloader will attempt to infer the version from the checked out git tag (if any).
--
@ -87,91 +42,12 @@ return {
},
},
sources = {
-- similar to nvim-cmp's sources, but we point directly to the source's lua module
-- multiple groups can be provided, where it'll fallback to the next group if the previous
-- returns no completion items
-- WARN: This API will have breaking changes during the beta
-- FOR REF: full example
providers = {
{
-- all of these properties work on every source
{
"blink.cmp.sources.lsp",
keyword_length = 0,
score_offset = 0,
trigger_characters = { "f", "o", "o" },
opts = {},
},
-- the follow two sources have additional options
{
"blink.cmp.sources.path",
opts = {
trailing_slash = false,
label_trailing_slash = true,
get_cwd = function(context)
return vim.fn.expand(("#%d:p:h"):format(context.bufnr))
end,
show_hidden_files_by_default = true,
},
},
{
"blink.cmp.sources.snippets",
score_offset = -3,
-- similar to https://github.com/garymjr/nvim-snippets
opts = {
friendly_snippets = true,
search_paths = { vim.fn.stdpath("config") .. "/snippets" },
global_snippets = { "all" },
extended_filetypes = {},
ignored_filetypes = {},
},
},
},
{ { "blink.cmp.sources.buffer" } },
},
},
windows = {
autocomplete = {
min_width = 30,
max_width = 60,
max_height = 10,
border = "none",
winhighlight = "Normal:BlinkCmpMenu,FloatBorder:BlinkCmpMenuBorder,CursorLine:BlinkCmpMenuSelection,Search:None",
-- keep the cursor X lines away from the top/bottom of the window
scrolloff = 2,
-- which directions to show the window,
-- falling back to the next direction when there's not enough space
direction_priority = { "s", "n" },
-- whether to preselect the first item in the completion list
preselect = true,
-- Controls how the completion items are rendered on the popup window
-- 'simple' will render the item's kind icon the left alongside the label
-- 'reversed' will render the label on the left and the kind icon + name on the right
-- 'function(blink.cmp.CompletionRenderContext): blink.cmp.Component[]' for custom rendering
draw = "simple",
-- Controls the cycling behavior when reaching the beginning or end of the completion list.
cycle = {
-- When `true`, calling `select_next` at the *bottom* of the completion list will select the *first* completion item.
from_bottom = true,
-- When `true`, calling `select_prev` at the *top* of the completion list will select the *last* completion item.
from_top = true,
},
},
documentation = {
min_width = 10,
max_width = 60,
max_height = 20,
border = "padded",
winhighlight = "Normal:BlinkCmpDoc,FloatBorder:BlinkCmpDocBorder,CursorLine:BlinkCmpDocCursorLine,Search:None",
-- which directions to show the documentation window,
-- for each of the possible autocomplete window directions,
-- falling back to the next direction when there's not enough space
direction_priority = {
autocomplete_north = { "e", "w", "n", "s" },
autocomplete_south = { "e", "w", "s", "n" },
},
auto_show = true,
auto_show_delay_ms = 500,
update_delay_ms = 100,
@ -181,54 +57,8 @@ return {
max_width = 100,
max_height = 10,
border = "padded",
winhighlight = "Normal:BlinkCmpSignatureHelp,FloatBorder:BlinkCmpSignatureHelpBorder",
},
},
highlight = {
ns = vim.api.nvim_create_namespace("blink_cmp"),
-- sets the fallback highlight groups to nvim-cmp's highlight groups
-- useful for when your theme doesn't support blink.cmp
-- will be removed in a future release, assuming themes add support
use_nvim_cmp_as_default = false,
},
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- adjusts spacing to ensure icons are aligned
nerd_font_variant = "normal",
kind_icons = {
Text = "󰉿",
Method = "󰊕",
Function = "󰊕",
Constructor = "󰒓",
Field = "󰜢",
Variable = "󰆦",
Property = "󰖷",
Class = "󱡠",
Interface = "󱡠",
Struct = "󱡠",
Module = "󰅩",
Unit = "󰪚",
Value = "󰦨",
Enum = "󰦨",
EnumMember = "󰦨",
Keyword = "󰻾",
Constant = "󰏿",
Snippet = "󱄽",
Color = "󰏘",
File = "󰈔",
Reference = "󰬲",
Folder = "󰉋",
Event = "󱐋",
Operator = "󰪚",
TypeParameter = "󰬛",
},
})
end,
}

View file

@ -233,7 +233,7 @@ return {
"crates.nvim",
event = "BufRead Cargo.toml",
after = function()
require("crates").setup()
require("crates").setup({})
end,
},
{ "rustaceanvim" },

View file

@ -4,20 +4,6 @@ return {
after = function()
require("render-markdown").setup({
file_types = { "markdown" },
overrides = {
buftype = {
nofile = {
render_modes = { "n", "c", "i" },
debounce = 5,
code = {
left_pad = 0,
right_pad = 0,
language_pad = 0,
},
},
},
filetype = {},
},
})
end,
},