Compare commits
10 Commits
cf07a38ecf
...
079ea655e0
Author | SHA1 | Date | |
---|---|---|---|
doryan | 079ea655e0 | ||
doryan | 7b0855cb23 | ||
doryan | 5471764258 | ||
doryan | ef9e0a50b9 | ||
doryan | bb64365d25 | ||
doryan | ec99f601a0 | ||
doryan | dfd0917f9a | ||
doryan | f7a98dcb28 | ||
doryan | 90bafafb4c | ||
doryan | 660dcc4b1e |
17
init.lua
17
init.lua
|
@ -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")
|
||||
|
||||
|
@ -6,21 +14,20 @@ require("mappings")
|
|||
|
||||
require("config.plugins.acmp")
|
||||
require("config.plugins.autotag")
|
||||
require("config.plugins.autocommand")
|
||||
require("config.plugins.autocomplete")
|
||||
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.noice")
|
||||
require("toggleterm").setup()
|
||||
require("config.plugins.treesitter")
|
||||
require("config.plugins.neotree")
|
||||
require("config.plugins.nvimufo")
|
||||
require("config.plugins.prettier")
|
||||
require("config.plugins.winbar")
|
||||
require("config.plugins.rustaceanvim")
|
||||
require("huez").setup({})
|
||||
require("config.plugins.dropbar")
|
||||
|
|
|
@ -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
|
||||
}
|
||||
)
|
|
@ -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" },
|
||||
},
|
||||
}
|
|
@ -1,30 +1,10 @@
|
|||
local sources = require("dropbar.sources")
|
||||
|
||||
local function get_hl_color(group, attr)
|
||||
return vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID(group)), attr)
|
||||
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
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
require('dropbar').setup()
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -1,37 +1,19 @@
|
|||
require("gitsigns").setup({
|
||||
require('gitsigns').setup {
|
||||
signs = {
|
||||
add = {
|
||||
text = " ┃",
|
||||
},
|
||||
change = {
|
||||
text = " ┃",
|
||||
},
|
||||
delete = {
|
||||
text = " ",
|
||||
},
|
||||
topdelete = {
|
||||
text = " ",
|
||||
},
|
||||
changedelete = {
|
||||
text = " ┃",
|
||||
},
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '' },
|
||||
topdelete = { text = '' },
|
||||
changedelete = { text = '┃' },
|
||||
untracked = { text = ' ' },
|
||||
},
|
||||
signs_staged = {
|
||||
add = {
|
||||
text = " ┃",
|
||||
},
|
||||
change = {
|
||||
text = " ┃",
|
||||
},
|
||||
delete = {
|
||||
text = " ",
|
||||
},
|
||||
topdelete = {
|
||||
text = " ",
|
||||
},
|
||||
changedelete = {
|
||||
text = " ┃",
|
||||
},
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '' },
|
||||
topdelete = { text = '' },
|
||||
changedelete = { text = '┃' },
|
||||
untracked = { text = ' ' },
|
||||
},
|
||||
signcolumn = true,
|
||||
numhl = false,
|
||||
|
@ -60,8 +42,7 @@ require("gitsigns").setup({
|
|||
style = "minimal",
|
||||
relative = "cursor",
|
||||
row = 0,
|
||||
col = 1,
|
||||
vcol = 1,
|
||||
},
|
||||
yadm = { enable = false },
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
|
@ -30,7 +30,7 @@ navic.setup {
|
|||
TypeParameter = " ",
|
||||
},
|
||||
lsp = {
|
||||
auto_attach = false,
|
||||
auto_attach = true,
|
||||
preference = nil,
|
||||
},
|
||||
highlight = true,
|
||||
|
@ -44,3 +44,4 @@ navic.setup {
|
|||
return text
|
||||
end,
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
},
|
||||
})
|
||||
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -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',
|
||||
}
|
||||
})
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
{
|
||||
'nvim-lua/popup.nvim',
|
||||
"LunarVim/breadcrumbs.nvim",
|
||||
},
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
|
@ -29,9 +29,6 @@ return {
|
|||
{
|
||||
"SmiteshP/nvim-navic",
|
||||
},
|
||||
{
|
||||
'folke/noice.nvim',
|
||||
},
|
||||
{
|
||||
"kyazdani42/nvim-web-devicons"
|
||||
},
|
||||
|
@ -41,25 +38,15 @@ return {
|
|||
{
|
||||
'numToStr/Comment.nvim'
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
lazy = true,
|
||||
},
|
||||
{
|
||||
"folke/neodev.nvim", opts = {}
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
{
|
||||
'fgheng/winbar.nvim'
|
||||
},
|
||||
{
|
||||
"Bekaboo/dropbar.nvim",
|
||||
},
|
||||
{
|
||||
"vague2k/huez.nvim",
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = { "williamboman/mason-lspconfig.nvim", },
|
||||
|
@ -68,6 +55,24 @@ 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",
|
||||
|
@ -100,9 +105,6 @@ return {
|
|||
require("dapui").setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
|
|
Loading…
Reference in New Issue