This commit is contained in:
sam 2024-10-21 23:49:35 +13:00
parent 47fcc61a05
commit 042c5d5aaf
2 changed files with 78 additions and 12 deletions

View file

@ -13,11 +13,11 @@ if &shortmess =~ 'A'
else
set shortmess=aoO
endif
badd +0 .gitignore
badd +305 init.lua
argglobal
%argdel
$argadd .gitignore
edit .gitignore
$argadd init.lua
edit init.lua
argglobal
setlocal fdm=manual
setlocal fde=0
@ -29,12 +29,12 @@ setlocal fdn=20
setlocal fen
silent! normal! zE
let &fdl = &fdl
let s:l = 4 - ((3 * winheight(0) + 11) / 22)
let s:l = 339 - ((20 * winheight(0) + 15) / 31)
if s:l < 1 | let s:l = 1 | endif
keepjumps exe s:l
normal! zt
keepjumps 4
normal! 0
keepjumps 339
normal! 010|
tabnext 1
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
silent exe 'bwipe ' . s:wipebuf

View file

@ -258,7 +258,7 @@ vim.opt.rtp:prepend(lazypath)
require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
{
--[[{
'andweeb/presence.nvim',
config = function()
require('presence').setup {
@ -283,14 +283,74 @@ require('lazy').setup({
line_number_text = 'Line %s out of %s', -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
}
end,
},
},]]
-- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following
-- keys can be used to configure plugin behavior/loading/etc.
--
-- Use `opts = {}` to force a plugin to be loaded.
--
{
'vyfor/cord.nvim',
config = function()
require('cord').setup {
usercmds = true, -- Enable user commands
log_level = 'error', -- One of 'trace', 'debug', 'info', 'warn', 'error', 'off'
timer = {
interval = 1500, -- Interval between presence updates in milliseconds (min 500)
reset_on_idle = false, -- Reset start timestamp on idle
reset_on_change = false, -- Reset start timestamp on presence change
},
editor = {
image = nil, -- Image ID or URL in case a custom client id is provided
client = 'neovim', -- vim, neovim, lunarvim, nvchad, astronvim or your application's client id
tooltip = 'Neovim', -- Text to display when hovering over the editor's image
},
display = {
show_time = true, -- Display start timestamp
show_repository = true, -- Display 'View repository' button linked to repository url, if any
show_cursor_position = false, -- Display line and column number of cursor's position
swap_fields = false, -- If enabled, workspace is displayed first
swap_icons = false, -- If enabled, editor is displayed on the main image
workspace_blacklist = {}, -- List of workspace names that will hide rich presence
},
lsp = {
show_problem_count = false, -- Display number of diagnostics problems
severity = 1, -- 1 = Error, 2 = Warning, 3 = Info, 4 = Hint
scope = 'workspace', -- buffer or workspace
},
idle = {
enable = true, -- Enable idle status
show_status = true, -- Display idle status, disable to hide the rich presence on idle
timeout = 300000, -- Timeout in milliseconds after which the idle status is set, 0 to display immediately
disable_on_focus = false, -- Do not display idle status when neovim is focused
text = 'Idle', -- Text to display when idle
tooltip = '💤', -- Text to display when hovering over the idle image
},
text = {
viewing = 'Viewing {}', -- Text to display when viewing a readonly file
editing = 'Editing {}', -- Text to display when editing a file
file_browser = 'Browsing files in {}', -- Text to display when browsing files (Empty string to disable)
plugin_manager = 'Managing plugins in {}', -- Text to display when managing plugins (Empty string to disable)
lsp_manager = 'Configuring LSP in {}', -- Text to display when managing LSP servers (Empty string to disable)
vcs = 'Committing changes in {}', -- Text to display when using Git or Git-related plugin (Empty string to disable)
workspace = 'In {}', -- Text to display when in a workspace (Empty string to disable)
},
buttons = {
{
label = 'View Repository', -- Text displayed on the button
url = 'git', -- URL where the button leads to ('git' = automatically fetch Git repository URL)
},
-- {
-- label = 'View Plugin',
-- url = 'https://github.com/vyfor/cord.nvim',
-- }
},
assets = nil,
}
end,
},
-- Here is a more advanced example where we pass configuration
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
-- require('gitsigns').setup({ ... })
@ -624,7 +684,6 @@ require('lazy').setup({
-- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
-- rust_analyzer = {},
@ -704,14 +763,14 @@ require('lazy').setup({
-- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true }
local disable_filetypes = { lua = true }
return {
timeout_ms = 500,
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
}
end,
formatters_by_ft = {
lua = { 'stylua' },
-- lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
@ -952,6 +1011,13 @@ require('lazy').setup({
},
})
require('lspconfig')['clangd'].setup {
cmd = { '/usr/bin/clangd' },
flags = {
debounce_text_changes = 150,
},
}
load_session()
-- The line beneath this is called `modeline`. See `:help modeline`