update
This commit is contained in:
parent
47fcc61a05
commit
042c5d5aaf
2 changed files with 78 additions and 12 deletions
12
.session.vim
12
.session.vim
|
@ -13,11 +13,11 @@ if &shortmess =~ 'A'
|
||||||
else
|
else
|
||||||
set shortmess=aoO
|
set shortmess=aoO
|
||||||
endif
|
endif
|
||||||
badd +0 .gitignore
|
badd +305 init.lua
|
||||||
argglobal
|
argglobal
|
||||||
%argdel
|
%argdel
|
||||||
$argadd .gitignore
|
$argadd init.lua
|
||||||
edit .gitignore
|
edit init.lua
|
||||||
argglobal
|
argglobal
|
||||||
setlocal fdm=manual
|
setlocal fdm=manual
|
||||||
setlocal fde=0
|
setlocal fde=0
|
||||||
|
@ -29,12 +29,12 @@ setlocal fdn=20
|
||||||
setlocal fen
|
setlocal fen
|
||||||
silent! normal! zE
|
silent! normal! zE
|
||||||
let &fdl = &fdl
|
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
|
if s:l < 1 | let s:l = 1 | endif
|
||||||
keepjumps exe s:l
|
keepjumps exe s:l
|
||||||
normal! zt
|
normal! zt
|
||||||
keepjumps 4
|
keepjumps 339
|
||||||
normal! 0
|
normal! 010|
|
||||||
tabnext 1
|
tabnext 1
|
||||||
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
||||||
silent exe 'bwipe ' . s:wipebuf
|
silent exe 'bwipe ' . s:wipebuf
|
||||||
|
|
78
init.lua
78
init.lua
|
@ -258,7 +258,7 @@ vim.opt.rtp:prepend(lazypath)
|
||||||
require('lazy').setup({
|
require('lazy').setup({
|
||||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
||||||
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||||
{
|
--[[{
|
||||||
'andweeb/presence.nvim',
|
'andweeb/presence.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
require('presence').setup {
|
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)
|
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,
|
end,
|
||||||
},
|
},]]
|
||||||
|
|
||||||
-- NOTE: Plugins can also be added by using a table,
|
-- NOTE: Plugins can also be added by using a table,
|
||||||
-- with the first argument being the link and the following
|
-- with the first argument being the link and the following
|
||||||
-- keys can be used to configure plugin behavior/loading/etc.
|
-- keys can be used to configure plugin behavior/loading/etc.
|
||||||
--
|
--
|
||||||
-- Use `opts = {}` to force a plugin to be loaded.
|
-- 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
|
-- Here is a more advanced example where we pass configuration
|
||||||
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
|
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
|
||||||
-- require('gitsigns').setup({ ... })
|
-- require('gitsigns').setup({ ... })
|
||||||
|
@ -624,7 +684,6 @@ require('lazy').setup({
|
||||||
-- - settings (table): Override the default settings passed when initializing the server.
|
-- - 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/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
-- pyright = {},
|
-- pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
|
@ -704,14 +763,14 @@ require('lazy').setup({
|
||||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||||
-- have a well standardized coding style. You can add additional
|
-- have a well standardized coding style. You can add additional
|
||||||
-- languages here or re-enable it for the disabled ones.
|
-- languages here or re-enable it for the disabled ones.
|
||||||
local disable_filetypes = { c = true, cpp = true }
|
local disable_filetypes = { lua = true }
|
||||||
return {
|
return {
|
||||||
timeout_ms = 500,
|
timeout_ms = 500,
|
||||||
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylua' },
|
-- lua = { 'stylua' },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
-- 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()
|
load_session()
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
|
|
Loading…
Add table
Reference in a new issue