Compare commits
No commits in common. "079ea655e0a63e63ae4b354652a4c52e224fd388" and "cf07a38ecf5bced97ae626fb4599c36805e2136e" have entirely different histories.
079ea655e0
...
cf07a38ecf
19
init.lua
19
init.lua
|
@ -1,12 +1,4 @@
|
|||
local vanila_vim_autostart_commands = {
|
||||
"set number",
|
||||
"set clipboard=unnamedplus",
|
||||
"set nowrap"
|
||||
}
|
||||
|
||||
for _, cmd in pairs(vanila_vim_autostart_commands) do
|
||||
vim.cmd(cmd)
|
||||
end
|
||||
vim.cmd("set number")
|
||||
|
||||
require("config.lazy")
|
||||
|
||||
|
@ -14,20 +6,21 @@ require("mappings")
|
|||
|
||||
require("config.plugins.acmp")
|
||||
require("config.plugins.autotag")
|
||||
require("config.plugins.autocomplete")
|
||||
require("config.plugins.autocommand")
|
||||
require("config.plugins.bufferline")
|
||||
require("config.plugins.colorizer")
|
||||
require("config.plugins.comment")
|
||||
require("config.plugins.dap")
|
||||
require("config.plugins.dropbar")
|
||||
require("config.plugins.gitsigns")
|
||||
require("ibl").setup()
|
||||
require("config.plugins.lualine")
|
||||
require("config.plugins.navic")
|
||||
require("config.plugins.navic")
|
||||
require("config.plugins.noice")
|
||||
require("toggleterm").setup()
|
||||
require("config.plugins.treesitter")
|
||||
require("config.plugins.neotree")
|
||||
require("config.plugins.nvimufo")
|
||||
require("config.plugins.prettier")
|
||||
require("config.plugins.rustaceanvim")
|
||||
require("config.plugins.winbar")
|
||||
require("huez").setup({})
|
||||
require("config.plugins.dropbar")
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
vim.api.nvim_create_autocmd(
|
||||
{
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},
|
||||
{
|
||||
pattern = "*.typ",
|
||||
callback = function()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
vim.api.nvim_buf_set_option(buf, "filetype", "typst")
|
||||
end
|
||||
}
|
||||
)
|
|
@ -1,95 +0,0 @@
|
|||
local cmp = require "cmp"
|
||||
|
||||
local kind_icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
}
|
||||
|
||||
cmp.setup{
|
||||
completion = { completeopt = "menu,menuone" },
|
||||
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
-- Kind icons
|
||||
vim_item.kind = string.format('\t%s %s\t', kind_icons[vim_item.kind], vim_item.kind) -- This concatenates the icons with the name of the item kind
|
||||
-- Source
|
||||
vim_item.menu = ({
|
||||
buffer = "[Buffer]",
|
||||
nvim_lsp = "[LSP]",
|
||||
luasnip = "[LuaSnip]",
|
||||
nvim_lua = "[Lua]",
|
||||
latex_symbols = "[LaTeX]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end
|
||||
},
|
||||
|
||||
mapping = {
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
|
||||
["<CR>"] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
},
|
||||
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif require("luasnip").expand_or_jumpable() then
|
||||
require("luasnip").expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif require("luasnip").jumpable(-1) then
|
||||
require("luasnip").jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
},
|
||||
}
|
|
@ -1,10 +1,30 @@
|
|||
vim.api.nvim_create_autocmd({ 'BufReadPost', 'BufNewFile', 'BufWritePost' }, {
|
||||
once = true,
|
||||
group = vim.api.nvim_create_augroup('DropBarSetup', {}),
|
||||
callback = function()
|
||||
if vim.g.loaded_dropbar then
|
||||
return
|
||||
end
|
||||
require('dropbar').setup()
|
||||
end,
|
||||
})
|
||||
local sources = require("dropbar.sources")
|
||||
|
||||
local function get_hl_color(group, attr)
|
||||
return vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID(group)), attr)
|
||||
end
|
||||
|
||||
vim.cmd [[hi WinBar guisp=#665c54 guibg=#313131]]
|
||||
vim.cmd [[hi WinBarNC guisp=#665c54 guibg=#313131]]
|
||||
|
||||
require("dropbar").setup(
|
||||
{
|
||||
bar = {
|
||||
sources = {
|
||||
{
|
||||
get_symbols = function(buf, win, cursor)
|
||||
local symbols = sources.path.get_symbols(buf, win, cursor)
|
||||
for _, symbol in ipairs(symbols) do
|
||||
local icon_fg = get_hl_color(symbol.icon_hl, "fg#")
|
||||
|
||||
local icon_string = ""
|
||||
|
||||
vim.cmd(icon_string)
|
||||
end
|
||||
return symbols
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,31 +1,49 @@
|
|||
require('gitsigns').setup {
|
||||
require("gitsigns").setup({
|
||||
signs = {
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '' },
|
||||
topdelete = { text = '' },
|
||||
changedelete = { text = '┃' },
|
||||
untracked = { text = ' ' },
|
||||
add = {
|
||||
text = " ┃",
|
||||
},
|
||||
change = {
|
||||
text = " ┃",
|
||||
},
|
||||
delete = {
|
||||
text = " ",
|
||||
},
|
||||
topdelete = {
|
||||
text = " ",
|
||||
},
|
||||
changedelete = {
|
||||
text = " ┃",
|
||||
},
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '' },
|
||||
topdelete = { text = '' },
|
||||
changedelete = { text = '┃' },
|
||||
untracked = { text = ' ' },
|
||||
add = {
|
||||
text = " ┃",
|
||||
},
|
||||
change = {
|
||||
text = " ┃",
|
||||
},
|
||||
delete = {
|
||||
text = " ",
|
||||
},
|
||||
topdelete = {
|
||||
text = " ",
|
||||
},
|
||||
changedelete = {
|
||||
text = " ┃",
|
||||
},
|
||||
},
|
||||
signcolumn = true,
|
||||
numhl = false,
|
||||
linehl = false,
|
||||
word_diff = false,
|
||||
watch_gitdir = {
|
||||
interval = 1000,
|
||||
follow_files = true,
|
||||
},
|
||||
attach_to_untracked = true,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
watch_gitdir = {
|
||||
interval = 1000,
|
||||
follow_files = true,
|
||||
},
|
||||
attach_to_untracked = true,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000,
|
||||
|
@ -37,12 +55,13 @@ require('gitsigns').setup {
|
|||
update_debounce = 200,
|
||||
max_file_length = 40000,
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
-- Options passed to nvim_open_win
|
||||
border = "rounded",
|
||||
style = "minimal",
|
||||
relative = "cursor",
|
||||
row = 0,
|
||||
vcol = 1,
|
||||
col = 1,
|
||||
},
|
||||
yadm = { enable = false },
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||
end
|
|
@ -30,7 +30,7 @@ navic.setup {
|
|||
TypeParameter = " ",
|
||||
},
|
||||
lsp = {
|
||||
auto_attach = true,
|
||||
auto_attach = false,
|
||||
preference = nil,
|
||||
},
|
||||
highlight = true,
|
||||
|
@ -44,4 +44,3 @@ navic.setup {
|
|||
return text
|
||||
end,
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
require("noice").setup({
|
||||
lsp = {
|
||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
||||
},
|
||||
},
|
||||
-- you can enable a preset for easier configuration
|
||||
presets = {
|
||||
bottom_search = true, -- use a classic bottom cmdline for search
|
||||
command_palette = true, -- position the cmdline and popupmenu together
|
||||
long_message_to_split = true, -- long messages will be sent to a split
|
||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||
},
|
||||
})
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
local navic = require("nvim-navic")
|
||||
|
||||
vim.g.rustaceanvim = {
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
navic.attach(client, bufnr)
|
||||
end,
|
||||
filetypes = {"rust"},
|
||||
settings = {
|
||||
-- rust-analyzer language server configuration
|
||||
['rust-analyzer'] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
require('winbar').setup({
|
||||
enabled = true,
|
||||
|
||||
show_file_path = true,
|
||||
show_symbols = true,
|
||||
|
||||
colors = {
|
||||
path = '', -- You can customize colors like #c946fd
|
||||
file_name = '',
|
||||
symbols = '',
|
||||
},
|
||||
|
||||
icons = {
|
||||
file_icon_default = '',
|
||||
seperator = ' ',
|
||||
editor_state = '●',
|
||||
lock_icon = '',
|
||||
},
|
||||
|
||||
exclude_filetype = {
|
||||
'help',
|
||||
'startify',
|
||||
'dashboard',
|
||||
'packer',
|
||||
'neo-tree',
|
||||
'neogitstatus',
|
||||
'NvimTree',
|
||||
'Trouble',
|
||||
'alpha',
|
||||
'lir',
|
||||
'Outline',
|
||||
'spectre_panel',
|
||||
'toggleterm',
|
||||
'qf',
|
||||
}
|
||||
})
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
{
|
||||
"LunarVim/breadcrumbs.nvim",
|
||||
'nvim-lua/popup.nvim',
|
||||
},
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
|
@ -29,6 +29,9 @@ return {
|
|||
{
|
||||
"SmiteshP/nvim-navic",
|
||||
},
|
||||
{
|
||||
'folke/noice.nvim',
|
||||
},
|
||||
{
|
||||
"kyazdani42/nvim-web-devicons"
|
||||
},
|
||||
|
@ -38,14 +41,24 @@ return {
|
|||
{
|
||||
'numToStr/Comment.nvim'
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
lazy = true,
|
||||
},
|
||||
{
|
||||
"folke/neodev.nvim", opts = {}
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
{
|
||||
"vague2k/huez.nvim",
|
||||
'fgheng/winbar.nvim'
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"Bekaboo/dropbar.nvim",
|
||||
},
|
||||
{
|
||||
"vague2k/huez.nvim",
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
|
@ -55,24 +68,6 @@ return {
|
|||
"mfussenegger/nvim-dap",
|
||||
event = "VeryLazy",
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
lazy = true,
|
||||
},
|
||||
{
|
||||
'Bekaboo/dropbar.nvim',
|
||||
-- optional, but required for fuzzy finder support
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = 'make'
|
||||
},
|
||||
config = function()
|
||||
local dropbar_api = require('dropbar.api')
|
||||
vim.keymap.set('n', '<Leader>;', dropbar_api.pick, { desc = 'Pick symbols in winbar' })
|
||||
vim.keymap.set('n', '[;', dropbar_api.goto_context_start, { desc = 'Go to start of current context' })
|
||||
vim.keymap.set('n', '];', dropbar_api.select_next_context, { desc = 'Select next context' })
|
||||
end
|
||||
},
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v2.x",
|
||||
|
@ -105,6 +100,9 @@ return {
|
|||
require("dapui").setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
|
|
Loading…
Reference in New Issue