Compare commits
No commits in common. "22be77e7e69f854c7c76f9b2c65b1e906b9bea63" and "f259ac15a831731aa8bff255b7de78b9a823428e" have entirely different histories.
22be77e7e6
...
f259ac15a8
2
init.vim
2
init.vim
@ -32,9 +32,7 @@ source ~/.config/nvim/plugin-confs/lspconfig.lua
|
|||||||
source ~/.config/nvim/plugin-confs/lsplines.lua
|
source ~/.config/nvim/plugin-confs/lsplines.lua
|
||||||
source ~/.config/nvim/plugin-confs/null-ls.lua
|
source ~/.config/nvim/plugin-confs/null-ls.lua
|
||||||
source ~/.config/nvim/plugin-confs/nvim-cmp.lua
|
source ~/.config/nvim/plugin-confs/nvim-cmp.lua
|
||||||
source ~/.config/nvim/plugin-confs/luasnip.lua
|
|
||||||
source ~/.config/nvim/plugin-confs/fidget.lua
|
source ~/.config/nvim/plugin-confs/fidget.lua
|
||||||
source ~/.config/nvim/plugin-confs/rainbow-delimiters.lua
|
|
||||||
" source ~/.config/nvim/plugin-confs/symbols-outline.lua
|
" source ~/.config/nvim/plugin-confs/symbols-outline.lua
|
||||||
" source ~/.config/nvim/plugin-confs/chatgpt.lua
|
" source ~/.config/nvim/plugin-confs/chatgpt.lua
|
||||||
source ~/.config/nvim/plugin-confs/nvim-colorizer.lua
|
source ~/.config/nvim/plugin-confs/nvim-colorizer.lua
|
||||||
|
@ -228,14 +228,10 @@ require('packer').startup(function(use)
|
|||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
run = function() vim.fn["mkdp#util#install"]() end
|
run = function() vim.fn["mkdp#util#install"]() end
|
||||||
})
|
})
|
||||||
use {
|
|
||||||
"L3MON4D3/LuaSnip",
|
use 'L3MON4D3/LuaSnip'
|
||||||
-- tag = "v2.*",
|
use 'folke/neodev.nvim'
|
||||||
run = "make install_jsregexp",
|
use 'saadparwaiz1/cmp_luasnip'
|
||||||
dependencies = { "rafamadriz/friendly-snippets" }
|
|
||||||
}
|
|
||||||
use { 'folke/neodev.nvim' }
|
|
||||||
use { 'saadparwaiz1/cmp_luasnip' }
|
|
||||||
use { 'hrsh7th/cmp-buffer' }
|
use { 'hrsh7th/cmp-buffer' }
|
||||||
use { 'hrsh7th/cmp-cmdline' }
|
use { 'hrsh7th/cmp-cmdline' }
|
||||||
use { 'hrsh7th/cmp-nvim-lsp' }
|
use { 'hrsh7th/cmp-nvim-lsp' }
|
||||||
@ -297,7 +293,6 @@ require('packer').startup(function(use)
|
|||||||
use { 'lewis6991/gitsigns.nvim' }
|
use { 'lewis6991/gitsigns.nvim' }
|
||||||
use { 'rcarriga/nvim-notify' }
|
use { 'rcarriga/nvim-notify' }
|
||||||
use { 'stevearc/dressing.nvim' }
|
use { 'stevearc/dressing.nvim' }
|
||||||
use { 'HiPhish/rainbow-delimiters.nvim' }
|
|
||||||
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
@ -44,8 +44,8 @@ local on_attach = function(client, bufnr)
|
|||||||
-- end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- vim.cmd [[autocmd! ColorScheme * highlight NormalFloat guibg=#1f2335]]
|
vim.cmd [[autocmd! ColorScheme * highlight NormalFloat guibg=#1f2335]]
|
||||||
-- vim.cmd [[autocmd! ColorScheme * highlight FloatBorder guifg=white guibg=#1f2335]]
|
vim.cmd [[autocmd! ColorScheme * highlight FloatBorder guifg=white guibg=#1f2335]]
|
||||||
|
|
||||||
-- squared corners
|
-- squared corners
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
|
@ -5,7 +5,6 @@ local lspconfig = require('lspconfig')
|
|||||||
-- luasnip setup
|
-- luasnip setup
|
||||||
local luasnip = require 'luasnip'
|
local luasnip = require 'luasnip'
|
||||||
local highlight = require('cmp.utils.highlight')
|
local highlight = require('cmp.utils.highlight')
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
|
||||||
local has_words_before = function()
|
local has_words_before = function()
|
||||||
@ -14,13 +13,13 @@ local has_words_before = function()
|
|||||||
end
|
end
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
return col ~= 0 and
|
return col ~= 0 and
|
||||||
vim.api.nvim_buf_get_text(0, line - 1, 0, line - 1, col, {})[1]:match(
|
vim.api.nvim_buf_get_text(0, line - 1, 0, line - 1, col, {})[1]:match(
|
||||||
"^%s*$") == nil
|
"^%s*$") == nil
|
||||||
end
|
end
|
||||||
|
|
||||||
lspkind.init({symbol_map = {Copilot = ""}})
|
lspkind.init({ symbol_map = { Copilot = "" } })
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", {fg = "#6CC644"})
|
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#6CC644" })
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
snippet = {
|
snippet = {
|
||||||
@ -43,7 +42,7 @@ cmp.setup({
|
|||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, {'i', 's'}),
|
end, { 'i', 's' }),
|
||||||
['<C-n>'] = cmp.mapping(function(fallback)
|
['<C-n>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
@ -54,7 +53,7 @@ cmp.setup({
|
|||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, {'i', 's'}),
|
end, { 'i', 's' }),
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
@ -74,7 +73,7 @@ cmp.setup({
|
|||||||
-- end, { "i", "s" }),
|
-- end, { "i", "s" }),
|
||||||
["<Tab>"] = vim.schedule_wrap(function(fallback)
|
["<Tab>"] = vim.schedule_wrap(function(fallback)
|
||||||
if cmp.visible() and has_words_before() then
|
if cmp.visible() and has_words_before() then
|
||||||
cmp.select_next_item({behavior = cmp.SelectBehavior.Select})
|
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
|
||||||
elseif luasnip.expand_or_jumpable() then
|
elseif luasnip.expand_or_jumpable() then
|
||||||
luasnip.expand_or_jump()
|
luasnip.expand_or_jump()
|
||||||
else
|
else
|
||||||
@ -83,7 +82,7 @@ cmp.setup({
|
|||||||
end),
|
end),
|
||||||
['<S-Tab>'] = cmp.mapping(function()
|
['<S-Tab>'] = cmp.mapping(function()
|
||||||
if cmp.visible() then cmp.select_prev_item() end
|
if cmp.visible() then cmp.select_prev_item() end
|
||||||
end, {"i", "s"})
|
end, { "i", "s" })
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
completion = {
|
completion = {
|
||||||
@ -106,7 +105,7 @@ cmp.setup({
|
|||||||
formatting = {
|
formatting = {
|
||||||
-- options: 'text', 'text_symbol', 'symbol_text', 'symbol'
|
-- options: 'text', 'text_symbol', 'symbol_text', 'symbol'
|
||||||
-- mode = 'symbol_text',
|
-- mode = 'symbol_text',
|
||||||
fields = {"kind", "abbr", "menu"},
|
fields = { "kind", "abbr", "menu" },
|
||||||
format = function(entry, vim_item)
|
format = function(entry, vim_item)
|
||||||
local kind = require("lspkind").cmp_format({
|
local kind = require("lspkind").cmp_format({
|
||||||
mode = "symbol_text",
|
mode = "symbol_text",
|
||||||
@ -139,7 +138,7 @@ cmp.setup({
|
|||||||
TypeParameter = ""
|
TypeParameter = ""
|
||||||
}
|
}
|
||||||
})(entry, vim_item)
|
})(entry, vim_item)
|
||||||
local strings = vim.split(kind.kind, "%s", {trimempty = true})
|
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
||||||
kind.kind = " " .. strings[1] .. " "
|
kind.kind = " " .. strings[1] .. " "
|
||||||
kind.menu = " (" .. strings[2] .. ")"
|
kind.menu = " (" .. strings[2] .. ")"
|
||||||
|
|
||||||
@ -157,13 +156,13 @@ cmp.setup({
|
|||||||
-- })
|
-- })
|
||||||
},
|
},
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{name = "copilot", group_index = 2}, {name = "path", group_index = 2},
|
{ name = "copilot", group_index = 2 }, { name = "path", group_index = 2 },
|
||||||
{name = 'nvim_lsp', group_index = 2},
|
{ name = 'nvim_lsp', group_index = 2 },
|
||||||
{name = 'nvim_lsp_signature_help', group_index = 2},
|
{ name = 'nvim_lsp_signature_help', group_index = 2 },
|
||||||
{name = 'nvim_lsp_document_symbol', group_index = 2},
|
{ name = 'nvim_lsp_document_symbol', group_index = 2 },
|
||||||
{name = 'vim-dadbod-completion', group_index = 2},
|
{ name = 'vim-dadbod-completion', group_index = 2 },
|
||||||
{name = 'neorg', group_index = 2}, -- For luasnip users.
|
{ name = 'neorg', group_index = 2 }, -- For luasnip users.
|
||||||
{name = 'luasnip', group_index = 2}, -- For luasnip users.
|
{ name = 'luasnip', group_index = 2 }, -- For luasnip users.
|
||||||
{
|
{
|
||||||
name = 'buffer',
|
name = 'buffer',
|
||||||
option = {
|
option = {
|
||||||
@ -178,7 +177,7 @@ cmp.setup({
|
|||||||
}
|
}
|
||||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
-- { name = 'ultisnips' }, -- For ultisnips users.
|
||||||
-- { name = 'snippy' }, -- For snippy users.
|
-- { name = 'snippy' }, -- For snippy users.
|
||||||
}, {{name = 'buffer'}}),
|
}, { { name = 'buffer' } }),
|
||||||
sorting = {
|
sorting = {
|
||||||
priority_weight = 2,
|
priority_weight = 2,
|
||||||
comparators = {
|
comparators = {
|
||||||
@ -203,13 +202,13 @@ cmp.setup({
|
|||||||
|
|
||||||
cmp.setup.cmdline('/', {
|
cmp.setup.cmdline('/', {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
sources = {{name = 'buffer'}}
|
sources = { { name = 'buffer' } }
|
||||||
})
|
})
|
||||||
|
|
||||||
cmp.setup.cmdline(':', {
|
cmp.setup.cmdline(':', {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
sources = cmp.config.sources({{name = 'path'}}, {
|
sources = cmp.config.sources({ { name = 'path' } }, {
|
||||||
{name = 'cmdline', option = {ignore_cmds = {'Man', '!'}}}
|
{ name = 'cmdline', option = { ignore_cmds = { 'Man', '!' } } }
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -221,16 +220,15 @@ for _, lsp in ipairs(servers) do
|
|||||||
if lsp == 'lua_ls' then
|
if lsp == 'lua_ls' then
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup {
|
||||||
-- on_attach = my_custom_on_attach,
|
-- on_attach = my_custom_on_attach,
|
||||||
-- on_attach = highlight_symbol_under_cursor(),
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
callSnippet = "Replace"
|
callSnippet = "Replace"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lspconfig[lsp].setup {capabilities = capabilities}
|
lspconfig[lsp].setup { capabilities = capabilities }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
cmp.event:on("menu_opened",
|
cmp.event:on("menu_opened",
|
||||||
function() vim.b.copilot_suggestion_hidden = true end)
|
function() vim.b.copilot_suggestion_hidden = true end)
|
||||||
cmp.event:on("menu_closed",
|
cmp.event:on("menu_closed",
|
||||||
function() vim.b.copilot_suggestion_hidden = false end)
|
function() vim.b.copilot_suggestion_hidden = false end)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
require("notify").setup({
|
require("notify").setup({
|
||||||
background_colour = "#000000",
|
background_colour = "NotifyBackground",
|
||||||
fps = 144,
|
fps = 144,
|
||||||
icons = {
|
icons = {
|
||||||
DEBUG = "",
|
DEBUG = "",
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
-- This module contains a number of default definitions
|
|
||||||
local rainbow_delimiters = require 'rainbow-delimiters'
|
|
||||||
|
|
||||||
vim.g.rainbow_delimiters = {
|
|
||||||
strategy = {
|
|
||||||
[''] = rainbow_delimiters.strategy['global'],
|
|
||||||
vim = rainbow_delimiters.strategy['local']
|
|
||||||
},
|
|
||||||
query = { [''] = 'rainbow-delimiters', lua = 'rainbow-blocks' },
|
|
||||||
highlight = {
|
|
||||||
'RainbowDelimiterRed', 'RainbowDelimiterYellow', 'RainbowDelimiterBlue',
|
|
||||||
'RainbowDelimiterOrange', 'RainbowDelimiterGreen',
|
|
||||||
'RainbowDelimiterViolet', 'RainbowDelimiterCyan'
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user