fix lualine colors, add mapping for lsp snippets, add neodev
This commit is contained in:
@@ -6,17 +6,18 @@
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "75dc649106827183547d3bedd4602442340d2f7f" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "f99a08abc5ab0b9b5b0e7a33211a439155c60a61" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
||||
"heirline-components.nvim": { "branch": "main", "commit": "31bd340149d212b4dc78147977fcd9181ee98a05" },
|
||||
"heirline.nvim": { "branch": "master", "commit": "0d797435e54645a5f98bad7ad6046aac1ef95c1e" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "a3edeae34a5dd2c129388c6cbb8f1d156e6f7724" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "ad30030b6abca7dac5a493c58b4d183b3fe93202" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
|
||||
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "710a8fa7379db32199545f30ea01dd8446b9302f" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "979beffc1a86e7ba19bd6535c0370d8e1aaaad3c" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
|
||||
"plenary": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
return {
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("gruvbox").setup({})
|
||||
vim.cmd("colorscheme gruvbox")
|
||||
end
|
||||
},
|
||||
{
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
config = function ()
|
||||
require('colorizer').setup({ '*' })
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function ()
|
||||
require('gitsigns').setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"rebelot/heirline.nvim",
|
||||
version = "1.0.*",
|
||||
dependencies = { "Zeioth/heirline-components.nvim" },
|
||||
opts = function()
|
||||
local lib = require("heirline-components.all")
|
||||
return {
|
||||
|
||||
statusline = { -- UI statusbar
|
||||
hl = { fg = "fg", bg = "bg" },
|
||||
lib.component.mode(),
|
||||
lib.component.git_branch(),
|
||||
lib.component.file_info(),
|
||||
lib.component.git_diff(),
|
||||
lib.component.diagnostics(),
|
||||
lib.component.fill(),
|
||||
lib.component.cmd_info(),
|
||||
lib.component.fill(),
|
||||
lib.component.lsp(),
|
||||
lib.component.compiler_state(),
|
||||
lib.component.virtual_env(),
|
||||
lib.component.nav(),
|
||||
lib.component.mode { surround = { separator = "right" } },
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
local heirline = require "heirline"
|
||||
local heirline_components = require "heirline-components.all"
|
||||
|
||||
heirline_components.init.subscribe_to_events()
|
||||
heirline.load_colors(heirline_components.hl.get_colors())
|
||||
heirline.setup(opts)
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ return {
|
||||
|
||||
config = function()
|
||||
local cmp = require('cmp')
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
require("fidget").setup({})
|
||||
require('mason').setup({})
|
||||
@@ -37,7 +38,39 @@ return {
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- `Enter` key to confirm completion
|
||||
['<CR>'] = cmp.mapping.confirm({ select = false }),
|
||||
['<CR>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
if luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
else
|
||||
cmp.confirm({
|
||||
select = true,
|
||||
})
|
||||
end
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end),
|
||||
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.locally_jumpable(1) then
|
||||
luasnip.jump(1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
-- Ctrl+Space to trigger completion menu
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
@@ -51,6 +84,7 @@ return {
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
55
lua/crentist/lazy/lualine.lua
Normal file
55
lua/crentist/lazy/lualine.lua
Normal file
@@ -0,0 +1,55 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
local colors = {
|
||||
black = '#282828',
|
||||
white = '#ebdbb2',
|
||||
red = '#fb4934',
|
||||
green = '#b8bb26',
|
||||
blue = '#458588',
|
||||
yellow = '#fabd2f',
|
||||
magenta = '#d3869b',
|
||||
darkgray = '#3c3836',
|
||||
lightgray = '#504945',
|
||||
inactivegray = '#7c6f64',
|
||||
}
|
||||
require('lualine').setup({
|
||||
options = {
|
||||
theme = {
|
||||
normal = {
|
||||
a = { bg = colors.yellow, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.darkgray, fg = colors.white },
|
||||
},
|
||||
insert = {
|
||||
a = { bg = colors.blue, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.lightgray, fg = colors.white },
|
||||
},
|
||||
visual = {
|
||||
a = { bg = colors.magenta, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.inactivegray, fg = colors.black },
|
||||
},
|
||||
replace = {
|
||||
a = { bg = colors.red, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.black, fg = colors.white },
|
||||
},
|
||||
command = {
|
||||
a = { bg = colors.green, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.inactivegray, fg = colors.black },
|
||||
},
|
||||
inactive = {
|
||||
a = { bg = colors.darkgray, fg = colors.magenta, gui = 'bold' },
|
||||
b = { bg = colors.darkgray, fg = colors.magenta },
|
||||
c = { bg = colors.darkgray, fg = colors.magenta },
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
end
|
||||
}
|
||||
3
lua/crentist/lazy/neodev.lua
Normal file
3
lua/crentist/lazy/neodev.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
{ "folke/neodev.nvim", opts = {} }
|
||||
}
|
||||
@@ -2,8 +2,8 @@ vim.g.mapleader = " "
|
||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||
|
||||
-- move selected blocks
|
||||
vim.keymap.set("v", "<S-Down>", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "<S-Up>", ":m '<-2<CR>gv=gv")
|
||||
vim.keymap.set("v", "<S-J>", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "<S-K>", ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- keep cursor on J
|
||||
vim.keymap.set("n", "J", "mzJ`z")
|
||||
|
||||
Reference in New Issue
Block a user