Compare commits

...

10 Commits

11 changed files with 188 additions and 167 deletions

View File

@ -1,4 +1,12 @@
vim.cmd("set number") 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
require("config.lazy") require("config.lazy")
@ -6,21 +14,20 @@ require("mappings")
require("config.plugins.acmp") require("config.plugins.acmp")
require("config.plugins.autotag") require("config.plugins.autotag")
require("config.plugins.autocommand") require("config.plugins.autocomplete")
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.winbar") require("config.plugins.rustaceanvim")
require("huez").setup({}) require("huez").setup({})
require("config.plugins.dropbar")

View File

@ -1,13 +0,0 @@
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

@ -0,0 +1,95 @@
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,30 +1,10 @@
local sources = require("dropbar.sources") vim.api.nvim_create_autocmd({ 'BufReadPost', 'BufNewFile', 'BufWritePost' }, {
once = true,
local function get_hl_color(group, attr) group = vim.api.nvim_create_augroup('DropBarSetup', {}),
return vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID(group)), attr) callback = function()
if vim.g.loaded_dropbar then
return
end end
require('dropbar').setup()
vim.cmd [[hi WinBar guisp=#665c54 guibg=#313131]] end,
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,37 +1,19 @@
require("gitsigns").setup({ require('gitsigns').setup {
signs = { signs = {
add = { add = { text = '' },
text = "", change = { text = '' },
}, delete = { text = '' },
change = { topdelete = { text = '' },
text = "", changedelete = { text = '' },
}, untracked = { text = ' ' },
delete = {
text = "",
},
topdelete = {
text = "",
},
changedelete = {
text = "",
},
}, },
signs_staged = { signs_staged = {
add = { add = { text = '' },
text = "", change = { text = '' },
}, delete = { text = '' },
change = { topdelete = { text = '' },
text = "", changedelete = { text = '' },
}, untracked = { text = ' ' },
delete = {
text = "",
},
topdelete = {
text = "",
},
changedelete = {
text = "",
},
}, },
signcolumn = true, signcolumn = true,
numhl = false, numhl = false,
@ -60,8 +42,7 @@ require("gitsigns").setup({
style = "minimal", style = "minimal",
relative = "cursor", relative = "cursor",
row = 0, row = 0,
col = 1, vcol = 1,
}, },
yadm = { enable = false }, yadm = { enable = false },
}) }

View File

@ -0,0 +1,5 @@
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 = false, auto_attach = true,
preference = nil, preference = nil,
}, },
highlight = true, highlight = true,
@ -44,3 +44,4 @@ navic.setup {
return text return text
end, end,
} }

View File

@ -1,19 +0,0 @@
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

@ -0,0 +1,18 @@
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

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