comments and better cmp scoring
This commit is contained in:
@ -34,7 +34,6 @@ return {
|
||||
},
|
||||
{ "simrat39/rust-tools.nvim", ft = "rust" },
|
||||
|
||||
"RRethy/vim-illuminate",
|
||||
{
|
||||
"rafcamlet/nvim-luapad",
|
||||
config = function()
|
||||
@ -53,6 +52,7 @@ return {
|
||||
"kosayoda/nvim-lightbulb",
|
||||
"ntpeters/vim-better-whitespace",
|
||||
"junegunn/fzf.vim",
|
||||
"AndrewRadev/tagalong.vim",
|
||||
"tversteeg/registers.nvim",
|
||||
"jremmen/vim-ripgrep",
|
||||
{ "andymass/vim-matchup", event = "VimEnter" },
|
||||
|
@ -54,6 +54,7 @@ return {
|
||||
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
||||
|
||||
local cmp = require("cmp")
|
||||
local compare = cmp.config.compare
|
||||
|
||||
local conditionalSources = {}
|
||||
|
||||
@ -94,9 +95,22 @@ return {
|
||||
{ name = "luasnip", priority = 8 },
|
||||
{ name = "nvim_lsp", priority = 7 },
|
||||
{ name = "spell" },
|
||||
{ name = "treesitter", priority = 6 },
|
||||
{ name = "treesitter" },
|
||||
{ name = "buffer" },
|
||||
}, conditionalSources)),
|
||||
|
||||
sorting = {
|
||||
comparators = {
|
||||
compare.score, -- based on : score = score + ((#sources - (source_index - 1)) * sorting.priority_weight)
|
||||
compare.offset,
|
||||
--compare.order,
|
||||
--compare.sort_text,
|
||||
-- compare.exact,
|
||||
-- compare.kind,
|
||||
-- compare.length,
|
||||
},
|
||||
},
|
||||
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
menu = {
|
||||
|
@ -1,6 +1,13 @@
|
||||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
lazy = false,
|
||||
keys = {
|
||||
{ "<leader>c<space>", mode = "n", desc = "Comment toggle current line" },
|
||||
{ "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" },
|
||||
{ "gc", mode = "x", desc = "Comment toggle linewise (visual)" },
|
||||
{ "gbc", mode = "n", desc = "Comment toggle current block" },
|
||||
{ "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" },
|
||||
{ "gb", mode = "x", desc = "Comment toggle blockwise (visual)" },
|
||||
},
|
||||
config = function()
|
||||
local ft = require("Comment.ft")
|
||||
ft.gd = "# %s"
|
||||
|
@ -160,4 +160,13 @@ endfun
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
|
||||
noremap <Up> <Nop>
|
||||
noremap <Down> <Nop>
|
||||
noremap <Left> <Nop>
|
||||
noremap <Right> <Nop>
|
||||
inoremap <Up> <Nop>
|
||||
inoremap <Down> <Nop>
|
||||
inoremap <Left> <Nop>
|
||||
inoremap <Right> <Nop>
|
||||
|
||||
lua require("config.google")
|
||||
|
Reference in New Issue
Block a user