Compare commits

..

No commits in common. "079ea655e0a63e63ae4b354652a4c52e224fd388" and "cf07a38ecf5bced97ae626fb4599c36805e2136e" have entirely different histories.

11 changed files with 166 additions and 187 deletions

View File

@ -1,12 +1,4 @@
local vanila_vim_autostart_commands = { vim.cmd("set number")
"set number",
"set clipboard=unnamedplus",
"set nowrap"
}
for _, cmd in pairs(vanila_vim_autostart_commands) do
vim.cmd(cmd)
end
require("config.lazy") require("config.lazy")
@ -14,20 +6,21 @@ require("mappings")
require("config.plugins.acmp") require("config.plugins.acmp")
require("config.plugins.autotag") require("config.plugins.autotag")
require("config.plugins.autocomplete") require("config.plugins.autocommand")
require("config.plugins.bufferline") require("config.plugins.bufferline")
require("config.plugins.colorizer") require("config.plugins.colorizer")
require("config.plugins.comment") require("config.plugins.comment")
require("config.plugins.dap") require("config.plugins.dap")
require("config.plugins.dropbar")
require("config.plugins.gitsigns") require("config.plugins.gitsigns")
require("ibl").setup() require("ibl").setup()
require("config.plugins.lualine") require("config.plugins.lualine")
require("config.plugins.navic") require("config.plugins.navic")
require("config.plugins.noice")
require("toggleterm").setup() require("toggleterm").setup()
require("config.plugins.treesitter") require("config.plugins.treesitter")
require("config.plugins.neotree") require("config.plugins.neotree")
require("config.plugins.nvimufo") require("config.plugins.nvimufo")
require("config.plugins.prettier") require("config.plugins.prettier")
require("config.plugins.rustaceanvim") require("config.plugins.winbar")
require("huez").setup({}) require("huez").setup({})
require("config.plugins.dropbar")

View File

@ -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
}
)

View File

@ -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" },
},
}

View File

@ -1,10 +1,30 @@
vim.api.nvim_create_autocmd({ 'BufReadPost', 'BufNewFile', 'BufWritePost' }, { local sources = require("dropbar.sources")
once = true,
group = vim.api.nvim_create_augroup('DropBarSetup', {}), local function get_hl_color(group, attr)
callback = function() return vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID(group)), attr)
if vim.g.loaded_dropbar then
return
end end
require('dropbar').setup()
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
}
}
}
}
)

View File

@ -1,19 +1,37 @@
require('gitsigns').setup { require("gitsigns").setup({
signs = { signs = {
add = { text = '' }, add = {
change = { text = '' }, text = "",
delete = { text = '' }, },
topdelete = { text = '' }, change = {
changedelete = { text = '' }, text = "",
untracked = { text = ' ' }, },
delete = {
text = "",
},
topdelete = {
text = "",
},
changedelete = {
text = "",
},
}, },
signs_staged = { signs_staged = {
add = { text = '' }, add = {
change = { text = '' }, text = "",
delete = { text = '' }, },
topdelete = { text = '' }, change = {
changedelete = { text = '' }, text = "",
untracked = { text = ' ' }, },
delete = {
text = "",
},
topdelete = {
text = "",
},
changedelete = {
text = "",
},
}, },
signcolumn = true, signcolumn = true,
numhl = false, numhl = false,
@ -42,7 +60,8 @@ require('gitsigns').setup {
style = "minimal", style = "minimal",
relative = "cursor", relative = "cursor",
row = 0, row = 0,
vcol = 1, col = 1,
}, },
yadm = { enable = false }, yadm = { enable = false },
} })

View File

@ -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

View File

@ -30,7 +30,7 @@ navic.setup {
TypeParameter = "󰊄 ", TypeParameter = "󰊄 ",
}, },
lsp = { lsp = {
auto_attach = true, auto_attach = false,
preference = nil, preference = nil,
}, },
highlight = true, highlight = true,
@ -44,4 +44,3 @@ navic.setup {
return text return text
end, end,
} }

View File

@ -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
},
})

View File

@ -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,
},
},
},
},
}

View File

@ -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',
}
})

View File

@ -1,6 +1,6 @@
return { return {
{ {
"LunarVim/breadcrumbs.nvim", 'nvim-lua/popup.nvim',
}, },
{ {
"akinsho/bufferline.nvim", "akinsho/bufferline.nvim",
@ -29,6 +29,9 @@ return {
{ {
"SmiteshP/nvim-navic", "SmiteshP/nvim-navic",
}, },
{
'folke/noice.nvim',
},
{ {
"kyazdani42/nvim-web-devicons" "kyazdani42/nvim-web-devicons"
}, },
@ -38,14 +41,24 @@ return {
{ {
'numToStr/Comment.nvim' 'numToStr/Comment.nvim'
}, },
{
"L3MON4D3/LuaSnip",
lazy = true,
},
{
"folke/neodev.nvim", opts = {}
},
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
}, },
{ {
"vague2k/huez.nvim", 'fgheng/winbar.nvim'
}, },
{ {
"nvim-telescope/telescope.nvim", "Bekaboo/dropbar.nvim",
},
{
"vague2k/huez.nvim",
}, },
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
@ -55,24 +68,6 @@ return {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
event = "VeryLazy", 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", "nvim-neo-tree/neo-tree.nvim",
branch = "v2.x", branch = "v2.x",
@ -105,6 +100,9 @@ return {
require("dapui").setup() require("dapui").setup()
end end
}, },
{
"nvim-telescope/telescope.nvim",
},
{ {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
event = "InsertEnter", event = "InsertEnter",