Neovim migration to nightly
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
machines/desktop/config/aichat/config.yaml
|
||||
machines/desktop/config/nvim/nvim-pack-lock.json
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[main]
|
||||
font=Hack Nerd Font:size=10
|
||||
|
||||
[colors]
|
||||
[colors-dark]
|
||||
background=101010
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
606
machines/desktop/config/nvim/init.lua.bak
Normal file
606
machines/desktop/config/nvim/init.lua.bak
Normal file
@@ -0,0 +1,606 @@
|
||||
-- Leaders / globals
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- Options
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.laststatus = 2
|
||||
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.breakindent = true
|
||||
|
||||
vim.opt.undofile = true
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.confirm = true
|
||||
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
|
||||
|
||||
-- Keymaps
|
||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR><Esc>", { desc = "Clear search highlight" })
|
||||
|
||||
vim.keymap.set("n", "j", "gj", { silent = true })
|
||||
vim.keymap.set("n", "k", "gk", { silent = true })
|
||||
vim.keymap.set("v", "<", "<gv")
|
||||
vim.keymap.set("v", ">", ">gv")
|
||||
|
||||
vim.keymap.set("n", "<C-s>", function()
|
||||
vim.lsp.buf.format({ timeout_ms = 2000 })
|
||||
vim.cmd("w")
|
||||
end, { desc = "Format + Write" })
|
||||
|
||||
vim.keymap.set("i", "<C-s>", function()
|
||||
vim.cmd("stopinsert")
|
||||
vim.lsp.buf.format({ timeout_ms = 2000 })
|
||||
vim.cmd("w")
|
||||
end, { desc = "Format + Write" })
|
||||
|
||||
vim.keymap.set("n", "<C-h>", "<C-w>h", { desc = "Window left" })
|
||||
vim.keymap.set("n", "<C-j>", "<C-w>j", { desc = "Window down" })
|
||||
vim.keymap.set("n", "<C-k>", "<C-w>k", { desc = "Window up" })
|
||||
vim.keymap.set("n", "<C-l>", "<C-w>l", { desc = "Window right" })
|
||||
|
||||
vim.keymap.set("t", "<C-h>", [[<C-\><C-n><C-w>h]], { desc = "Terminal window left" })
|
||||
vim.keymap.set("t", "<C-j>", [[<C-\><C-n><C-w>j]], { desc = "Terminal window down" })
|
||||
vim.keymap.set("t", "<C-k>", [[<C-\><C-n><C-w>k]], { desc = "Terminal window up" })
|
||||
vim.keymap.set("t", "<C-l>", [[<C-\><C-n><C-w>l]], { desc = "Terminal window right" })
|
||||
|
||||
vim.keymap.set("n", "<leader>bb", "<cmd>buffers<CR>", { desc = "List buffers" })
|
||||
vim.keymap.set("n", "<leader>bl", "<cmd>b#<CR>", { desc = "Last buffer" })
|
||||
vim.keymap.set("n", "<leader>bd", "<cmd>bdelete<CR>", { desc = "Delete buffer" })
|
||||
vim.keymap.set("n", "<leader>bD", "<cmd>bdelete!<CR>", { desc = "Force delete buffer" })
|
||||
vim.keymap.set("n", "<leader>bw", "<cmd>bwipeout<CR>", { desc = "Wipe buffer" })
|
||||
vim.keymap.set("n", "<leader>bo", "<cmd>%bdelete|edit#|bdelete#<CR>", { desc = "Delete other buffers" })
|
||||
vim.keymap.set("n", "<leader>ba", "<cmd>%bdelete<CR>", { desc = "Delete all buffers" })
|
||||
|
||||
vim.keymap.set('n', 'H', ':bprevious<CR>', { silent = true })
|
||||
vim.keymap.set('n', 'L', ':bnext<CR>', { silent = true })
|
||||
|
||||
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>', { noremap = true, silent = true })
|
||||
|
||||
|
||||
-- lazy.nvim bootstrap
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Plugins
|
||||
require("lazy").setup({
|
||||
-- Themes
|
||||
{
|
||||
"vague-theme/vague.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.cmd("colorscheme koda")
|
||||
end,
|
||||
},
|
||||
{ "rebelot/kanagawa.nvim" },
|
||||
{ "nendix/zen.nvim"},
|
||||
{ "oskarnurm/koda.nvim" },
|
||||
{ "datsfilipe/vesper.nvim" },
|
||||
{ "metalelf0/base16-black-metal-scheme" },
|
||||
|
||||
-- LSP / Completion
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
version = "1.*",
|
||||
opts = {
|
||||
keymap = {
|
||||
preset = "none",
|
||||
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
|
||||
["<C-e>"] = { "hide" },
|
||||
|
||||
["<C-up>"] = { "scroll_documentation_up" },
|
||||
["<C-down>"] = { "scroll_documentation_down" },
|
||||
|
||||
["<CR>"] = { "accept", "fallback" },
|
||||
|
||||
["<Tab>"] = { "snippet_forward", "fallback" },
|
||||
["<S-Tab>"] = { "snippet_backward", "fallback" },
|
||||
|
||||
["<C-n>"] = { "select_next", "fallback" },
|
||||
["<C-p>"] = { "select_prev", "fallback" },
|
||||
|
||||
},
|
||||
completion = {
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
},
|
||||
list = {
|
||||
selection = {
|
||||
auto_insert = false,
|
||||
preselect = true
|
||||
}
|
||||
}
|
||||
},
|
||||
sources = {
|
||||
default = { "lsp", "path", "buffer", "snippets" },
|
||||
},
|
||||
snippets = {
|
||||
preset = "luasnip",
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
version = "v2.*",
|
||||
build = "make install_jsregexp",
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
config = function()
|
||||
local luasnip = require("luasnip")
|
||||
luasnip.config.setup({
|
||||
history = true,
|
||||
update_events = { "TextChanged", "TextChangedI" },
|
||||
region_check_events = { "CursorMoved", "CursorHold", "InsertEnter" },
|
||||
delete_check_events = { "TextChanged", "InsertLeave" },
|
||||
enable_autosnippets = true,
|
||||
store_selection_keys = "<Tab>",
|
||||
})
|
||||
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
end,
|
||||
},
|
||||
{
|
||||
"lervag/vimtex",
|
||||
lazy = false,
|
||||
init = function()
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
vim.g.vimtex_quickfix_mode = 0
|
||||
end
|
||||
},
|
||||
{
|
||||
"iurimateus/luasnip-latex-snippets.nvim",
|
||||
dependencies = { "L3MON4D3/LuaSnip", "lervag/vimtex" },
|
||||
config = function()
|
||||
require('luasnip-latex-snippets').setup({
|
||||
use_treesitter = true
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"chomosuke/typst-preview.nvim",
|
||||
lazy = false,
|
||||
version = "1.*",
|
||||
opts = {}
|
||||
},
|
||||
{
|
||||
"selimacerbas/markdown-preview.nvim",
|
||||
dependencies = { "selimacerbas/live-server.nvim" },
|
||||
config = function()
|
||||
require("markdown_preview").setup({
|
||||
port = 8421,
|
||||
open_browser = false,
|
||||
debounce_ms = 0,
|
||||
mermaid_renderer = "rust"
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
|
||||
---@module 'render-markdown'
|
||||
---@type render.md.UserConfig
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"NickvanDyke/opencode.nvim",
|
||||
config = function()
|
||||
vim.g.opencode_opts = {}
|
||||
vim.o.autoread = true
|
||||
|
||||
vim.keymap.set({ "n", "x" }, "<leader>aa", function() require("opencode").ask("@this: ", { submit = true }) end,
|
||||
{ desc = "AI Ask" })
|
||||
vim.keymap.set({ "n", "x" }, "<leader>as", function() require("opencode").select() end,
|
||||
{ desc = "AI Select action" })
|
||||
vim.keymap.set({ "n", "x" }, "<leader>at", function() require("opencode").toggle() end,
|
||||
{ desc = "AI Toggle panel" })
|
||||
vim.keymap.set({ "n", "x" }, "<leader>ar", function() return require("opencode").operator("@this ") end,
|
||||
{ desc = "AI Add range", expr = true })
|
||||
vim.keymap.set("n", "<leader>al", function() return require("opencode").operator("@this ") .. "_" end,
|
||||
{ desc = "AI Add line", expr = true })
|
||||
|
||||
vim.keymap.set("n", "<leader>au", function() require("opencode").command("session.half.page.up") end,
|
||||
{ desc = "AI Scroll up" })
|
||||
vim.keymap.set("n", "<leader>ad", function() require("opencode").command("session.half.page.down") end,
|
||||
{ desc = "AI Scroll down" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"github/copilot.vim",
|
||||
init = function()
|
||||
vim.g.copilot_no_tab_map = true
|
||||
vim.g.copilot_assume_mapped = true
|
||||
end,
|
||||
config = function()
|
||||
vim.keymap.set("i", "<M-CR>", 'copilot#Accept("\\<CR>")', {
|
||||
expr = true,
|
||||
replace_keycodes = false,
|
||||
silent = true
|
||||
})
|
||||
|
||||
vim.keymap.set("i", "<M-'>", 'copilot#AcceptWord()', { expr = true, silent = true })
|
||||
vim.keymap.set("i", "<M-;>", 'copilot#AcceptLine()', { expr = true, silent = true })
|
||||
vim.keymap.set("n", "<leader>ac", "<cmd>Copilot toggle<CR>", { desc = "Toggle Copilot" })
|
||||
end
|
||||
},
|
||||
-- File explorer / Search
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
lazy = false,
|
||||
opts = {
|
||||
window = {
|
||||
width = 80,
|
||||
},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
hide_dotfiles = false,
|
||||
},
|
||||
follow_current_file = {
|
||||
enabled = true,
|
||||
},
|
||||
group_empty_dirs = true,
|
||||
},
|
||||
default_component_configs = {
|
||||
indent = {
|
||||
indent_size = 2,
|
||||
with_markers = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>e",
|
||||
function()
|
||||
vim.cmd("Neotree position=right toggle")
|
||||
end,
|
||||
desc = "Neo-tree (right)",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<leader>E", "<cmd>Oil<CR>", desc = "Oil" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"ibhagwan/fzf-lua",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = function()
|
||||
local actions = require("fzf-lua.actions")
|
||||
return {
|
||||
files = {
|
||||
actions = {
|
||||
["default"] = actions.file_edit,
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>ff", function() require("fzf-lua").files() end, desc = "Find files" },
|
||||
{ "<leader>fb", function() require("fzf-lua").buffers() end, desc = "Find buffers" },
|
||||
{ "<leader>fo", function() require("fzf-lua").oldfiles() end, desc = "Find recent files" },
|
||||
{ "<leader>ft", function() require("fzf-lua").live_grep() end, desc = "Find text in project" },
|
||||
{ "<leader>fs", function() require("fzf-lua").lsp_document_symbols() end, desc = "Find document symbols" },
|
||||
|
||||
{ "<M-/>", function() require("fzf-lua").grep_curbuf() end, desc = "Find text in buffer" },
|
||||
{ "<leader>/", function() require("fzf-lua").grep_curbuf() end, desc = "Find text in buffer" },
|
||||
|
||||
{ "<leader>fh", function() require("fzf-lua").helptags() end, desc = "Find help tags" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Git
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
cmd = { "Git", "G" },
|
||||
},
|
||||
{ "lewis6991/gitsigns.nvim" },
|
||||
{
|
||||
"kdheepak/lazygit.nvim",
|
||||
lazy = true,
|
||||
cmd = {
|
||||
"LazyGit",
|
||||
"LazyGitConfig",
|
||||
"LazyGitCurrentFile",
|
||||
"LazyGitFilter",
|
||||
"LazyGitFilterCurrentFile",
|
||||
},
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>gg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Editing utilities
|
||||
{ "MagicDuck/grug-far.nvim" },
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-surround").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = true
|
||||
},
|
||||
{
|
||||
'abecodes/tabout.nvim',
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('tabout').setup {
|
||||
tabkey = '<Tab>', -- key to trigger tabout, set to an empty string to disable
|
||||
backwards_tabkey = '<S-Tab>', -- key to trigger backwards tabout, set to an empty string to disable
|
||||
act_as_tab = true, -- shift content if tab out is not possible
|
||||
act_as_shift_tab = false, -- reverse shift content if tab out is not possible (if your keyboard/terminal supports <S-Tab>)
|
||||
default_tab = '<C-t>', -- shift default action (only at the beginning of a line, otherwise <TAB> is used)
|
||||
default_shift_tab = '<C-d>', -- reverse shift default action,
|
||||
enable_backwards = true, -- well ...
|
||||
completion = false, -- if the tabkey is used in a completion pum
|
||||
tabouts = {
|
||||
{ open = "'", close = "'" },
|
||||
{ open = '"', close = '"' },
|
||||
{ open = '`', close = '`' },
|
||||
{ open = '(', close = ')' },
|
||||
{ open = '[', close = ']' },
|
||||
{ open = '{', close = '}' },
|
||||
{ open = ',', close = ',' }
|
||||
},
|
||||
ignore_beginning = true, --[[ if the cursor is at the beginning of a filled element it will rather tab out than shift the content ]]
|
||||
exclude = {} -- tabout will ignore these filetypes
|
||||
}
|
||||
end,
|
||||
dependencies = { -- These are optional
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"L3MON4D3/LuaSnip",
|
||||
},
|
||||
event = 'InsertCharPre', -- Set the event to 'InsertCharPre' for better compatibility
|
||||
priority = 1000,
|
||||
},
|
||||
|
||||
-- Motion / UI
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
modes = {
|
||||
treesitter = {
|
||||
jump = { pos = "start" }, -- or "end"
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter").setup({
|
||||
ensure_installed = {
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"go",
|
||||
"latex",
|
||||
"typst",
|
||||
"lua",
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"wellle/targets.vim",
|
||||
event = "VeryLazy",
|
||||
},
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
opts = function()
|
||||
local function pretty_path()
|
||||
local name = vim.api.nvim_buf_get_name(0)
|
||||
if name == '' then return '[No Name]' end
|
||||
-- Relative to current working directory, nicely normalized
|
||||
return vim.fn.fnamemodify(name, ':.')
|
||||
end
|
||||
|
||||
return {
|
||||
options = {
|
||||
section_separators = '',
|
||||
component_separators = '',
|
||||
globalstatus = true,
|
||||
},
|
||||
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { { 'branch', icon = '' }, 'diff' },
|
||||
lualine_c = {
|
||||
{ 'diagnostics' }, -- uses vim.diagnostic by default
|
||||
{ 'filename', path = 1, symbols = { modified = ' ●', readonly = ' ' } },
|
||||
},
|
||||
lualine_x = { 'encoding', 'fileformat', 'filetype', require("opencode").statusline },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' },
|
||||
},
|
||||
|
||||
-- Global list (best place for buffers)
|
||||
tabline = {
|
||||
lualine_a = {
|
||||
{
|
||||
'buffers',
|
||||
show_filename_only = true,
|
||||
show_modified_status = true,
|
||||
mode = 2,
|
||||
max_length = vim.o.columns * 8 / 10,
|
||||
use_mode_colors = true,
|
||||
buffers_color = {
|
||||
active = 'lualine_a_normal',
|
||||
inactive = 'lualine_b_inactive',
|
||||
}
|
||||
},
|
||||
},
|
||||
lualine_z = { 'tabs' },
|
||||
},
|
||||
}
|
||||
end
|
||||
},
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("alpha").setup(require("alpha.themes.theta").config)
|
||||
end
|
||||
},
|
||||
{
|
||||
"chentoast/marks.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"leath-dub/snipe.nvim",
|
||||
keys = {
|
||||
{ "<leader><leader>", function() require("snipe").open_buffer_menu() end, desc = "Open Snipe buffer menu" }
|
||||
},
|
||||
opts = {}
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
preset = "helix"
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"j-hui/fidget.nvim",
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
"TmuxNavigatorProcessList",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
-- LSP
|
||||
vim.lsp.config("lua_ls", {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.enable({
|
||||
"lua_ls",
|
||||
"tinymist",
|
||||
"gopls",
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "Code Action" })
|
||||
vim.keymap.set("v", "<leader>ca", vim.lsp.buf.code_action, { desc = "Code Action" })
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Goto definition" })
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, { desc = "Goto declaration" })
|
||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, { desc = "Goto implementation" })
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, { desc = "References" })
|
||||
vim.keymap.set("n", "gy", vim.lsp.buf.type_definition, { desc = "Goto type definition" })
|
||||
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, { desc = "Hover" })
|
||||
vim.keymap.set("i", "<C-k>", vim.lsp.buf.signature_help, { desc = "Signature help" })
|
||||
|
||||
vim.keymap.set("n", "<leader>cs", vim.lsp.buf.document_symbol, { desc = "Document symbols" })
|
||||
vim.keymap.set("n", "<leader>cS", vim.lsp.buf.workspace_symbol, { desc = "Workspace symbols" })
|
||||
|
||||
vim.keymap.set("n", "<leader>cf", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, { desc = "Format buffer" })
|
||||
|
||||
vim.keymap.set("n", "<leader>cr", vim.lsp.buf.rename, { desc = "Rename" })
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
severity_sort = true,
|
||||
float = { border = "rounded", source = "if_many" },
|
||||
})
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "a9d8fb72213c8b461e791409e7feabb74eb6ce73" },
|
||||
"base16-black-metal-scheme": { "branch": "master", "commit": "c7a32bec8105a1ceddb9fcc90b713dabde5e7e5e" },
|
||||
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
|
||||
"copilot.vim": { "branch": "release", "commit": "a12fd5672110c8aa7e3c8419e28c96943ca179be" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
|
||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"fzf-lua": { "branch": "main", "commit": "5921997472574fca3880b62949eb8679dc6f5afc" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "9f3c6dd7868bcc116e9c1c1929ce063b978fa519" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "275dbedc96e61a6b8d1dfb28ba51586ddd233dcf" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" },
|
||||
"koda.nvim": { "branch": "main", "commit": "25c52c710a5083cf6f3ac533d57fefecce7e2021" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "44acfe887d4056f704ccc4f17513ed41c9e2b2e6" },
|
||||
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "4d9466677a5ceadef104eaa0fe08d60d91c4e9a7" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
|
||||
"oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" },
|
||||
"opencode.nvim": { "branch": "main", "commit": "d080eb4e4f03cfdcb3c5eacc88cc4e17bd8c1980" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"snipe.nvim": { "branch": "main", "commit": "d2d196c335919767803f905d573ce66340e33ee6" },
|
||||
"tabout.nvim": { "branch": "master", "commit": "9a3499480a8e53dcaa665e2836f287e3b7764009" },
|
||||
"targets.vim": { "branch": "master", "commit": "6325416da8f89992b005db3e4517aaef0242602e" },
|
||||
"typst-preview.nvim": { "branch": "master", "commit": "e123a7ab64e52d836e00dea9251e85b201f38966" },
|
||||
"vague.nvim": { "branch": "main", "commit": "c1ab4d4891ff3a27deba6a80222d895ac8ffb2e5" },
|
||||
"vesper.nvim": { "branch": "main", "commit": "1717b1ad657c94bec3fc2bdebb0c55452d9fe46d" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" },
|
||||
"vimtex": { "branch": "master", "commit": "95b93a24740f7b89dd8331326b41bdd1337d79f6" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
@@ -118,8 +118,8 @@ bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURC
|
||||
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
|
||||
|
||||
bindsym Print exec grim -g "$(slurp)" - | wl-copy
|
||||
bindsym $mod+Print exec grim - | wl-copy
|
||||
bindsym $mod+Shift+p exec grim -g "$(slurp)" - | wl-copy
|
||||
bindsym $mod+p exec grim - | wl-copy
|
||||
|
||||
|
||||
exec_always dbus-update-activation-environment --systemd WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=sway
|
||||
|
||||
Reference in New Issue
Block a user