mirror of
https://github.com/gyoder/dots.git
synced 2026-04-02 20:25:46 +00:00
nvim overhaul
This commit is contained in:
parent
a34e41df2e
commit
70a1581228
13 changed files with 319 additions and 305 deletions
0
vim/.config/nvim/.luarc.json
Normal file
0
vim/.config/nvim/.luarc.json
Normal file
|
|
@ -26,8 +26,9 @@ require("remap")
|
||||||
|
|
||||||
|
|
||||||
if vim.g.is_purdue then
|
if vim.g.is_purdue then
|
||||||
-- require("westwood-lint")
|
require("westwood-lint")
|
||||||
end
|
end
|
||||||
|
|
||||||
require("standard-lint")
|
require("standard-lint")
|
||||||
|
|
||||||
vim.cmd("source ~/.vim/settings.vim")
|
vim.cmd("source ~/.vim/settings.vim")
|
||||||
|
|
@ -118,17 +119,22 @@ vim.api.nvim_create_autocmd("TermOpen", {
|
||||||
|
|
||||||
vim.o.clipboard = "unnamedplus"
|
vim.o.clipboard = "unnamedplus"
|
||||||
|
|
||||||
vim.g.clipboard = {
|
-- vim.g.clipboard = {
|
||||||
name = "OSC 52",
|
-- name = "OSC 52",
|
||||||
copy = {
|
-- copy = {
|
||||||
["+"] = require("vim.ui.clipboard.osc52").copy("+"),
|
-- ["+"] = require("vim.ui.clipboard.osc52").copy("+"),
|
||||||
["*"] = require("vim.ui.clipboard.osc52").copy("*"),
|
-- ["*"] = require("vim.ui.clipboard.osc52").copy("*"),
|
||||||
},
|
-- },
|
||||||
paste = {
|
-- paste = {
|
||||||
["+"] = require("vim.ui.clipboard.osc52").paste("+"),
|
-- ["+"] = require("vim.ui.clipboard.osc52").paste("+"),
|
||||||
["*"] = require("vim.ui.clipboard.osc52").paste("*"),
|
-- ["*"] = require("vim.ui.clipboard.osc52").paste("*"),
|
||||||
},
|
-- },
|
||||||
}
|
-- }
|
||||||
|
vim.g.clipboard = "osc52"
|
||||||
|
vim.keymap.set("n", "p", '"+p')
|
||||||
|
vim.keymap.set("n", "P", '"+P')
|
||||||
|
|
||||||
|
|
||||||
-- stupid hacky workaround to make it so i can paste from tmux with OSC52
|
-- stupid hacky workaround to make it so i can paste from tmux with OSC52
|
||||||
-- https://github.com/neovim/neovim/discussions/29350#discussioncomment-10299517
|
-- https://github.com/neovim/neovim/discussions/29350#discussioncomment-10299517
|
||||||
-- tracking issue about tmux behavior: https://github.com/tmux/tmux/issues/4275
|
-- tracking issue about tmux behavior: https://github.com/tmux/tmux/issues/4275
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,10 @@ vim.lsp.enable("fish-lsp")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = { priority = 100 },
|
||||||
|
})
|
||||||
|
|
||||||
-- https://lsp-zero.netlify.app/blog/lsp-client-features.html
|
-- https://lsp-zero.netlify.app/blog/lsp-client-features.html
|
||||||
|
|
||||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' }
|
vim.opt.completeopt = { 'menu', 'menuone', 'noselect', 'noinsert' }
|
||||||
|
|
|
||||||
127
vim/.config/nvim/lua/packed.lua
Normal file
127
vim/.config/nvim/lua/packed.lua
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
--
|
||||||
|
-- Packed: a single file, somewhat compatible Packer replacement
|
||||||
|
-- Written by grace
|
||||||
|
--
|
||||||
|
|
||||||
|
local function resolve_src(s)
|
||||||
|
if s:match("^https?://") then
|
||||||
|
return s
|
||||||
|
end
|
||||||
|
if s:match("^[%w%-]+/[%w%-_.]+$") then
|
||||||
|
return "https://github.com/" .. s
|
||||||
|
end
|
||||||
|
return s
|
||||||
|
end
|
||||||
|
|
||||||
|
local function normalize_plugin(p)
|
||||||
|
if type(p) == "string" then
|
||||||
|
return {
|
||||||
|
src = resolve_src(p),
|
||||||
|
name = p:match(".*/(.*)"),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
if type(p[1]) == "string" then
|
||||||
|
p.src = resolve_src(p[1])
|
||||||
|
p[1] = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if p.src then
|
||||||
|
p.src = resolve_src(p.src)
|
||||||
|
end
|
||||||
|
|
||||||
|
if not p.name and p.as then
|
||||||
|
p.name = p.as
|
||||||
|
end
|
||||||
|
|
||||||
|
if not p.version then
|
||||||
|
if p.commit then
|
||||||
|
p.version = p.commit
|
||||||
|
elseif p.tag then
|
||||||
|
p.version = p.tag
|
||||||
|
elseif p.branch then
|
||||||
|
p.version = p.branch
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local unsupported = {
|
||||||
|
'disable', 'installer', 'updater', 'after', 'rtp',
|
||||||
|
'opt', 'bufread', 'lock', 'run', 'requires', 'rocks', 'setup'
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, field in ipairs(unsupported) do
|
||||||
|
if p[field] then
|
||||||
|
vim.notify("Packed does not support `" .. field .. "`: " .. (p.name or p.src), vim.log.levels.WARN)
|
||||||
|
vim.api.nvim_echo({ { "Press Enter to continue...", "MoreMsg" } }, false, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if p.cmd or p.ft or p.keys or p.event or p.fn or p.cond or p.module or p.module_pattern then
|
||||||
|
vim.notify("Packed does not support lazy loading: " .. (p.name or p.src), vim.log.levels.WARN)
|
||||||
|
vim.api.nvim_echo({ { "Press Enter to continue...", "MoreMsg" } }, false, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return p
|
||||||
|
end
|
||||||
|
|
||||||
|
local function setup_plugins(plugs)
|
||||||
|
local plugins = {}
|
||||||
|
|
||||||
|
if type(plugs) == "function" then
|
||||||
|
local function use(p)
|
||||||
|
table.insert(plugins, p)
|
||||||
|
end
|
||||||
|
|
||||||
|
plugs(use)
|
||||||
|
else
|
||||||
|
plugins = plugs
|
||||||
|
end
|
||||||
|
local specs = {}
|
||||||
|
|
||||||
|
for _, p in ipairs(plugins) do
|
||||||
|
p = normalize_plugin(p)
|
||||||
|
|
||||||
|
local spec = vim.deepcopy(p)
|
||||||
|
spec.config = nil
|
||||||
|
|
||||||
|
table.insert(specs, spec)
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.pack.add(specs, { confirm = true, load = true })
|
||||||
|
|
||||||
|
|
||||||
|
for _, p in ipairs(plugins) do
|
||||||
|
if type(p) ~= "string" and p.config then
|
||||||
|
local ok = pcall(p.config)
|
||||||
|
if not ok then
|
||||||
|
vim.notify("Config failed: " .. (p.name or p.src), vim.log.levels.ERROR)
|
||||||
|
vim.api.nvim_echo({ { "Press Enter to continue...", "MoreMsg" } }, false, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local unused = vim.iter(vim.pack.get())
|
||||||
|
:filter(function(p)
|
||||||
|
return not p.active
|
||||||
|
end)
|
||||||
|
:map(function(p)
|
||||||
|
return p.spec.name
|
||||||
|
end)
|
||||||
|
:totable()
|
||||||
|
|
||||||
|
vim.pack.del(unused)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local r = {}
|
||||||
|
r.setup = setup_plugins
|
||||||
|
|
||||||
|
return r
|
||||||
|
|
@ -1,39 +1,9 @@
|
||||||
vim.cmd [[packadd packer.nvim]]
|
-- vim.pack.update(nil, { target = 'lockfile' })
|
||||||
|
|
||||||
local ensure_packer = function()
|
return require("packed").setup(function(use)
|
||||||
local fn = vim.fn
|
use 'nvim-lua/plenary.nvim'
|
||||||
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
|
||||||
fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
|
|
||||||
vim.cmd [[packadd packer.nvim]]
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local packer_bootstrap = ensure_packer()
|
|
||||||
|
|
||||||
return require('packer').startup(function(use)
|
|
||||||
use 'wbthomason/packer.nvim'
|
|
||||||
|
|
||||||
-- use "neovim/nvim-lspconfig"
|
|
||||||
|
|
||||||
use {
|
|
||||||
'maxmx03/solarized.nvim',
|
|
||||||
config = function()
|
|
||||||
vim.o.background = 'dark'
|
|
||||||
---@type solarized
|
|
||||||
local solarized = require('solarized')
|
|
||||||
vim.o.termguicolors = true
|
|
||||||
vim.o.background = 'dark'
|
|
||||||
solarized.setup({})
|
|
||||||
-- vim.cmd.colorscheme 'solarized'
|
|
||||||
end
|
|
||||||
}
|
|
||||||
use {
|
use {
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
requires = { { 'nvim-lua/plenary.nvim' } },
|
|
||||||
run = ":TSUpdate",
|
|
||||||
config = function()
|
config = function()
|
||||||
require('telescope').setup({
|
require('telescope').setup({
|
||||||
defaults = {
|
defaults = {
|
||||||
|
|
@ -58,7 +28,6 @@ return require('packer').startup(function(use)
|
||||||
use {
|
use {
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
branch = 'main',
|
branch = 'main',
|
||||||
run = ':TSUpdate',
|
|
||||||
config = function()
|
config = function()
|
||||||
require('nvim-treesitter').setup()
|
require('nvim-treesitter').setup()
|
||||||
|
|
||||||
|
|
@ -83,41 +52,38 @@ return require('packer').startup(function(use)
|
||||||
|
|
||||||
|
|
||||||
use 'mbbill/undotree'
|
use 'mbbill/undotree'
|
||||||
|
use 'nvim-tree/nvim-web-devicons'
|
||||||
use 'mfussenegger/nvim-lint'
|
use 'mfussenegger/nvim-lint'
|
||||||
use {
|
use {
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
requires = { 'nvim-tree/nvim-web-devicons', opt = true },
|
config = function()
|
||||||
config = function() require('plugins/lualine-config') end
|
require('lualine').setup {
|
||||||
|
options = { theme = "rose-pine" }
|
||||||
}
|
}
|
||||||
-- use {
|
end
|
||||||
-- 'm4xshen/autoclose.nvim',
|
}
|
||||||
-- config = function() require("autoclose").setup() end
|
|
||||||
-- }
|
-- grrr why does neovim not have this?
|
||||||
--
|
|
||||||
use {
|
use {
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-autopairs").setup {}
|
require("nvim-autopairs").setup {}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
use {
|
use { "akinsho/toggleterm.nvim", config = function()
|
||||||
'CRAG666/betterTerm.nvim',
|
require("toggleterm").setup {
|
||||||
config = function() require('betterTerm').setup() end
|
size = 30
|
||||||
}
|
}
|
||||||
|
vim.keymap.set({ "n", "t", "v" }, "<leader>tt", require("toggleterm").toggle, { desc = "Toggle terminal" })
|
||||||
|
end }
|
||||||
|
use { 'nvim-telescope/telescope.nvim' }
|
||||||
use {
|
use {
|
||||||
'anurag3301/nvim-platformio.lua',
|
'anurag3301/nvim-platformio.lua',
|
||||||
requires = {
|
|
||||||
{ 'akinsho/nvim-toggleterm.lua' },
|
|
||||||
{ 'nvim-telescope/telescope.nvim' },
|
|
||||||
{ 'nvim-lua/plenary.nvim' },
|
|
||||||
},
|
|
||||||
config = function()
|
config = function()
|
||||||
if not vim.g.is_purdue then
|
if not vim.g.is_purdue then
|
||||||
require('platformio').setup({
|
require('platformio').setup({
|
||||||
lsp = "clangd" --default: ccls, other option: clangd
|
lsp = "ccls" --default: ccls, other option: clangd
|
||||||
-- If you pick clangd, it also creates compile_commands.json
|
-- If you pick clangd, it also creates compile_commands.json
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
@ -126,30 +92,26 @@ return require('packer').startup(function(use)
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"chentoast/marks.nvim",
|
"chentoast/marks.nvim",
|
||||||
config = function() require('plugins/marks-config') end
|
config = function() require('marks').setup() end
|
||||||
}
|
}
|
||||||
|
|
||||||
use {
|
-- use { "MunifTanjim/nui.nvim" }
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
|
||||||
branch = "v3.x",
|
|
||||||
requires = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
use { "nvim-tree/nvim-web-devicons" }
|
|
||||||
use { "MunifTanjim/nui.nvim" }
|
|
||||||
|
|
||||||
use { 'rafamadriz/friendly-snippets' }
|
use { 'rafamadriz/friendly-snippets' }
|
||||||
use {
|
use {
|
||||||
'saghen/blink.cmp',
|
'saghen/blink.cmp',
|
||||||
run = 'cargo build --release',
|
version = 'v1.10.1',
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins/blink_config")
|
require("blink.cmp").setup({
|
||||||
|
fuzzy = {
|
||||||
|
implementation = "prefer_rust_with_warning",
|
||||||
|
prebuilt_binaries = {
|
||||||
|
download = true,
|
||||||
|
force_version = "v1.*"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keymap = { preset = "enter" },
|
||||||
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -162,17 +124,6 @@ return require('packer').startup(function(use)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- use {
|
|
||||||
-- 'mrcjkb/rustaceanvim',
|
|
||||||
-- config = function() require('plugins/rust-config') end
|
|
||||||
-- }
|
|
||||||
|
|
||||||
use {
|
|
||||||
"NeogitOrg/neogit",
|
|
||||||
config = function()
|
|
||||||
require("neogit").setup {}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
|
|
@ -180,12 +131,12 @@ return require('packer').startup(function(use)
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
|
|
||||||
require('dap.ext.vscode').load_launchjs(nil, {
|
-- require('dap.ext.vscode').load_launchjs(nil, {
|
||||||
node = { 'javascript', 'typescript' },
|
-- node = { 'javascript', 'typescript' },
|
||||||
python = { 'python' },
|
-- python = { 'python' },
|
||||||
go = { 'go' },
|
-- go = { 'go' },
|
||||||
codelldb = { 'c', 'cpp', 'rust' }
|
-- codelldb = { 'c', 'cpp', 'rust' }
|
||||||
})
|
-- })
|
||||||
|
|
||||||
vim.keymap.set('n', '<M-u>', function() dap.continue() end, { desc = 'DAP: Continue' })
|
vim.keymap.set('n', '<M-u>', function() dap.continue() end, { desc = 'DAP: Continue' })
|
||||||
vim.keymap.set('n', '<M-i>', function() dap.step_into() end, { desc = 'DAP: Step Into' })
|
vim.keymap.set('n', '<M-i>', function() dap.step_into() end, { desc = 'DAP: Step Into' })
|
||||||
|
|
@ -224,9 +175,9 @@ return require('packer').startup(function(use)
|
||||||
config = function() require('overseer').setup() end
|
config = function() require('overseer').setup() end
|
||||||
}
|
}
|
||||||
use 'theHamsta/nvim-dap-virtual-text'
|
use 'theHamsta/nvim-dap-virtual-text'
|
||||||
|
use "nvim-neotest/nvim-nio"
|
||||||
use {
|
use {
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
requires = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
|
|
||||||
config = function()
|
config = function()
|
||||||
local dap, dapui = require("dap"), require("dapui")
|
local dap, dapui = require("dap"), require("dapui")
|
||||||
dapui.setup()
|
dapui.setup()
|
||||||
|
|
@ -247,10 +198,6 @@ return require('packer').startup(function(use)
|
||||||
|
|
||||||
use { "geigerzaehler/tree-sitter-jinja2" }
|
use { "geigerzaehler/tree-sitter-jinja2" }
|
||||||
|
|
||||||
use "echasnovski/mini.base16"
|
|
||||||
|
|
||||||
use 'rktjmp/lush.nvim'
|
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"rose-pine/neovim",
|
"rose-pine/neovim",
|
||||||
as = "rose-pine",
|
as = "rose-pine",
|
||||||
|
|
@ -264,56 +211,32 @@ return require('packer').startup(function(use)
|
||||||
|
|
||||||
use {
|
use {
|
||||||
'chomosuke/typst-preview.nvim',
|
'chomosuke/typst-preview.nvim',
|
||||||
tag = 'v1.*',
|
|
||||||
config = function()
|
config = function()
|
||||||
require 'typst-preview'.setup {}
|
require 'typst-preview'.setup {}
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- use "folke/which-key.nvim"
|
|
||||||
|
|
||||||
use({
|
|
||||||
"andrewferrier/wrapping.nvim",
|
|
||||||
config = function()
|
|
||||||
require("wrapping").setup()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
use({
|
use({
|
||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
run = function() vim.fn["mkdp#util#install"]() end,
|
config = function()
|
||||||
|
vim.api.nvim_create_user_command("MDPreviewInstall", function()
|
||||||
|
vim.vim.fn["mkdp#util#install"]()
|
||||||
|
end, {})
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- use {
|
|
||||||
-- 'preservim/vim-pencil',
|
|
||||||
-- config = function()
|
|
||||||
-- vim.cmd([[
|
|
||||||
-- augroup PencilSetup
|
|
||||||
-- autocmd!
|
|
||||||
-- autocmd FileType markdown,text,tex,gitcommit setlocal formatoptions+=t
|
|
||||||
-- autocmd FileType markdown,text,tex,gitcommit PencilHard
|
|
||||||
-- augroup END augroup END
|
|
||||||
-- ]])
|
|
||||||
-- end
|
|
||||||
-- }
|
|
||||||
|
|
||||||
use {
|
use {
|
||||||
'LukasPietzschmann/telescope-tabs',
|
'LukasPietzschmann/telescope-tabs',
|
||||||
requires = { 'nvim-telescope/telescope.nvim' },
|
|
||||||
config = function()
|
config = function()
|
||||||
require 'telescope-tabs'.setup {
|
require 'telescope-tabs'.setup {
|
||||||
-- Your custom config :^)
|
-- Your custom config :^)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
use "HiPhish/rainbow-delimiters.nvim"
|
use "HiPhish/rainbow-delimiters.nvim"
|
||||||
|
|
||||||
|
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
if packer_bootstrap then
|
|
||||||
require('packer').sync()
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
require("blink.cmp").setup({
|
|
||||||
fuzzy = {
|
|
||||||
implementation = "lua",
|
|
||||||
prebuilt_binaries = {
|
|
||||||
download = true,
|
|
||||||
force_version = 'v1.2.0',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keymap = { preset = "enter" },
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
require('lualine').setup {
|
|
||||||
options = { theme = "rose-pine" }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
require'marks'.setup {
|
|
||||||
-- whether to map keybinds or not. default true
|
|
||||||
default_mappings = true,
|
|
||||||
-- which builtin marks to show. default {}
|
|
||||||
builtin_marks = { ".", "<", ">", "^" },
|
|
||||||
-- whether movements cycle back to the beginning/end of buffer. default true
|
|
||||||
cyclic = true,
|
|
||||||
-- whether the shada file is updated after modifying uppercase marks. default false
|
|
||||||
force_write_shada = false,
|
|
||||||
-- how often (in ms) to redraw signs/recompute mark positions.
|
|
||||||
-- higher values will have better performance but may cause visual lag,
|
|
||||||
-- while lower values may cause performance penalties. default 150.
|
|
||||||
refresh_interval = 250,
|
|
||||||
-- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase
|
|
||||||
-- marks, and bookmarks.
|
|
||||||
-- can be either a table with all/none of the keys, or a single number, in which case
|
|
||||||
-- the priority applies to all marks.
|
|
||||||
-- default 10.
|
|
||||||
sign_priority = { lower=10, upper=15, builtin=8, bookmark=20 },
|
|
||||||
-- disables mark tracking for specific filetypes. default {}
|
|
||||||
excluded_filetypes = {},
|
|
||||||
-- disables mark tracking for specific buftypes. default {}
|
|
||||||
excluded_buftypes = {},
|
|
||||||
-- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
|
|
||||||
-- sign/virttext. Bookmarks can be used to group together positions and quickly move
|
|
||||||
-- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
|
|
||||||
-- default virt_text is "".
|
|
||||||
bookmark_0 = {
|
|
||||||
sign = "⚑",
|
|
||||||
virt_text = "hello world",
|
|
||||||
-- explicitly prompt for a virtual line annotation when setting a bookmark from this group.
|
|
||||||
-- defaults to false.
|
|
||||||
annotate = false,
|
|
||||||
},
|
|
||||||
mappings = {}
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
local bufnr = vim.api.nvim_get_current_buf()
|
|
||||||
vim.keymap.set(
|
|
||||||
"n",
|
|
||||||
"<leader>a",
|
|
||||||
function()
|
|
||||||
vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping
|
|
||||||
-- or vim.lsp.buf.codeAction() if you don't want grouping.
|
|
||||||
end,
|
|
||||||
{ silent = true, buffer = bufnr }
|
|
||||||
)
|
|
||||||
vim.keymap.set(
|
|
||||||
"n",
|
|
||||||
"K",
|
|
||||||
function()
|
|
||||||
if vim.bo.filetype == "rust" then
|
|
||||||
vim.cmd.RustLsp({'hover', 'actions'})
|
|
||||||
else
|
|
||||||
vim.lsp.buf.hover()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{ silent = true, buffer = bufnr }
|
|
||||||
)
|
|
||||||
|
|
||||||
vim.g.rustaceanvim = {
|
|
||||||
server = {
|
|
||||||
settings = {
|
|
||||||
["rust-analyzer"] = {
|
|
||||||
checkOnSave = {
|
|
||||||
command = "clippy",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
require'nvim-treesitter.configs'.setup {
|
|
||||||
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
|
|
||||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline" },
|
|
||||||
|
|
||||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
|
||||||
sync_install = false,
|
|
||||||
|
|
||||||
-- Automatically install missing parsers when entering buffer
|
|
||||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
|
||||||
auto_install = true,
|
|
||||||
|
|
||||||
-- List of parsers to ignore installing (or "all")
|
|
||||||
-- ignore_install = { "javascript" },
|
|
||||||
|
|
||||||
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
|
||||||
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
|
||||||
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
|
|
||||||
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
|
||||||
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
|
||||||
-- the name of the parser)
|
|
||||||
-- list of language that will be disabled
|
|
||||||
-- disable = { "c", "rust" },
|
|
||||||
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
|
||||||
disable = function(lang, buf)
|
|
||||||
local max_filesize = 100 * 1024 -- 100 KB
|
|
||||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
|
||||||
if ok and stats and stats.size > max_filesize then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
|
|
||||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
|
||||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
|
||||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
|
||||||
-- Instead of true it can also be a list of languages
|
|
||||||
additional_vim_regex_highlighting = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -57,45 +57,18 @@ vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)
|
||||||
|
|
||||||
-- Better Term
|
-- Better Term
|
||||||
|
|
||||||
local betterTerm = require('betterTerm')
|
-- local betterTerm = require('betterTerm')
|
||||||
-- toggle firts term
|
-- -- toggle firts term
|
||||||
vim.keymap.set({ "n", "t" }, "<leader>tt", betterTerm.open, { desc = "Open terminal" })
|
-- vim.keymap.set({ "n", "t" }, "<leader>tt", betterTerm.open, { desc = "Open terminal" })
|
||||||
-- Select term focus
|
-- -- Select term focus
|
||||||
-- vim.keymap.set({"n"}, "<leader>tf", betterTerm.select, { desc = "Select terminal"})
|
-- -- vim.keymap.set({"n"}, "<leader>tf", betterTerm.select, { desc = "Select terminal"})
|
||||||
-- Create new term
|
-- -- Create new term
|
||||||
local current = 2
|
-- local current = 2
|
||||||
vim.keymap.set(
|
-- vim.keymap.set(
|
||||||
{ "n" }, "<leader>tn",
|
-- { "n" }, "<leader>tn",
|
||||||
function()
|
-- function()
|
||||||
betterTerm.open(current)
|
-- betterTerm.open(current)
|
||||||
current = current + 1
|
-- current = current + 1
|
||||||
end,
|
-- end,
|
||||||
{ desc = "New terminal" }
|
-- { desc = "New terminal" }
|
||||||
)
|
-- )
|
||||||
|
|
||||||
-- Neotree
|
|
||||||
|
|
||||||
local ntc = require('neo-tree.command')
|
|
||||||
vim.keymap.set('n', '<C-b>', function()
|
|
||||||
local reveal_file = vim.fn.expand('%:p')
|
|
||||||
if (reveal_file == '') then
|
|
||||||
reveal_file = vim.fn.getcwd()
|
|
||||||
else
|
|
||||||
local f = io.open(reveal_file, "r")
|
|
||||||
if (f) then
|
|
||||||
f.close(f)
|
|
||||||
else
|
|
||||||
reveal_file = vim.fn.getcwd()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
ntc.execute({
|
|
||||||
action = "focus", -- OPTIONAL, this is the default value
|
|
||||||
source = "filesystem", -- OPTIONAL, this is the default value
|
|
||||||
position = "right", -- OPTIONAL, this is the default value
|
|
||||||
reveal_file = reveal_file, -- path to file or folder to reveal
|
|
||||||
reveal_force_cwd = true, -- change cwd without asking if needed
|
|
||||||
toggle = true,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
{ desc = "Show Sidebar" }
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,19 @@
|
||||||
local lint = require("lint")
|
local lint = require("lint")
|
||||||
|
|
||||||
local errorformat = "%WWARNING: %m,%Z%\\s%\\s%\\s%\\s%\\s%\\s%\\s%\\s%\\sat (stdin) from line %l column %c to line %e column %k"
|
local errorformat =
|
||||||
|
"%WWARNING: %m,%Z%\\s%\\s%\\s%\\s%\\s%\\s%\\s%\\s%\\sat (stdin) from line %l column %c to line %e column %k"
|
||||||
lint.linters.westwood = {
|
lint.linters.westwood = {
|
||||||
cmd = '/homes/kkasad/share/westwood',
|
cmd = '/homes/kkasad/share/westwood',
|
||||||
stdin = true,
|
stdin = true,
|
||||||
args = {'-f', 'machine', '-'},
|
args = { '-f', 'machine', '-' },
|
||||||
stream = both,
|
stream = both,
|
||||||
ignore_exitcode = false,
|
ignore_exitcode = false,
|
||||||
env = nil,
|
env = nil,
|
||||||
parser = require('lint.parser').from_errorformat(errorformat)
|
parser = require('lint.parser').from_errorformat(errorformat)
|
||||||
}
|
}
|
||||||
|
|
||||||
lint.linters_by_ft.c = {"westwood", "clangtidy"}
|
lint.linters_by_ft.c = { "westwood", "clangtidy" }
|
||||||
lint.linters_by_ft.cpp = {"westwood"}
|
lint.linters_by_ft.cpp = { "westwood" }
|
||||||
vim.list_extend(lint.linters_by_ft.c, { "westwood", "clangtidy" })
|
vim.list_extend(lint.linters_by_ft.c, { "westwood", "clangtidy" })
|
||||||
vim.list_extend(lint.linters_by_ft.cpp, { "westwood" })
|
vim.list_extend(lint.linters_by_ft.cpp, { "westwood" })
|
||||||
|
|
||||||
|
|
|
||||||
106
vim/.config/nvim/nvim-pack-lock.json
Normal file
106
vim/.config/nvim/nvim-pack-lock.json
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"blink.cmp": {
|
||||||
|
"rev": "451168851e8e2466bc97ee3e026c3dcb9141ce07",
|
||||||
|
"src": "https://github.com/saghen/blink.cmp",
|
||||||
|
"version": "'v1.10.1'"
|
||||||
|
},
|
||||||
|
"friendly-snippets": {
|
||||||
|
"rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9",
|
||||||
|
"src": "https://github.com/rafamadriz/friendly-snippets"
|
||||||
|
},
|
||||||
|
"git-blame.nvim": {
|
||||||
|
"rev": "5c536e2d4134d064aa3f41575280bc8a2a0e03d7",
|
||||||
|
"src": "https://github.com/f-person/git-blame.nvim"
|
||||||
|
},
|
||||||
|
"lualine.nvim": {
|
||||||
|
"rev": "47f91c416daef12db467145e16bed5bbfe00add8",
|
||||||
|
"src": "https://github.com/nvim-lualine/lualine.nvim"
|
||||||
|
},
|
||||||
|
"markdown-preview.nvim": {
|
||||||
|
"rev": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee",
|
||||||
|
"src": "https://github.com/iamcco/markdown-preview.nvim"
|
||||||
|
},
|
||||||
|
"marks.nvim": {
|
||||||
|
"rev": "f353e8c08c50f39e99a9ed474172df7eddd89b72",
|
||||||
|
"src": "https://github.com/chentoast/marks.nvim"
|
||||||
|
},
|
||||||
|
"nvim-autopairs": {
|
||||||
|
"rev": "59bce2eef357189c3305e25bc6dd2d138c1683f5",
|
||||||
|
"src": "https://github.com/windwp/nvim-autopairs"
|
||||||
|
},
|
||||||
|
"nvim-dap": {
|
||||||
|
"rev": "a9d8cb68ee7184111dc66156c4a2ebabfbe01bc5",
|
||||||
|
"src": "https://github.com/mfussenegger/nvim-dap"
|
||||||
|
},
|
||||||
|
"nvim-dap-ui": {
|
||||||
|
"rev": "f5b6673f374626515401c5bc51b005f784a4f252",
|
||||||
|
"src": "https://github.com/rcarriga/nvim-dap-ui"
|
||||||
|
},
|
||||||
|
"nvim-dap-virtual-text": {
|
||||||
|
"rev": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6",
|
||||||
|
"src": "https://github.com/theHamsta/nvim-dap-virtual-text"
|
||||||
|
},
|
||||||
|
"nvim-lint": {
|
||||||
|
"rev": "606b823a57b027502a9ae00978ebf4f5d5158098",
|
||||||
|
"src": "https://github.com/mfussenegger/nvim-lint"
|
||||||
|
},
|
||||||
|
"nvim-nio": {
|
||||||
|
"rev": "21f5324bfac14e22ba26553caf69ec76ae8a7662",
|
||||||
|
"src": "https://github.com/nvim-neotest/nvim-nio"
|
||||||
|
},
|
||||||
|
"nvim-platformio.lua": {
|
||||||
|
"rev": "3bc47194d0917a1f174e8c05d90e93824bd5d76f",
|
||||||
|
"src": "https://github.com/anurag3301/nvim-platformio.lua"
|
||||||
|
},
|
||||||
|
"nvim-treesitter": {
|
||||||
|
"rev": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849",
|
||||||
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter",
|
||||||
|
"version": "'main'"
|
||||||
|
},
|
||||||
|
"nvim-web-devicons": {
|
||||||
|
"rev": "d7462543c9e366c0d196c7f67a945eaaf5d99414",
|
||||||
|
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
||||||
|
},
|
||||||
|
"overseer.nvim": {
|
||||||
|
"rev": "a2194447f4c5a1baf95139c5c7b539fa7b0d012f",
|
||||||
|
"src": "https://github.com/stevearc/overseer.nvim"
|
||||||
|
},
|
||||||
|
"plenary.nvim": {
|
||||||
|
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
|
||||||
|
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||||
|
},
|
||||||
|
"rainbow-delimiters.nvim": {
|
||||||
|
"rev": "607a438d8c647a355749973fd295e33505afafde",
|
||||||
|
"src": "https://github.com/HiPhish/rainbow-delimiters.nvim"
|
||||||
|
},
|
||||||
|
"rose-pine": {
|
||||||
|
"rev": "cf2a288696b03d0934da713d66c6d71557b5c997",
|
||||||
|
"src": "https://github.com/rose-pine/neovim"
|
||||||
|
},
|
||||||
|
"telescope-tabs": {
|
||||||
|
"rev": "777b1f630f3d6a12a2e71635a82581c988d6da2e",
|
||||||
|
"src": "https://github.com/LukasPietzschmann/telescope-tabs"
|
||||||
|
},
|
||||||
|
"telescope.nvim": {
|
||||||
|
"rev": "5255aa27c422de944791318024167ad5d40aad20",
|
||||||
|
"src": "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
|
},
|
||||||
|
"toggleterm.nvim": {
|
||||||
|
"rev": "9a88eae817ef395952e08650b3283726786fb5fb",
|
||||||
|
"src": "https://github.com/akinsho/toggleterm.nvim"
|
||||||
|
},
|
||||||
|
"tree-sitter-jinja2": {
|
||||||
|
"rev": "ecab6215c53da5c1126d81d1bf664b3b5cf87d15",
|
||||||
|
"src": "https://github.com/geigerzaehler/tree-sitter-jinja2"
|
||||||
|
},
|
||||||
|
"typst-preview.nvim": {
|
||||||
|
"rev": "a42c86ef1875100c2be92e90a637064efb0eab06",
|
||||||
|
"src": "https://github.com/chomosuke/typst-preview.nvim"
|
||||||
|
},
|
||||||
|
"undotree": {
|
||||||
|
"rev": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d",
|
||||||
|
"src": "https://github.com/mbbill/undotree"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue