more stuff too lazy to seperate
This commit is contained in:
@ -1,2 +1 @@
|
||||
vim.cmd('set spell!')
|
||||
vim.cmd('startinsert | 1')
|
||||
|
@ -1,4 +1,4 @@
|
||||
-- IMPORTANT: Make sure you're $JAVA_HOME is correct (prob should be 17 or higher)
|
||||
-- NOTE: Make sure you're $JAVA_HOME is correct (prob should be 17 or higher)
|
||||
local java_cmds = vim.api.nvim_create_augroup('java_cmds', {clear = true})
|
||||
local cache_vars = {}
|
||||
|
||||
@ -16,7 +16,7 @@ local features = {
|
||||
|
||||
-- change this to `true` if you have `nvim-dap`,
|
||||
-- `java-test` and `java-debug-adapter` installed
|
||||
debugger = false,
|
||||
debugger = true,
|
||||
}
|
||||
|
||||
local function get_jdtls_paths()
|
||||
|
@ -12,6 +12,5 @@ actions.setup {
|
||||
preview = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||
},
|
||||
layout_strategy = 'cursor',
|
||||
winblend = 10,
|
||||
}
|
||||
}
|
||||
|
@ -3,34 +3,6 @@ if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local lspicons = {
|
||||
Text = 'Tx',
|
||||
Snippet = '<>',
|
||||
Method = '{}',
|
||||
Function = '{}',
|
||||
Constructor = '{}',
|
||||
Field = '""',
|
||||
Variable = 'i=',
|
||||
Class = '{}',
|
||||
Interface = '.h',
|
||||
Module = '{}',
|
||||
Property = '@p',
|
||||
Unit = ' ',
|
||||
Value = 'x=',
|
||||
Enum = 'E#',
|
||||
Keyword = '$1',
|
||||
Color = ' ',
|
||||
File = '#`',
|
||||
Reference = ' ',
|
||||
Folder = '[/',
|
||||
EnumMember = ' ',
|
||||
Constant = 'c=',
|
||||
Struct = ' ',
|
||||
Event = ' ',
|
||||
Operator = '%*',
|
||||
TypeParameter = ' ',
|
||||
}
|
||||
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(a.nvim_win_get_cursor(0))
|
||||
@ -38,11 +10,9 @@ local has_words_before = function()
|
||||
[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
-- insert '(' after completing a function
|
||||
cmp.event:on(
|
||||
'confirm_done',
|
||||
require('nvim-autopairs.completion.cmp').on_confirm_done()
|
||||
)
|
||||
-- insert '()' after completing a function
|
||||
cmp.event:on('confirm_done',
|
||||
require('nvim-autopairs.completion.cmp').on_confirm_done())
|
||||
|
||||
local luasnip = require('luasnip')
|
||||
local neogen = require('neogen')
|
||||
@ -57,7 +27,7 @@ cmp.setup {
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp', keyword_length = 3 },
|
||||
{ name = 'luasnip', keyword_length = 3 },
|
||||
{ name = 'luasnip_choice' },
|
||||
{ name = 'async_path' },
|
||||
{ name = 'buffer', keyword_length = 3, max_item_count = 7 },
|
||||
{ name = 'calc' },
|
||||
@ -80,12 +50,17 @@ cmp.setup {
|
||||
-- mappings -----------------------------------------------------------------
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
if #cmp.get_entries() == 1 then
|
||||
cmp.confirm({ select = true })
|
||||
elseif cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
if #cmp.get_entries() == 1 then
|
||||
cmp.confirm({ select = true })
|
||||
end
|
||||
elseif neogen.jumpable() then
|
||||
neogen.jump_next()
|
||||
else
|
||||
@ -103,7 +78,7 @@ cmp.setup {
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
['<CR>'] = cmp.mapping({
|
||||
['<CR>'] = cmp.mapping {
|
||||
i = function(fallback)
|
||||
if cmp.visible() and cmp.get_active_entry() then
|
||||
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
|
||||
@ -112,9 +87,13 @@ cmp.setup {
|
||||
end
|
||||
end,
|
||||
s = cmp.mapping.confirm({ select = true }),
|
||||
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||
}),
|
||||
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true }),
|
||||
},
|
||||
["<C-u>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(4),
|
||||
['<ESC>'] = cmp.mapping.close(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
}),
|
||||
|
||||
sorting = {
|
||||
@ -122,12 +101,12 @@ cmp.setup {
|
||||
cmp.config.compare.offset,
|
||||
cmp.config.compare.exact,
|
||||
cmp.config.compare.score,
|
||||
require "cmp-under-comparator".under,
|
||||
require("cmp-under-comparator").under,
|
||||
cmp.config.compare.kind,
|
||||
cmp.config.compare.sort_text,
|
||||
cmp.config.compare.length,
|
||||
cmp.config.compare.order,
|
||||
},
|
||||
}
|
||||
},
|
||||
enabled = function()
|
||||
local context = require 'cmp.config.context'
|
||||
@ -135,7 +114,7 @@ cmp.setup {
|
||||
return true
|
||||
else
|
||||
return not context.in_treesitter_capture("comment")
|
||||
and not context.in_syntax_group("Comment")
|
||||
and not context.in_syntax_group("Comment")
|
||||
end
|
||||
end
|
||||
}
|
||||
|
16
after/plugin/dressing.lua
Normal file
16
after/plugin/dressing.lua
Normal file
@ -0,0 +1,16 @@
|
||||
local status_ok, dressing = pcall(require, "dressing")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
dressing.setup {
|
||||
input = {
|
||||
enabled = true,
|
||||
title_pos = "center",
|
||||
border = 'single',
|
||||
relative = "win"
|
||||
},
|
||||
select = {
|
||||
enabled = true,
|
||||
}
|
||||
}
|
@ -3,7 +3,6 @@ if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local actions = glance.actions
|
||||
glance.setup {
|
||||
detached = function(winid)
|
||||
return vim.api.nvim_win_get_width(winid) < 100
|
||||
|
17
after/plugin/headlines.lua
Normal file
17
after/plugin/headlines.lua
Normal file
@ -0,0 +1,17 @@
|
||||
local status_ok, headlines = pcall(require, "headlines")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
headlines.setup {
|
||||
norg = {
|
||||
headline_highlights = {
|
||||
"@neorg.headings.1.title",
|
||||
"@neorg.headings.2.title",
|
||||
"@neorg.headings.3.title",
|
||||
"@neorg.headings.4.title",
|
||||
"@neorg.headings.5.title",
|
||||
"@neorg.headings.6.title"
|
||||
},
|
||||
},
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
local status_ok, hypersonic = pcall(require, "hypersonic")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
hypersonic.setup {
|
||||
border = 'shadow'
|
||||
}
|
@ -4,7 +4,12 @@ if not status_ok then
|
||||
end
|
||||
|
||||
ibl.setup {
|
||||
indent = {
|
||||
char = '▏',
|
||||
},
|
||||
scope = {
|
||||
enabled = false,
|
||||
enabled = true,
|
||||
show_start = false,
|
||||
show_end = false
|
||||
},
|
||||
}
|
||||
|
6
after/plugin/luasnip-choice.lua
Normal file
6
after/plugin/luasnip-choice.lua
Normal file
@ -0,0 +1,6 @@
|
||||
local status_ok, lschoice = pcall(require, "cmp_luasnip_choice")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
lschoice.setup {}
|
@ -17,16 +17,16 @@ notify.setup {
|
||||
max_height = function() return math.floor(vim.o.lines * 0.75) end,
|
||||
max_width = function() return math.floor(vim.o.columns * 0.5) end,
|
||||
on_open = function(win, record)
|
||||
if record.title[1] == '' then record.title[1] = 'Unkown' end
|
||||
vim.api.nvim_win_set_config(win, {
|
||||
title = {
|
||||
{ " "..record.title[1].." ", "Notify"..record.level.."Title" },
|
||||
{ ' '..record.title[1]..' ', 'Notify'..record.level..'Title' }
|
||||
},
|
||||
title_pos = "center",
|
||||
border = "single",
|
||||
title_pos = 'center',
|
||||
border = 'single'
|
||||
})
|
||||
end,
|
||||
render = function(bufnr, notif)
|
||||
notif.message[1] = string.format("%s", notif.message[1])
|
||||
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, notif.message)
|
||||
end,
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ alpha.setup {
|
||||
button('f', '? Find files', '<cmd>Telescope find_files<CR>'),
|
||||
button('r', '↺ Recent files', '<cmd>Telescope oldfiles <CR>'),
|
||||
button('n', '▣ Neorg workspace', '<cmd>Telescope neorg switch_workspace<CR>'),
|
||||
button('m', '≡ Menu', '<cmd>ConfigMenu<CR>'),
|
||||
button('m', '≡ Menu', '<cmd>lua require("core.conf").configmenu()<CR>'),
|
||||
button('q', '✖ Quit', '<cmd>wqa<CR>'),
|
||||
} },
|
||||
{ type = 'text', val = footer, opts = {
|
||||
|
@ -7,13 +7,13 @@ el.reset_windows()
|
||||
|
||||
local builtin = require("el.builtin")
|
||||
local sections = require("el.sections")
|
||||
local c = require "components"
|
||||
local c = require("core.statusbar.components")
|
||||
|
||||
local function hl(fg, b)
|
||||
b = b or false
|
||||
return c.extract_hl({
|
||||
bg = {["StatusLine"] = "bg"},
|
||||
fg = {[fg] = "fg"},
|
||||
bg = { ["StatusLine"] = "bg" },
|
||||
fg = { [fg] = "fg" },
|
||||
bold = b,
|
||||
})
|
||||
end
|
||||
|
11
after/plugin/tabline.lua
Normal file
11
after/plugin/tabline.lua
Normal file
@ -0,0 +1,11 @@
|
||||
local status_ok, tabline = pcall(require, "tar")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
tabline.setup {
|
||||
layout = {
|
||||
{ type = 'taglist' },
|
||||
},
|
||||
seperator = '|',
|
||||
}
|
@ -9,16 +9,28 @@ local function telescopew()
|
||||
if vim.o.columns <= 80 then
|
||||
return vim.o.columns
|
||||
else
|
||||
return 80
|
||||
return 0.8
|
||||
end
|
||||
end
|
||||
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
borderchars = {
|
||||
prompt = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||
results = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||
preview = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||
prompt = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
|
||||
results = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
|
||||
preview = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
|
||||
},
|
||||
winblend = 0,
|
||||
layout_strategy = 'horizontal',
|
||||
sorting_strategy = 'descending',
|
||||
scroll_strategy = 'limit',
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
width = telescopew(),
|
||||
height = 20,
|
||||
prompt_position = 'bottom',
|
||||
anchor = 'N',
|
||||
}
|
||||
},
|
||||
preview = {
|
||||
-- add image previews via chafa
|
||||
@ -30,7 +42,7 @@ telescope.setup {
|
||||
'jpe',
|
||||
'jpeg',
|
||||
'webp',
|
||||
'gif',
|
||||
'gif'
|
||||
}
|
||||
local split_path = vim.split(filepath:lower(), '.', { plain=true })
|
||||
local extension = split_path[#split_path]
|
||||
@ -38,39 +50,22 @@ telescope.setup {
|
||||
end
|
||||
if is_image(filepath) then
|
||||
local term = vim.api.nvim_open_term(bufnr, {})
|
||||
local function send_output(_, data, _ )
|
||||
local function send_output(_, data, _)
|
||||
for _, d in ipairs(data) do
|
||||
vim.api.nvim_chan_send(term, d..'\r\n')
|
||||
end
|
||||
end
|
||||
vim.fn.jobstart({
|
||||
'chafa',
|
||||
'-C',
|
||||
'on',
|
||||
'--animate',
|
||||
'off',
|
||||
'-s',
|
||||
(telescopew() - 10)..'x25',
|
||||
'--clear',
|
||||
filepath
|
||||
'chafa', '-C', 'on', '--animate', 'off', '-s',
|
||||
(telescopew() - 10)..'x20', '--clear', filepath
|
||||
}, { on_stdout = send_output, stdout_buffered = true, pty = true })
|
||||
a.nvim_set_option_value("number", false, {buf = bufnr})
|
||||
a.nvim_set_option_value("number", false, { buf = bufnr })
|
||||
else
|
||||
require("telescope.previewers.utils").set_preview_message(bufnr, opts.winid, "File cannot be previewed")
|
||||
require("telescope.previewers.utils").set_preview_message(bufnr,
|
||||
opts.winid, "File cannot be previewed")
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
winblend = 0,
|
||||
-- 'horizontal', 'vertical', 'bottom_pane', or 'cursor'
|
||||
layout_strategy = 'vertical',
|
||||
sorting_strategy = 'ascending',
|
||||
layout_config = {
|
||||
vertical = {
|
||||
width = telescopew(),
|
||||
prompt_position = "top",
|
||||
}
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
["<esc>"] = actions.close,
|
||||
@ -90,8 +85,8 @@ telescope.setup {
|
||||
}
|
||||
}
|
||||
telescope.load_extension('file_browser')
|
||||
telescope.load_extension('ui-select')
|
||||
telescope.load_extension('projects')
|
||||
telescope.load_extension('fzf')
|
||||
|
||||
a.nvim_create_autocmd('User', {
|
||||
pattern = 'TelescopePreviewerLoaded',
|
||||
|
Reference in New Issue
Block a user