full config rewrite
This commit is contained in:
parent
6647ae475a
commit
e48c346134
|
|
@ -0,0 +1,6 @@
|
|||
column_width = 160
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
call_parentheses = "Always"
|
||||
152
init.lua
152
init.lua
|
|
@ -1,4 +1,148 @@
|
|||
vim.g.skip_ts_context_commentstring_module = true
|
||||
require "basics"
|
||||
require "plugins"
|
||||
require "keys"
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.showmode = false
|
||||
vim.schedule(function()
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
vim.g.clipboard = {
|
||||
name = 'xclip',
|
||||
copy = {
|
||||
['+'] = 'xclip -selection clipboard',
|
||||
['*'] = 'xclip -selection primary',
|
||||
},
|
||||
paste = {
|
||||
['+'] = { 'xclip', '-selection', 'clipboard', '-o' },
|
||||
['*'] = { 'xclip', '-selection', 'primary', '-o' },
|
||||
},
|
||||
cache_enabled = true,
|
||||
}
|
||||
end)
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.undofile = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.updatetime = 250
|
||||
vim.opt.timeoutlen = 300
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.list = true
|
||||
vim.opt.inccommand = 'split'
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.scrolloff = 10
|
||||
vim.opt.confirm = true
|
||||
|
||||
-- Convert Tab to spaces
|
||||
vim.cmd([[filetype plugin indent on]])
|
||||
vim.o.tabstop = 2
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.expandtab = true
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
zsh = 'zsh',
|
||||
sh = 'sh',
|
||||
},
|
||||
filename = {
|
||||
['.zshrc'] = 'zsh',
|
||||
['.zshenv'] = 'zsh',
|
||||
},
|
||||
})
|
||||
|
||||
require('diagnostic')
|
||||
require('keybinds')
|
||||
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight when yanking (copying) text',
|
||||
group = vim.api.nvim_create_augroup('highlight-yank', { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Setup Lazy
|
||||
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
|
||||
error('Error cloning lazy.nvim:\n' .. out)
|
||||
end
|
||||
end ---@diagnostic disable-next-line: undefined-field
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require('lazy').setup({
|
||||
require('plugins/web-devicons'),
|
||||
require('plugins/neo-tree'),
|
||||
require('plugins/conform'),
|
||||
require('plugins/treesitter'),
|
||||
require('plugins/lsp'),
|
||||
require('plugins/telescope'),
|
||||
{
|
||||
'folke/tokyonight.nvim',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {},
|
||||
config = function()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require('tokyonight').setup({
|
||||
transparent = true,
|
||||
terminal_colors = false,
|
||||
---@param highlights tokyonight.Highlights
|
||||
---@param colors ColorScheme
|
||||
on_highlights = function(highlights, colors)
|
||||
highlights.TabLineSel = { bg = '#252d37' }
|
||||
end,
|
||||
})
|
||||
vim.cmd([[colorscheme tokyonight-night]])
|
||||
end,
|
||||
},
|
||||
require('plugins/none-ls'),
|
||||
require('plugins/blink'),
|
||||
require('plugins/pairs'),
|
||||
require('plugins/ccc'),
|
||||
require('plugins/heirline'),
|
||||
require('plugins/lspsaga'),
|
||||
{ 'folke/ts-comments.nvim', opts = {}, event = 'VeryLazy' },
|
||||
{
|
||||
'folke/todo-comments.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
'MagicDuck/grug-far.nvim',
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
'windwp/nvim-ts-autotag',
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
'axelvc/template-string.nvim',
|
||||
opts = {},
|
||||
},
|
||||
'jghauser/mkdir.nvim',
|
||||
{
|
||||
'supermaven-inc/supermaven-nvim',
|
||||
config = function()
|
||||
if not (vim.fn.has_key(vim.fn.environ(), 'LOAD_SUPERMAVEN') == 0) then
|
||||
require('supermaven-nvim').setup({})
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
'folke/todo-comments.nvim',
|
||||
dependencies = 'nvim-lua/plenary.nvim',
|
||||
opts = {},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
# linux_display_server x11
|
||||
# Font
|
||||
# font_family family='Berkeley Mono Trial' postscript_name=BerkeleyMonoTrial-Regular
|
||||
font_family Input Mono Narrow
|
||||
# font_family CaskaydiaCove Nerd Font Mono
|
||||
font_size 11
|
||||
|
|
|
|||
286
lazy-lock.json
286
lazy-lock.json
|
|
@ -1,254 +1,36 @@
|
|||
{
|
||||
"Comment.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb"
|
||||
},
|
||||
"FixCursorHold.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "1900f89dc17c603eec29960f57c00bd9ae696495"
|
||||
},
|
||||
"LuaSnip": {
|
||||
"branch": "master",
|
||||
"commit": "03c8e67eb7293c404845b3982db895d59c0d1538"
|
||||
},
|
||||
"blink.cmp": {
|
||||
"branch": "main",
|
||||
"commit": "b6f11a0aa33e601c469a126e3ed6e35208fe3ea3"
|
||||
},
|
||||
"ccc.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "b57cbaf8db3ac43c56c9e2c7f3812944638260ed"
|
||||
},
|
||||
"cmp-npm": {
|
||||
"branch": "main",
|
||||
"commit": "2337f109f51a09297596dd6b538b70ccba92b4e4"
|
||||
},
|
||||
"crates.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "1d92a7f449a2a76d8f4c3459bd98f450e76d2ea3"
|
||||
},
|
||||
"cspell.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "fb104ec1e06e984baefcad6a0559381f5d933442"
|
||||
},
|
||||
"editorconfig-vim": {
|
||||
"branch": "master",
|
||||
"commit": "91bd0b0a2c6a72a110ab9feae335e1224480c233"
|
||||
},
|
||||
"fidget.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "d9ba6b7bfe29b3119a610892af67602641da778e"
|
||||
},
|
||||
"formatter.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "eb89a1f3e079f1b9680bc7293b75fffccb5e1598"
|
||||
},
|
||||
"friendly-snippets": {
|
||||
"branch": "main",
|
||||
"commit": "efff286dd74c22f731cdec26a70b46e5b203c619"
|
||||
},
|
||||
"gitsigns.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "8b00147519d6f8353867d5d0b55f587306b0cfb6"
|
||||
},
|
||||
"heirline.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "af3f441ea10f96105e1af14cd37bf213533812d2"
|
||||
},
|
||||
"lazy.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "ac21a639c7ecfc8b822dcc9455deceea3778f839"
|
||||
},
|
||||
"lightspeed.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "fcc72d8a4d5f4ebba62d8a3a0660f88f1b5c3b05"
|
||||
},
|
||||
"lsp_signature.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "5b64964ed02098c85613ee3d20f96bed1dfb64cc"
|
||||
},
|
||||
"lspkind-nvim": {
|
||||
"branch": "master",
|
||||
"commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6"
|
||||
},
|
||||
"markview.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "f1e2a57388b61fff8e9d7519ce05cee27a59a57e"
|
||||
},
|
||||
"mason-lspconfig.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "a8e6efcf623b86bae6d2223eede7c43883329f80"
|
||||
},
|
||||
"mason-null-ls.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "de19726de7260c68d94691afb057fa73d3cc53e7"
|
||||
},
|
||||
"mason.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "5664dd5deb3ac9527da90691543eb28df51c1ef8"
|
||||
},
|
||||
"mkdir.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "c55d1dee4f099528a1853b28bb28caa802eba217"
|
||||
},
|
||||
"monokai.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "c295909d53c7577af7eece5ae83855384dd900a6"
|
||||
},
|
||||
"neo-tree.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "e96fd85bf18bc345dab332b345098fa5460dffac"
|
||||
},
|
||||
"neotest": {
|
||||
"branch": "master",
|
||||
"commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72"
|
||||
},
|
||||
"neotest-jest": {
|
||||
"branch": "main",
|
||||
"commit": "514fd4eae7da15fd409133086bb8e029b65ac43f"
|
||||
},
|
||||
"neotest-zig": {
|
||||
"branch": "main",
|
||||
"commit": "c7a1a39626fa90e639fb640b6322739060a2acf3"
|
||||
},
|
||||
"none-ls.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "02f5275d8a5546092f01306f162c00c71d6e0281"
|
||||
},
|
||||
"nui.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46"
|
||||
},
|
||||
"nvim-autopairs": {
|
||||
"branch": "master",
|
||||
"commit": "68f0e5c3dab23261a945272032ee6700af86227a"
|
||||
},
|
||||
"nvim-dap": {
|
||||
"branch": "master",
|
||||
"commit": "52302f02fea3a490e55475de52fa4deb8af2eb11"
|
||||
},
|
||||
"nvim-dap-ui": {
|
||||
"branch": "master",
|
||||
"commit": "bc81f8d3440aede116f821114547a476b082b319"
|
||||
},
|
||||
"nvim-lspconfig": {
|
||||
"branch": "master",
|
||||
"commit": "7af2c37192deae28d1305ae9e68544f7fb5408e1"
|
||||
},
|
||||
"nvim-nio": {
|
||||
"branch": "master",
|
||||
"commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662"
|
||||
},
|
||||
"nvim-treesitter": {
|
||||
"branch": "master",
|
||||
"commit": "00a513f87ee3c339c2024b08db3eb63ba7736ed6"
|
||||
},
|
||||
"nvim-ts-autotag": {
|
||||
"branch": "main",
|
||||
"commit": "4c00b86bd1246ba9c4cd50a823d8296cd2eb9663"
|
||||
},
|
||||
"nvim-ts-context-commentstring": {
|
||||
"branch": "main",
|
||||
"commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f"
|
||||
},
|
||||
"nvim-vtsls": {
|
||||
"branch": "main",
|
||||
"commit": "45c6dfea9f83a126e9bfc5dd63430562b3f8af16"
|
||||
},
|
||||
"nvim-web-devicons": {
|
||||
"branch": "master",
|
||||
"commit": "1020869742ecb191f260818234517f4a1515cfe8"
|
||||
},
|
||||
"nvim-window-picker": {
|
||||
"branch": "main",
|
||||
"commit": "0dfef64eaf063e1cd27983ab11a30e7bc5b74fac"
|
||||
},
|
||||
"omnisharp-vim": {
|
||||
"branch": "master",
|
||||
"commit": "cdbf65bc4385d7026428d2f392b40a317725cc9c"
|
||||
},
|
||||
"outline.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "f01eae624e6170656b6fadd6d7b8717636078bd6"
|
||||
},
|
||||
"packer.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "ea0cc3c59f67c440c5ff0bbe4fb9420f4350b9a3"
|
||||
},
|
||||
"plantuml-syntax": {
|
||||
"branch": "master",
|
||||
"commit": "9d4900aa16674bf5bb8296a72b975317d573b547"
|
||||
},
|
||||
"playground": {
|
||||
"branch": "master",
|
||||
"commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749"
|
||||
},
|
||||
"plenary.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "857c5ac632080dba10aae49dba902ce3abf91b35"
|
||||
},
|
||||
"popfix": {
|
||||
"branch": "master",
|
||||
"commit": "bf3cc436df63cd535350d5ef1b951c91554d4b01"
|
||||
},
|
||||
"popui.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "4d903e46fdb5eef25fa79ef1b598f5340a2674b0"
|
||||
},
|
||||
"popup.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac"
|
||||
},
|
||||
"presence.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "87c857a56b7703f976d3a5ef15967d80508df6e6"
|
||||
},
|
||||
"roslyn.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "3f86e52047f1697117c73d4597729b25bc06839e"
|
||||
},
|
||||
"snacks.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "57445057395fd1f5b315defa367c57651ea2e5f2"
|
||||
},
|
||||
"statuscol.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "a2a0e3ed55ba0f636ce0b2ccf61bca4050edd288"
|
||||
},
|
||||
"supermaven-nvim": {
|
||||
"branch": "main",
|
||||
"commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50"
|
||||
},
|
||||
"tailwind-tools.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "abe7368392345c53174979c2cf033e832de80ef8"
|
||||
},
|
||||
"telescope-ui-select.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2"
|
||||
},
|
||||
"telescope.nvim": {
|
||||
"branch": "master",
|
||||
"commit": "78857db9e8d819d3cc1a9a7bdc1d39d127a36495"
|
||||
},
|
||||
"template-string.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "da5f326b65fb74fd068aa1d8b55461b64c8fb23b"
|
||||
},
|
||||
"todo-comments.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5"
|
||||
},
|
||||
"typescript.nvim": {
|
||||
"branch": "main",
|
||||
"commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467"
|
||||
},
|
||||
"vim-caddyfile": {
|
||||
"branch": "master",
|
||||
"commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0"
|
||||
},
|
||||
"vim-repeat": {
|
||||
"branch": "master",
|
||||
"commit": "65846025c15494983dafe5e3b46c8f88ab2e9635"
|
||||
}
|
||||
"blink.cmp": { "branch": "main", "commit": "9bcb14b43852a6f2bfd5ac9ef29cb5cf09b1b39b" },
|
||||
"ccc.nvim": { "branch": "main", "commit": "9d1a256e006decc574789dfc7d628ca11644d4c2" },
|
||||
"conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" },
|
||||
"cspell.nvim": { "branch": "main", "commit": "fb104ec1e06e984baefcad6a0559381f5d933442" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "1b0350ab707713b2bc6c236151f1a324175347b1" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "b3f9412b1ed76f14cfc68e1ee899873544330c80" },
|
||||
"heirline.nvim": { "branch": "master", "commit": "fae936abb5e0345b85c3a03ecf38525b0828b992" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "c4c84f4521d62de595c0d0f718a9a40c1890c8ce" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
|
||||
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||
"mini.pairs": { "branch": "main", "commit": "42407ccb80ec59c84e7c91d815f42ed90a8cc093" },
|
||||
"mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "7bc06b5efc5554d10f73a8aa508e02c03a83c2a0" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "db2a48b79cfcdab8baa5d3f37f21c78b6705c62e" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "6bba673aa8993eceec233be17b42ddfb9540794b" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "19d6211c78169e78bab372b585b6fb17ad974e82" },
|
||||
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "6af106298a8fd50af775d5281ee39a102556e352" },
|
||||
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"template-string.nvim": { "branch": "main", "commit": "da5f326b65fb74fd068aa1d8b55461b64c8fb23b" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||
"ts-comments.nvim": { "branch": "main", "commit": "1bd9d0ba1d8b336c3db50692ffd0955fe1bb9f0c" }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
local set = vim.o
|
||||
|
||||
set.number = true
|
||||
set.relativenumber = true
|
||||
set.clipboard = "unnamedplus"
|
||||
set.mouse = "a"
|
||||
set.termguicolors = true
|
||||
set.swapfile = false
|
||||
set.cursorline = true
|
||||
set.cursorlineopt = "number"
|
||||
set.scrolloff = 5
|
||||
|
||||
vim.cmd [[filetype plugin indent on]]
|
||||
set.tabstop = 2
|
||||
set.shiftwidth = 2
|
||||
set.expandtab = true
|
||||
|
||||
-- vim.cmd [[autocmd FileType markdown setlocal spell spelllang=de,en]]
|
||||
-- vim.cmd [[autocmd FileType tex setlocal spell spelllang=de,en]]
|
||||
vim.cmd [[autocmd bufnewfile,bufread *.tsx set filetype=typescriptreact]]
|
||||
vim.cmd [[autocmd bufnewfile,bufread *.jsx set filetype=javascriptreact]]
|
||||
vim.cmd [[autocmd bufnewfile,bufread Jenkinsfile set filetype=groovy]]
|
||||
|
||||
set.splitright = true
|
||||
set.splitbelow = true
|
||||
|
||||
set.signcolumn = "auto:2"
|
||||
|
||||
-- set leader
|
||||
vim.g.mapleader = " "
|
||||
|
||||
vim.filetype.add(
|
||||
{
|
||||
extension = {
|
||||
zsh = "sh",
|
||||
sh = "sh"
|
||||
},
|
||||
filename = {
|
||||
[".zshrc"] = "sh",
|
||||
[".zshenv"] = "sh"
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
vim.diagnostic.config({
|
||||
severity_sort = true,
|
||||
float = { border = 'rounded', source = 'if_many' },
|
||||
underline = true,
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = ' ',
|
||||
[vim.diagnostic.severity.WARN] = ' ',
|
||||
[vim.diagnostic.severity.INFO] = ' ',
|
||||
[vim.diagnostic.severity.HINT] = ' ',
|
||||
},
|
||||
},
|
||||
virtual_text = {
|
||||
source = 'if_many',
|
||||
spacing = 2,
|
||||
format = function(diagnostic)
|
||||
local diagnostic_message = {
|
||||
[vim.diagnostic.severity.ERROR] = diagnostic.message,
|
||||
[vim.diagnostic.severity.WARN] = diagnostic.message,
|
||||
[vim.diagnostic.severity.INFO] = diagnostic.message,
|
||||
[vim.diagnostic.severity.HINT] = diagnostic.message,
|
||||
}
|
||||
return diagnostic_message[diagnostic.severity]
|
||||
end,
|
||||
},
|
||||
})
|
||||
2657
lua/json-schema.lua
2657
lua/json-schema.lua
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,30 @@
|
|||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
-- Navigate buffers with ALT
|
||||
vim.api.nvim_set_keymap('', '<A-Left>', '<C-w><Left>', { silent = true })
|
||||
vim.api.nvim_set_keymap('', '<A-Up>', '<C-w><Up>', { silent = true })
|
||||
vim.api.nvim_set_keymap('', '<A-Down>', '<C-w><Down>', { silent = true })
|
||||
vim.api.nvim_set_keymap('', '<A-Right>', '<C-w><Right>', { silent = true })
|
||||
vim.api.nvim_set_keymap('', '<C-p>', '<C-i>', { silent = true, noremap = true })
|
||||
|
||||
local print_namespace = function()
|
||||
local cmd = 'bash -c "xq *.csproj -q RootNamespace"'
|
||||
-- insert namespace NAMESPACE.PATH.TO.FILE; at the start of the file
|
||||
local output = vim.fn.system(cmd):gsub('\n', '')
|
||||
local relative_path = vim.fn.expand('%:h')
|
||||
local short_path = relative_path:gsub('/', '.')
|
||||
local namespace = output .. '.' .. short_path
|
||||
if relative_path == '.' then
|
||||
namespace = output
|
||||
end
|
||||
vim.cmd([[normal! gg]])
|
||||
vim.cmd([[normal! }]])
|
||||
vim.cmd([[normal! o]])
|
||||
vim.api.nvim_put({ 'namespace ' .. namespace .. ';' }, 'c', true, true)
|
||||
vim.cmd([[normal! o]])
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<leader>n', print_namespace, { silent = true })
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<leader><cr>', '<cmd>terminal<cr>i', { silent = true })
|
||||
78
lua/keys.lua
78
lua/keys.lua
|
|
@ -1,78 +0,0 @@
|
|||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>ff",
|
||||
"<cmd>lua require('telescope.builtin').find_files({hidden = true})<cr>",
|
||||
{silent = true}
|
||||
)
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<leader>fF",
|
||||
"<cmd>lua require('telescope.builtin').find_files({no_ignore=true, no_ignore_parent = true, hidden = true})<cr>",
|
||||
{silent = true}
|
||||
)
|
||||
vim.api.nvim_set_keymap("n", "<leader>fg", "<cmd>lua require('telescope.builtin').live_grep()<cr>", {silent = true})
|
||||
-- vim.api.nvim_set_keymap("n", "<leader>fb", "<cmd>lua require('telescope.builtin').buffers()<cr>", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>fh", "<cmd>lua require('telescope.builtin').help_tags()<cr>", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>fB", "<cmd>lua require('telescope.builtin').git_branches()<cr>", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>ft", "<CMD>TodoTelescope<CR>", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>fj", "<CMD>Telescope jsonfly<CR>", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>fb", "<CMD>Telescope buffers<CR>", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "gr", "<cmd>lua require('telescope.builtin').lsp_references()<cr>", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "gd", "<cmd>lua require('telescope.builtin').lsp_definitions()<cr>", {silent = true})
|
||||
local opts = {noremap = true, silent = true}
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<C-LeftMouse>",
|
||||
"<LeftMouse><cmd>lua require('telescope.builtin').lsp_definitions()<cr>",
|
||||
opts
|
||||
)
|
||||
vim.api.nvim_set_keymap(
|
||||
"n",
|
||||
"<C-RightMouse>",
|
||||
"<LeftMouse><cmd>lua require('telescope.builtin').lsp_references()<cr>",
|
||||
opts
|
||||
)
|
||||
vim.api.nvim_set_keymap("n", "gi", "<cmd>lua require('telescope.builtin').lsp_implementations()<cr>", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>D", "<cmd>lua vim.diagnostic.goto_next { wrap = false }<cr>", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>b", "<cmd>Gitsigns blame_line<cr>", {silent = true})
|
||||
vim.api.nvim_set_keymap("", "q:", "<Nop>", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>h", "<Plug>RestNvim", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader><cr>", ":terminal<cr>i", {silent = true})
|
||||
vim.api.nvim_set_keymap("t", "<Esc>", "<C-\\><C-n>", {silent = true, noremap = true})
|
||||
vim.api.nvim_set_keymap("", "<A-Left>", "<C-w><Left>", {silent = true})
|
||||
vim.api.nvim_set_keymap("", "<A-Up>", "<C-w><Up>", {silent = true})
|
||||
vim.api.nvim_set_keymap("", "<A-Down>", "<C-w><Down>", {silent = true})
|
||||
vim.api.nvim_set_keymap("", "<A-Right>", "<C-w><Right>", {silent = true})
|
||||
vim.api.nvim_set_keymap("", "<C-p>", "<C-i>", {silent = true, noremap = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>i", "<cmd>!ocamlc -i -c %>%i<CR>", {silent = true})
|
||||
|
||||
local insert_random_uuid = function()
|
||||
local id, _ = vim.fn.system("uuidgen"):gsub("\n", ""):gsub("-", ""):upper()
|
||||
vim.api.nvim_put({id}, "c", true, true)
|
||||
end
|
||||
local insert_random_uuid_dashed = function()
|
||||
local id, _ = vim.fn.system("uuidgen"):gsub("\n", ""):upper()
|
||||
vim.api.nvim_put({id}, "c", true, true)
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>u", insert_random_uuid, {noremap = true, silent = true})
|
||||
vim.keymap.set("n", "<leader>U", insert_random_uuid_dashed, {noremap = true, silent = true})
|
||||
|
||||
local print_namespace = function()
|
||||
local cmd = 'bash -c "xq *.csproj -q RootNamespace"'
|
||||
-- insert namespace NAMESPACE.PATH.TO.FILE; at the start of the file
|
||||
local output = vim.fn.system(cmd):gsub("\n", "")
|
||||
local relative_path = vim.fn.expand("%:h")
|
||||
local short_path = relative_path:gsub("/", ".")
|
||||
local namespace = output .. "." .. short_path
|
||||
if relative_path == "." then
|
||||
namespace = output
|
||||
end
|
||||
vim.cmd [[normal! gg]]
|
||||
vim.cmd [[normal! }]]
|
||||
vim.cmd [[normal! o]]
|
||||
vim.api.nvim_put({"namespace " .. namespace .. ";"}, "c", true, true)
|
||||
vim.cmd [[normal! o]]
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>n", print_namespace, {silent = true})
|
||||
372
lua/plugins.lua
372
lua/plugins.lua
|
|
@ -1,372 +0,0 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system(
|
||||
{
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath
|
||||
}
|
||||
)
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup(
|
||||
{
|
||||
"wbthomason/packer.nvim",
|
||||
{
|
||||
"MasterGordon/monokai.nvim",
|
||||
-- dir = "$HOME/git/monokai.nvim",
|
||||
config = function()
|
||||
require("monokai").setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
config = function()
|
||||
require("plugins/icons")
|
||||
end
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/playground",
|
||||
dependencies = {"nvim-treesitter/nvim-treesitter"}
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require "plugins/treesitter"
|
||||
end,
|
||||
dependencies = {
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
"windwp/nvim-ts-autotag",
|
||||
"windwp/nvim-autopairs"
|
||||
}
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
after = "nvim-ts-context-commentstring",
|
||||
config = function()
|
||||
require("Comment").setup {
|
||||
pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
|
||||
mappings = {
|
||||
basic = true
|
||||
}
|
||||
}
|
||||
end
|
||||
},
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
bigfile = {enabled = true}
|
||||
}
|
||||
},
|
||||
{
|
||||
"mhartington/formatter.nvim",
|
||||
config = function()
|
||||
require "plugins/formatter"
|
||||
end
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "plugins/lsp"
|
||||
end,
|
||||
dependencies = {
|
||||
"nvimtools/none-ls.nvim",
|
||||
"davidmh/cspell.nvim",
|
||||
"RishabhRD/popfix",
|
||||
"onsails/lspkind-nvim",
|
||||
"ray-x/lsp_signature.nvim",
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
"hood/popui.nvim",
|
||||
"OmniSharp/omnisharp-vim",
|
||||
"yioneko/nvim-vtsls",
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
"seblj/roslyn.nvim",
|
||||
"blink.cmp"
|
||||
}
|
||||
},
|
||||
{
|
||||
"luckasRanarison/tailwind-tools.nvim",
|
||||
dependencies = {"nvim-treesitter/nvim-treesitter"},
|
||||
opts = {
|
||||
server = {
|
||||
override = false
|
||||
},
|
||||
document_color = {
|
||||
enabled = true, -- can be toggled by commands
|
||||
kind = "inline", -- "inline" | "foreground" | "background"
|
||||
inline_symbol = " ", -- only used in inline mode
|
||||
debounce = 200 -- in milliseconds, only applied in insert mode
|
||||
},
|
||||
conceal = {
|
||||
enabled = false, -- can be toggled by commands
|
||||
min_length = nil, -- only conceal classes exceeding the provided length
|
||||
symbol = "", -- only a single character is allowed
|
||||
highlight = {
|
||||
-- extmark highlight options, see :h 'highlight'
|
||||
fg = "#38BDF8"
|
||||
}
|
||||
},
|
||||
custom_filetypes = {} -- see the extension section to learn how it works
|
||||
} -- your configuration
|
||||
},
|
||||
{
|
||||
"OXY2DEV/markview.nvim",
|
||||
lazy = false, -- Recommended
|
||||
-- ft = "markdown" -- If you decide to lazy-load anyway
|
||||
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-tree/nvim-web-devicons"
|
||||
},
|
||||
config = function()
|
||||
require("markview").setup(
|
||||
{
|
||||
hybrid_modes = {"n"}
|
||||
}
|
||||
)
|
||||
end
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
config = function()
|
||||
require("plugins/telescope")
|
||||
end,
|
||||
dependencies = {
|
||||
"nvim-lua/popup.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope-ui-select.nvim"
|
||||
}
|
||||
},
|
||||
{
|
||||
"uga-rosa/ccc.nvim",
|
||||
config = function()
|
||||
require("ccc").setup(
|
||||
{
|
||||
highlighter = {
|
||||
auto_enable = true,
|
||||
lsp = true
|
||||
}
|
||||
}
|
||||
)
|
||||
end
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = "nvim-lua/plenary.nvim",
|
||||
config = function()
|
||||
require("todo-comments").setup {}
|
||||
end
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
config = function()
|
||||
require("gitsigns").setup()
|
||||
end
|
||||
},
|
||||
"editorconfig/editorconfig-vim",
|
||||
-- {
|
||||
-- "hrsh7th/nvim-cmp",
|
||||
-- config = function()
|
||||
-- require("plugins/cmp")
|
||||
-- end,
|
||||
-- dependencies = {
|
||||
-- "hrsh7th/cmp-buffer",
|
||||
-- "hrsh7th/cmp-nvim-lsp",
|
||||
-- "hrsh7th/cmp-path",
|
||||
-- "hrsh7th/cmp-nvim-lua",
|
||||
-- "hrsh7th/cmp-emoji",
|
||||
-- "David-Kunz/cmp-npm",
|
||||
-- "hrsh7th/cmp-nvim-lsp-signature-help",
|
||||
-- "saadparwaiz1/cmp_luasnip"
|
||||
-- }
|
||||
-- },
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
lazy = false, -- lazy loading handled internally
|
||||
-- optional: provides snippets for the snippet source
|
||||
dependencies = "rafamadriz/friendly-snippets",
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = "v0.*",
|
||||
-- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
|
||||
-- build = 'cargo build --release',
|
||||
-- If you use nix, you can build from source using latest nightly rust with:
|
||||
-- build = 'nix run .#build-plugin',
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
-- 'default' for mappings similar to built-in completion
|
||||
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
|
||||
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
|
||||
-- see the "default configuration" section below for full documentation on how to define
|
||||
-- your own keymap.
|
||||
keymap = {
|
||||
preset = "enter",
|
||||
["<C-f>"] = {"show", "show_documentation", "hide_documentation"}
|
||||
},
|
||||
appearance = {
|
||||
-- sets the fallback highlight groups to nvim-cmp's highlight groups
|
||||
-- useful for when your theme doesn't support blink.cmp
|
||||
-- will be removed in a future release, assuming themes add support
|
||||
use_nvim_cmp_as_default = true,
|
||||
nerd_font_variant = "mono"
|
||||
},
|
||||
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||
-- adjusts spacing to ensure icons are aligned
|
||||
completion = {
|
||||
menu = {
|
||||
max_height = 20
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true
|
||||
}
|
||||
},
|
||||
sources = {
|
||||
cmdline = {}
|
||||
}
|
||||
|
||||
-- experimental auto-brackets support
|
||||
-- accept = { auto_brackets = { enabled = true } }
|
||||
|
||||
-- experimental signature help support
|
||||
-- trigger = { signature_help = { enabled = true } }
|
||||
},
|
||||
-- allows extending the enabled_providers array elsewhere in your config
|
||||
-- without having to redefining it
|
||||
opts_extend = {"sources.completion.enabled_providers"}
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
version = "v2.*",
|
||||
build = "make install_jsregexp"
|
||||
},
|
||||
{
|
||||
"saecki/crates.nvim",
|
||||
event = {"BufRead Cargo.toml"},
|
||||
dependencies = {{"nvim-lua/plenary.nvim"}},
|
||||
config = function()
|
||||
require("crates").setup()
|
||||
end
|
||||
},
|
||||
"aklt/plantuml-syntax",
|
||||
-- {
|
||||
-- "github/copilot.vim",
|
||||
-- config = function()
|
||||
-- require("plugins/copilot")
|
||||
-- end
|
||||
-- },
|
||||
{
|
||||
"supermaven-inc/supermaven-nvim",
|
||||
config = function()
|
||||
if not (vim.fn.has_key(vim.fn.environ(), "LOAD_SUPERMAVEN") == 0) then
|
||||
require("supermaven-nvim").setup({})
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
"ggandor/lightspeed.nvim",
|
||||
dependencies = {"tpope/vim-repeat"}
|
||||
},
|
||||
"jghauser/mkdir.nvim",
|
||||
{
|
||||
"David-Kunz/cmp-npm",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim"
|
||||
}
|
||||
},
|
||||
{
|
||||
"rebelot/heirline.nvim",
|
||||
config = function()
|
||||
require "plugins/heirline"
|
||||
end,
|
||||
dependencies = {
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"j-hui/fidget.nvim",
|
||||
"monokai.nvim",
|
||||
"nvim-lspconfig"
|
||||
}
|
||||
},
|
||||
"isobit/vim-caddyfile",
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
config = function()
|
||||
require("plugins/neotest")
|
||||
end,
|
||||
event = {"BufRead *.test.*,*.spec.*,*Test.*,*.zig"},
|
||||
dependencies = {
|
||||
"lawrence-laz/neotest-zig",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
"haydenmeade/neotest-jest",
|
||||
"monokai.nvim"
|
||||
}
|
||||
},
|
||||
{
|
||||
"andweeb/presence.nvim",
|
||||
config = function()
|
||||
require("presence"):setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
config = function()
|
||||
require("plugins/dap")
|
||||
end,
|
||||
dependencies = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"}
|
||||
},
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "main",
|
||||
config = function()
|
||||
require("plugins/neo-tree")
|
||||
end,
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"kyazdani42/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
"s1n7ax/nvim-window-picker",
|
||||
"monokai.nvim"
|
||||
}
|
||||
},
|
||||
{
|
||||
"luukvbaal/statuscol.nvim",
|
||||
config = function()
|
||||
require("statuscol").setup(
|
||||
{
|
||||
-- setopt = true,
|
||||
ft_ignore = {"neo-tree"}
|
||||
}
|
||||
)
|
||||
end
|
||||
},
|
||||
{
|
||||
"axelvc/template-string.nvim",
|
||||
config = function()
|
||||
require("template-string").setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"hedyhli/outline.nvim",
|
||||
config = function()
|
||||
-- Example mapping to toggle outline
|
||||
vim.keymap.set("n", "<leader>o", "<cmd>Outline<CR>", {desc = "Toggle Outline"})
|
||||
|
||||
require("outline").setup {}
|
||||
end
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
return {
|
||||
'saghen/blink.cmp',
|
||||
dependencies = { 'rafamadriz/friendly-snippets' },
|
||||
version = '1.*',
|
||||
build = 'cargo build --release',
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
keymap = {
|
||||
preset = 'enter',
|
||||
['<C-f>'] = { 'show', 'show_documentation', 'hide_documentation' },
|
||||
},
|
||||
|
||||
appearance = {
|
||||
nerd_font_variant = 'mono',
|
||||
},
|
||||
|
||||
completion = {
|
||||
documentation = { auto_show = true },
|
||||
menu = {
|
||||
max_height = 24,
|
||||
},
|
||||
},
|
||||
|
||||
-- Default list of enabled providers defined so that you can extend it
|
||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
||||
},
|
||||
cmdline = {
|
||||
enabled = false,
|
||||
},
|
||||
fuzzy = { implementation = 'prefer_rust_with_warning' },
|
||||
enabled = function()
|
||||
return not vim.tbl_contains({ 'sagarename' }, vim.bo.filetype)
|
||||
end,
|
||||
},
|
||||
opts_extend = { 'sources.default' },
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
'uga-rosa/ccc.nvim',
|
||||
config = function()
|
||||
require('ccc').setup({
|
||||
highlighter = {
|
||||
auto_enable = true,
|
||||
lsp = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
local cmp = require "cmp"
|
||||
require("cmp-npm").setup({})
|
||||
|
||||
local cmp_kinds = {
|
||||
Text = " ",
|
||||
Method = " ",
|
||||
Function = " ",
|
||||
Constructor = " ",
|
||||
Field = " ",
|
||||
Variable = " ",
|
||||
Class = " ",
|
||||
Interface = " ",
|
||||
Module = " ",
|
||||
Property = " ",
|
||||
Unit = " ",
|
||||
Value = " ",
|
||||
Enum = " ",
|
||||
Keyword = " ",
|
||||
Snippet = " ",
|
||||
Color = " ",
|
||||
File = " ",
|
||||
Reference = " ",
|
||||
Folder = " ",
|
||||
EnumMember = " ",
|
||||
Constant = " ",
|
||||
Struct = " ",
|
||||
Event = " ",
|
||||
Operator = " ",
|
||||
TypeParameter = " ",
|
||||
Copilot = " "
|
||||
}
|
||||
|
||||
options = {
|
||||
confirm_opts = {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = true,
|
||||
native_menu = false
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require "luasnip".lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
formatting = {
|
||||
kind_icons = cmp_kinds,
|
||||
source_names = {
|
||||
nvim_lsp = "",
|
||||
emoji = "",
|
||||
path = "(Path)",
|
||||
calc = "(Calc)",
|
||||
cmp_tabnine = "(Tabnine)",
|
||||
vsnip = "(Snippet)",
|
||||
luasnip = "(Snippet)",
|
||||
buffer = "(Buffer)"
|
||||
},
|
||||
duplicates = {
|
||||
buffer = 1,
|
||||
path = 1,
|
||||
nvim_lsp = 0,
|
||||
luasnip = 1
|
||||
},
|
||||
duplicates_default = 0,
|
||||
format = function(entry, vim_item)
|
||||
vim_item.kind = options.formatting.kind_icons[vim_item.kind] .. " " .. vim_item.kind
|
||||
vim_item.menu = options.formatting.source_names[entry.source.name]
|
||||
vim_item.dup = options.formatting.duplicates[entry.source.name] or options.formatting.duplicates_default
|
||||
return vim_item
|
||||
end,
|
||||
fields = {"abbr", "kind", "menu"}
|
||||
--[[ format = function(_, vim_item)
|
||||
vim_item.kind = cmp_kinds[vim_item.kind] or ""
|
||||
return vim_item
|
||||
end ]]
|
||||
},
|
||||
mapping = {
|
||||
["<C-f>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
["<CR>"] = cmp.mapping.confirm({select = true}),
|
||||
["<Up>"] = cmp.mapping.select_prev_item(),
|
||||
["<Down>"] = cmp.mapping.select_next_item()
|
||||
},
|
||||
sources = {
|
||||
{name = "nvim_lsp"},
|
||||
{name = "path"},
|
||||
{name = "luasnip"},
|
||||
{name = "nvim_lua"},
|
||||
-- {name = "buffer"},
|
||||
{name = "emoji"},
|
||||
{name = "copilot", group_index = 2},
|
||||
{name = "npm", keyword_length = 4},
|
||||
{name = "nvim_lsp_signature_help"}
|
||||
}
|
||||
}
|
||||
|
||||
cmp.setup(options)
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
return {
|
||||
'stevearc/conform.nvim',
|
||||
event = { 'BufWritePre' },
|
||||
cmd = { 'ConformInfo' },
|
||||
keys = {
|
||||
{
|
||||
-- Customize or remove this keymap to your liking
|
||||
'<leader>f',
|
||||
function()
|
||||
require('conform').format({ async = true })
|
||||
end,
|
||||
mode = '',
|
||||
desc = 'Format buffer',
|
||||
},
|
||||
},
|
||||
-- This will provide type hinting with LuaLS
|
||||
---@module "conform"
|
||||
---@type conform.setupOpts
|
||||
opts = {
|
||||
-- Define your formatters
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
javascript = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
javascriptreact = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
typescript = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
typescriptreact = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
css = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
scss = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
json = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
jsonc = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
markdown = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
cs = { 'astyle' },
|
||||
php = { 'php_cs_fixer' },
|
||||
go = { 'gofmt' },
|
||||
},
|
||||
-- Set default options
|
||||
default_format_opts = {
|
||||
lsp_format = 'fallback',
|
||||
},
|
||||
-- Set up format-on-save
|
||||
format_on_save = { timeout_ms = 500 },
|
||||
-- Customize formatters
|
||||
formatters = {
|
||||
shfmt = {
|
||||
prepend_args = { '-i', '2' },
|
||||
},
|
||||
astyle = {
|
||||
prepend_args = { '--style=java', '--max-code-length=80', '--squeeze-ws' },
|
||||
},
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
-- If you want the formatexpr, here is the place to set it
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
vim.g.copilot_enabled = true
|
||||
-- Map Ctrl-Enter to copilot#Accept
|
||||
-- vim.cmd(":Copilot disable>")
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
-- dapui
|
||||
require("dapui").setup(
|
||||
{
|
||||
controls = {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
)
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
|
||||
-- C#
|
||||
dap.adapters.coreclr = {
|
||||
type = "executable",
|
||||
command = "netcoredbg",
|
||||
args = {"--interpreter=vscode"}
|
||||
}
|
||||
|
||||
vim.g.dotnet_build_project = function()
|
||||
local default_path = vim.fn.getcwd() .. "/"
|
||||
if vim.g["dotnet_last_proj_path"] ~= nil then
|
||||
default_path = vim.g["dotnet_last_proj_path"]
|
||||
end
|
||||
local cmd = "dotnet build -c Debug > /dev/null"
|
||||
print("")
|
||||
print("Cmd to execute: " .. cmd)
|
||||
local f = os.execute(cmd)
|
||||
if f == 0 then
|
||||
print("\nBuild: ✔️ ")
|
||||
else
|
||||
print("\nBuild: ❌ (code: " .. f .. ")")
|
||||
end
|
||||
end
|
||||
|
||||
vim.g.dotnet_get_dll_path = function()
|
||||
local cwd = vim.fn.getcwd()
|
||||
local solution = vim.fn.glob(cwd .. "/*.csproj")
|
||||
local projectName = vim.fn.fnamemodify(solution, ":t:r")
|
||||
local dll = cwd .. "/bin/Debug/net7.0/linux-x64/" .. projectName .. ".dll"
|
||||
return dll
|
||||
end
|
||||
|
||||
local config = {
|
||||
{
|
||||
type = "coreclr",
|
||||
name = "launch - netcoredbg",
|
||||
request = "launch",
|
||||
program = function()
|
||||
if vim.fn.confirm("Should I recompile first?", "&yes\n&no", 2) == 1 then
|
||||
vim.g.dotnet_build_project()
|
||||
end
|
||||
return vim.g.dotnet_get_dll_path()
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
dap.configurations.cs = config
|
||||
|
||||
-- keybindings
|
||||
local api = vim.api
|
||||
local keymap_restore = {}
|
||||
dap.listeners.after["event_initialized"]["me"] = function()
|
||||
for _, buf in pairs(api.nvim_list_bufs()) do
|
||||
local keymaps = api.nvim_buf_get_keymap(buf, "n")
|
||||
for _, keymap in pairs(keymaps) do
|
||||
if keymap.lhs == "K" then
|
||||
table.insert(keymap_restore, keymap)
|
||||
api.nvim_buf_del_keymap(buf, "n", "K")
|
||||
end
|
||||
end
|
||||
end
|
||||
api.nvim_set_keymap("n", "K", '<Cmd>lua require("dap.ui.widgets").hover()<CR>', {silent = true})
|
||||
end
|
||||
|
||||
dap.listeners.after["event_terminated"]["me"] = function()
|
||||
for _, keymap in pairs(keymap_restore) do
|
||||
api.nvim_buf_set_keymap(keymap.buffer, keymap.mode, keymap.lhs, keymap.rhs, {silent = keymap.silent == 1})
|
||||
end
|
||||
keymap_restore = {}
|
||||
end
|
||||
api.nvim_set_keymap("n", "<leader>B", ":lua require'dap'.toggle_breakpoint()<CR>", {noremap = true, silent = true})
|
||||
api.nvim_set_keymap("n", "<f5>", ":lua require'dap'.continue()<CR>", {noremap = true, silent = true})
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
local cb = require "diffview.config".diffview_callback
|
||||
|
||||
require "diffview".setup {
|
||||
diff_binaries = false, -- Show diffs for binaries
|
||||
use_icons = true, -- Requires nvim-web-devicons
|
||||
key_bindings = {
|
||||
disable_defaults = false, -- Disable the default key bindings
|
||||
-- The `view` bindings are active in the diff buffers, only when the current
|
||||
-- tabpage is a Diffview.
|
||||
view = {
|
||||
["<tab>"] = cb("select_next_entry"), -- Open the diff for the next file
|
||||
["<s-tab>"] = cb("select_prev_entry"), -- Open the diff for the previous file
|
||||
["<leader>e"] = cb("focus_files"), -- Bring focus to the files panel
|
||||
["<leader>b"] = cb("toggle_files") -- Toggle the files panel.
|
||||
},
|
||||
file_panel = {
|
||||
["j"] = cb("next_entry"), -- Bring the cursor to the next file entry
|
||||
["<down>"] = cb("next_entry"),
|
||||
["k"] = cb("prev_entry"), -- Bring the cursor to the previous file entry.
|
||||
["<up>"] = cb("prev_entry"),
|
||||
["<cr>"] = cb("select_entry"), -- Open the diff for the selected entry.
|
||||
["o"] = cb("select_entry"),
|
||||
["<2-LeftMouse>"] = cb("select_entry"),
|
||||
["-"] = cb("toggle_stage_entry"), -- Stage / unstage the selected entry.
|
||||
["S"] = cb("stage_all"), -- Stage all entries.
|
||||
["U"] = cb("unstage_all"), -- Unstage all entries.
|
||||
["R"] = cb("refresh_files"), -- Update stats and entries in the file list.
|
||||
["<tab>"] = cb("select_next_entry"),
|
||||
["<s-tab>"] = cb("select_prev_entry"),
|
||||
["<leader>e"] = cb("focus_files"),
|
||||
["<leader>b"] = cb("toggle_files")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<leader>g", ":DiffviewOpen<CR>", {silent = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>G", ":DiffviewClose<CR>", {silent = true})
|
||||
|
|
@ -1,137 +0,0 @@
|
|||
local prettierd = function()
|
||||
return {
|
||||
exe = "prettierd",
|
||||
args = {"'" .. vim.api.nvim_buf_get_name(0) .. "'"},
|
||||
stdin = true
|
||||
}
|
||||
end
|
||||
|
||||
require("formatter").setup(
|
||||
{
|
||||
logging = false,
|
||||
filetype = {
|
||||
typescriptreact = {prettierd},
|
||||
json = {prettierd},
|
||||
jsonc = {prettierd},
|
||||
css = {prettierd},
|
||||
scss = {prettierd},
|
||||
markdown = {prettierd},
|
||||
typescript = {prettierd},
|
||||
javascript = {prettierd},
|
||||
javascriptreact = {prettierd},
|
||||
lua = {
|
||||
-- luafmt
|
||||
function()
|
||||
return {
|
||||
exe = "luafmt",
|
||||
args = {"--indent-count", 2, "--stdin"},
|
||||
stdin = true
|
||||
}
|
||||
end
|
||||
},
|
||||
rust = {
|
||||
function()
|
||||
return {
|
||||
exe = "rustfmt",
|
||||
args = {"--emit=stdout", "--edition=2021"},
|
||||
stdin = true
|
||||
}
|
||||
end
|
||||
},
|
||||
cpp = {
|
||||
function()
|
||||
return {
|
||||
exe = "clang-format",
|
||||
args = {"'" .. vim.api.nvim_buf_get_name(0) .. "'"},
|
||||
stdin = true
|
||||
}
|
||||
end
|
||||
},
|
||||
prisma = {
|
||||
function()
|
||||
return {
|
||||
exe = "npx",
|
||||
args = {"prisma", "format", "--schema=" .. vim.api.nvim_buf_get_name(0)},
|
||||
stdin = false
|
||||
}
|
||||
end
|
||||
},
|
||||
swift = {
|
||||
function()
|
||||
return {
|
||||
exe = "swift-format",
|
||||
stdin = true
|
||||
}
|
||||
end
|
||||
},
|
||||
xml = {
|
||||
function()
|
||||
return {
|
||||
exe = "xmllint",
|
||||
args = {"--format", "-"},
|
||||
stdin = true
|
||||
}
|
||||
end
|
||||
},
|
||||
cs = {
|
||||
function()
|
||||
return {
|
||||
exe = "dotnet-csharpier",
|
||||
args = {"--write-stdout"},
|
||||
stdin = true
|
||||
}
|
||||
end
|
||||
},
|
||||
-- ocaml
|
||||
ocaml = {
|
||||
function()
|
||||
return {
|
||||
exe = "ocamlformat",
|
||||
args = {"--name", vim.api.nvim_buf_get_name(0), "-"},
|
||||
stdin = true
|
||||
}
|
||||
end
|
||||
},
|
||||
php = {
|
||||
function()
|
||||
return {
|
||||
exe = "vendor/bin/php-cs-fixer",
|
||||
args = {
|
||||
"fix"
|
||||
},
|
||||
stdin = false,
|
||||
ignore_exitcode = true
|
||||
}
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
vim.api.nvim_exec(
|
||||
[[
|
||||
augroup FormatAutogroup
|
||||
autocmd!
|
||||
autocmd BufWritePost *.cs,*.h,*.cpp,*.rs,*.lua,*.tsx,*.ts,*.js,*.jsx,*.json,*.jsonc,*.swift,*.xml,*.sln,*.csproj,*.ml,*.php FormatWrite
|
||||
augroup END
|
||||
]],
|
||||
true
|
||||
)
|
||||
-- local formatGrp = vim.api.nvim_create_augroup("Format", {clear = true})
|
||||
-- vim.api.nvim_create_autocmd(
|
||||
-- "BufWritePre",
|
||||
-- {
|
||||
-- pattern = "*.php",
|
||||
-- command = "lua vim.lsp.buf.format { async = false }",
|
||||
-- group = formatGrp
|
||||
-- }
|
||||
-- )
|
||||
|
||||
-- local function organize_imports()
|
||||
-- local params = {
|
||||
-- command = "typescript.organizeImports",
|
||||
-- arguments = {vim.api.nvim_buf_get_name(0)},
|
||||
-- title = ""
|
||||
-- }
|
||||
-- vim.lsp.buf.execute_command(params)
|
||||
-- end
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
---@diagnostic disable-next-line: missing-fields
|
||||
local colors = require('tokyonight.colors').setup({
|
||||
style = 'night',
|
||||
})
|
||||
local utils = require('heirline.utils')
|
||||
|
||||
local TablineFileName = {
|
||||
provider = function(self)
|
||||
-- self.filename will be defined later, just keep looking at the example!
|
||||
local filename = self.filename
|
||||
filename = filename == '' and '[No Name]' or vim.fn.fnamemodify(filename, ':t')
|
||||
return filename
|
||||
end,
|
||||
hl = function(self)
|
||||
return { bold = self.is_active or self.is_visible, italic = true }
|
||||
end,
|
||||
}
|
||||
|
||||
local TablineFileFlags = {
|
||||
{
|
||||
provider = function(self)
|
||||
if vim.bo[self.bufnr].modified then
|
||||
return ' [+]'
|
||||
end
|
||||
end,
|
||||
hl = { fg = colors.green },
|
||||
},
|
||||
{
|
||||
provider = function(self)
|
||||
if not vim.bo[self.bufnr].modifiable or vim.bo[self.bufnr].readonly then
|
||||
return ' '
|
||||
end
|
||||
end,
|
||||
hl = { fg = 'orange' },
|
||||
},
|
||||
}
|
||||
|
||||
local diag_signs = vim.diagnostic.config().signs.text or {}
|
||||
local TablineDiagnostics = {
|
||||
static = {
|
||||
error_icon = diag_signs[1],
|
||||
warn_icon = diag_signs[2],
|
||||
info_icon = diag_signs[3],
|
||||
hint_icon = diag_signs[4],
|
||||
},
|
||||
init = function(self)
|
||||
self.errors = #vim.diagnostic.get(self.bufnr, { severity = vim.diagnostic.severity.ERROR })
|
||||
self.warnings = #vim.diagnostic.get(self.bufnr, { severity = vim.diagnostic.severity.WARN })
|
||||
self.hints = #vim.diagnostic.get(self.bufnr, { severity = vim.diagnostic.severity.HINT })
|
||||
self.info = #vim.diagnostic.get(self.bufnr, { severity = vim.diagnostic.severity.INFO })
|
||||
self.has_diags = self.errors > 0 or self.warnings > 0 or self.hints > 0 or self.info > 0
|
||||
end,
|
||||
{
|
||||
provider = function(self)
|
||||
return self.has_diags and ' '
|
||||
end,
|
||||
},
|
||||
{
|
||||
provider = function(self)
|
||||
local has_next = self.warnings > 0 or self.info > 0 or self.hints > 0
|
||||
return self.errors > 0 and (self.error_icon .. self.errors .. (has_next and ' ' or ''))
|
||||
end,
|
||||
hl = { fg = colors.error },
|
||||
},
|
||||
{
|
||||
provider = function(self)
|
||||
local has_next = self.info > 0 or self.hints > 0
|
||||
return self.warnings > 0 and (self.warn_icon .. self.warnings .. (has_next and ' ' or ''))
|
||||
end,
|
||||
hl = { fg = colors.warning },
|
||||
},
|
||||
{
|
||||
provider = function(self)
|
||||
local has_next = self.hints > 0
|
||||
return self.info > 0 and (self.info_icon .. self.info .. (has_next and ' ' or ''))
|
||||
end,
|
||||
hl = { fg = colors.info },
|
||||
},
|
||||
{
|
||||
provider = function(self)
|
||||
return self.hints > 0 and (self.hint_icon .. self.hints)
|
||||
end,
|
||||
hl = { fg = colors.hint },
|
||||
},
|
||||
}
|
||||
|
||||
local TablineFileIcon = {
|
||||
init = function(self)
|
||||
local filename = self.filename
|
||||
local extension = vim.fn.fnamemodify(filename, ':e')
|
||||
self.icon, self.icon_color = require('nvim-web-devicons').get_icon_color(filename, extension, { default = true })
|
||||
end,
|
||||
provider = function(self)
|
||||
return self.icon and (' ' .. self.icon .. ' ')
|
||||
end,
|
||||
hl = function(self)
|
||||
return { fg = self.icon_color }
|
||||
end,
|
||||
}
|
||||
|
||||
-- Here the filename block finally comes together
|
||||
local TablineFileNameBlock = {
|
||||
init = function(self)
|
||||
self.filename = vim.api.nvim_buf_get_name(self.bufnr)
|
||||
end,
|
||||
hl = function(self)
|
||||
if self.is_active then
|
||||
return 'TabLineSel'
|
||||
else
|
||||
return 'TabLine'
|
||||
end
|
||||
end,
|
||||
on_click = {
|
||||
callback = function(_, minwid, _, button)
|
||||
if button == 'm' then -- close on mouse middle click
|
||||
vim.api.nvim_buf_delete(minwid, { force = true })
|
||||
else
|
||||
vim.api.nvim_win_set_buf(0, minwid)
|
||||
end
|
||||
end,
|
||||
minwid = function(self)
|
||||
return self.bufnr
|
||||
end,
|
||||
name = 'heirline_tabline_buffer_callback',
|
||||
},
|
||||
TablineFileIcon,
|
||||
TablineFileName,
|
||||
TablineFileFlags,
|
||||
TablineDiagnostics,
|
||||
}
|
||||
|
||||
-- a nice "x" button to close the buffer
|
||||
local TablineCloseButton = {
|
||||
condition = function(self)
|
||||
return not vim.bo[self.bufnr].modified
|
||||
end,
|
||||
{ provider = ' ' },
|
||||
{
|
||||
provider = '',
|
||||
hl = { fg = 'gray' },
|
||||
on_click = {
|
||||
callback = function(_, minwid)
|
||||
vim.api.nvim_buf_delete(minwid, { force = false })
|
||||
end,
|
||||
minwid = function(self)
|
||||
return self.bufnr
|
||||
end,
|
||||
name = 'heirline_tabline_close_buffer_callback',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- The final touch!
|
||||
local TablineBufferBlock = {
|
||||
{
|
||||
hl = function(self)
|
||||
if self.is_active then
|
||||
return { fg = colors.dark3, bg = utils.get_highlight('TabLineSel').bg }
|
||||
else
|
||||
return { fg = colors.dark3, bg = utils.get_highlight('TabLine').bg }
|
||||
end
|
||||
end,
|
||||
provider = '',
|
||||
},
|
||||
TablineFileNameBlock,
|
||||
utils.surround({ '', '' }, function(self)
|
||||
if self.is_active then
|
||||
return utils.get_highlight('TabLineSel').bg
|
||||
else
|
||||
return utils.get_highlight('TabLine').bg
|
||||
end
|
||||
end, TablineCloseButton),
|
||||
{
|
||||
hl = function(self)
|
||||
if self.is_active then
|
||||
return { fg = colors.dark3, bg = utils.get_highlight('TabLineSel').bg }
|
||||
else
|
||||
return { fg = colors.dark3, bg = utils.get_highlight('TabLine').bg }
|
||||
end
|
||||
end,
|
||||
provider = '▐',
|
||||
},
|
||||
}
|
||||
|
||||
-- and here we go
|
||||
local BufferLine = utils.make_buflist(
|
||||
TablineBufferBlock,
|
||||
{ provider = '', hl = { fg = 'gray' } }, -- left truncation, optional (defaults to "<")
|
||||
{ provider = '', hl = { fg = 'gray' } } -- right trunctation, also optional (defaults to ...... yep, ">")
|
||||
-- by the way, open a lot of buffers and try clicking them ;)
|
||||
)
|
||||
|
||||
return BufferLine
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,52 +0,0 @@
|
|||
require("nvim-web-devicons").set_icon {
|
||||
["test.ts"] = {
|
||||
icon = "",
|
||||
color = "#519aba",
|
||||
name = "TsTest"
|
||||
},
|
||||
["test.tsx"] = {
|
||||
icon = "",
|
||||
color = "#519aba",
|
||||
name = "TsTest"
|
||||
},
|
||||
["test.js"] = {
|
||||
icon = "",
|
||||
color = "#cbcb41",
|
||||
name = "JsTest"
|
||||
},
|
||||
["test.jsx"] = {
|
||||
icon = "",
|
||||
color = "#cbcb41",
|
||||
name = "JsTest"
|
||||
},
|
||||
["readme.md"] = {
|
||||
icon = "",
|
||||
color = "#42A5F5",
|
||||
name = "Readme"
|
||||
},
|
||||
["package.json"] = {
|
||||
icon = "",
|
||||
color = "#8BC34A",
|
||||
name = "PackageJson"
|
||||
},
|
||||
["package-lock.json"] = {
|
||||
icon = "",
|
||||
color = "#8BC34A",
|
||||
name = "PackageJson"
|
||||
},
|
||||
["tsconfig.json"] = {
|
||||
icon = "",
|
||||
color = "#0288D1",
|
||||
name = "TsConfig"
|
||||
},
|
||||
["prisma"] = {
|
||||
icon = "",
|
||||
color = "#FFFFFF",
|
||||
name = "Prisma"
|
||||
},
|
||||
["jar"] = {
|
||||
icon = "",
|
||||
color = "#FFFFFF",
|
||||
name = "Jar"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,285 +1,155 @@
|
|||
local util = require "lspconfig.util"
|
||||
|
||||
vim.fn.sign_define("DiagnosticSignError", {text = " ", texthl = "DiagnosticSignError"})
|
||||
vim.fn.sign_define("DiagnosticSignWarn", {text = " ", texthl = "DiagnosticSignWarn"})
|
||||
vim.fn.sign_define("DiagnosticSignInfo", {text = " ", texthl = "DiagnosticSignInfo"})
|
||||
vim.fn.sign_define("DiagnosticSignHint", {text = " ", texthl = "DiagnosticSignHint"})
|
||||
vim.fn.sign_define("DapBreakpoint", {text = " ", texthl = "DiagnosticSignError"})
|
||||
vim.fn.sign_define("DapStopped", {text = " ", texthl = "DiagnosticSignInfo"})
|
||||
|
||||
-- vim.ui.select = require "popui.ui-overrider"
|
||||
vim.ui.input = require "popui.input-overrider"
|
||||
|
||||
-- common servers
|
||||
local common_servers = {
|
||||
"pyright",
|
||||
"bashls",
|
||||
"clangd",
|
||||
"cssls",
|
||||
"texlab",
|
||||
"prismals",
|
||||
"solidity",
|
||||
"zls",
|
||||
-- "gleam",
|
||||
"intelephense",
|
||||
"lua_ls",
|
||||
"html",
|
||||
"vimls",
|
||||
"yamlls",
|
||||
"ocamllsp"
|
||||
}
|
||||
local extra_servers = {
|
||||
"vtsls",
|
||||
"eslint",
|
||||
"jsonls",
|
||||
"rust_analyzer",
|
||||
"tailwindcss"
|
||||
}
|
||||
|
||||
-- Ensure that required tools are installed
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup(
|
||||
{
|
||||
ensure_installed = vim.tbl_extend("force", common_servers, extra_servers)
|
||||
}
|
||||
)
|
||||
require("mason-null-ls").setup(
|
||||
{
|
||||
ensure_installed = {"cspell"}
|
||||
}
|
||||
)
|
||||
|
||||
--- Completion Icons
|
||||
require("lspkind").init({})
|
||||
|
||||
--- Null-LS
|
||||
|
||||
local cspell = require("cspell")
|
||||
require("null-ls").setup(
|
||||
{
|
||||
sources = {
|
||||
cspell.code_actions,
|
||||
cspell.diagnostics.with(
|
||||
{
|
||||
diagnostics_postprocess = function(diagnostic)
|
||||
diagnostic.severity = vim.diagnostic.severity["WARN"]
|
||||
end
|
||||
}
|
||||
)
|
||||
-- require("typescript.extensions.null-ls.code-actions")
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
-- local lsp = require "lspconfig"
|
||||
-- vim.lsp.start(
|
||||
-- {
|
||||
-- cmd = {"bun", "/home/gordon/git/lsp/index.ts", "--stdio"},
|
||||
-- filetypes = {"typescript"},
|
||||
-- name = "blacklist",
|
||||
-- root_dir = vim.fn.getcwd()
|
||||
-- }
|
||||
-- )
|
||||
|
||||
--- Languages
|
||||
local nvim_lsp = require("lspconfig")
|
||||
|
||||
local function codeAction()
|
||||
-- if vim.bo.filetype == "cs" then
|
||||
vim.lsp.buf.code_action()
|
||||
-- else
|
||||
-- vim.cmd [[CodeActionMenu]]
|
||||
-- end
|
||||
end
|
||||
|
||||
-- Mappings.
|
||||
local opts = {noremap = true, silent = true}
|
||||
vim.api.nvim_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "gs", "<Cmd>VtsExec goto_source_definition<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<space>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<space>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<space>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", opts)
|
||||
-- buf_set_keymap("n", "<leader>t", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<F2>", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
|
||||
-- vim.api.nvim_set_keymap("n", "<leader>a", "<cmd>CodeActionMenu<CR>", opts)
|
||||
vim.keymap.set("n", "<leader>a", codeAction, opts)
|
||||
vim.keymap.set("v", "<leader>a", codeAction, opts)
|
||||
|
||||
-- vim.keymap.set("n", "<leader>a", '<cmd>lua require("fastaction").code_action()<CR>', {buffer = bufnr})
|
||||
-- vim.keymap.set("v", "<leader>a", "<esc><cmd>lua require('fastaction').range_code_action()<CR>", {buffer = bufnr})
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<leader>d", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "[d", "<cmd>lua vim.diagnostic.goto_prev()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<space>q", "<cmd>lua vim.diagnostic.set_loclist()<CR>", opts)
|
||||
local on_attach = function(client, bufnr)
|
||||
local function buf_set_keymap(...)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, ...)
|
||||
end
|
||||
local function buf_set_option(...)
|
||||
vim.api.nvim_buf_set_option(bufnr, ...)
|
||||
end
|
||||
end
|
||||
-- local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
local capabilities = require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
|
||||
require "lspconfig".jsonls.setup {
|
||||
on_attach = on_attach,
|
||||
flags = {
|
||||
debounce_text_changes = 150
|
||||
},
|
||||
settings = {
|
||||
json = require "json-schema"
|
||||
},
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
require("lspconfig.configs").vtsls = require("vtsls").lspconfig
|
||||
|
||||
require("lspconfig").vtsls.setup(
|
||||
{
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
vtsls = {
|
||||
autoUseWorkspaceTsdk = true
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
require "lspconfig".eslint.setup {
|
||||
on_attach = on_attach,
|
||||
root_dir = util.root_pattern(
|
||||
".eslintrc",
|
||||
".eslintrc.js",
|
||||
".eslintrc.cjs",
|
||||
".eslintrc.yaml",
|
||||
".eslintrc.yml",
|
||||
".eslintrc.json",
|
||||
"eslint.config.js",
|
||||
"eslint.config.mjs",
|
||||
"eslint.config.cjs",
|
||||
"eslint.config.yaml",
|
||||
"eslint.config.yml",
|
||||
"eslint.config.json",
|
||||
"eslint.config.ts"
|
||||
),
|
||||
handlers = {
|
||||
["eslint/openDoc"] = function(_, result)
|
||||
if not result then
|
||||
return
|
||||
end
|
||||
print(result.url)
|
||||
return {}
|
||||
end
|
||||
},
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
require "lspconfig".gdshader_lsp.setup {}
|
||||
require "lspconfig".gdscript.setup {}
|
||||
|
||||
--[[ require "lspconfig".java_language_server.setup {
|
||||
on_attach = on_attach,
|
||||
cmd = {"java-language-server"}
|
||||
} ]]
|
||||
for _, lsp in ipairs(common_servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
flags = {
|
||||
debounce_text_changes = 150
|
||||
},
|
||||
capabilities = capabilities
|
||||
}
|
||||
end
|
||||
|
||||
local path = vim.uv.cwd()
|
||||
local config_path = path .. "/.vscode/settings.json"
|
||||
local tailwindcss_settings = {
|
||||
tailwindCSS = {
|
||||
experimental = {
|
||||
classRegex = {
|
||||
{"cva\\(([^)]*)\\)", '["\'`]([^"\'`]*).*?["\'`]'},
|
||||
{"cx\\(([^)]*)\\)", '(?:\'|"|`)([^\']*)(?:\'|"|`)'},
|
||||
{"cn\\(([^)]*)\\)", '["\'`]([^"\'`]*).*?["\'`]'},
|
||||
{"([a-zA-Z0-9\\-:]+)"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-- local function patch_tailwindcss_settings()
|
||||
-- if vim.uv.fs_stat(config_path) then
|
||||
-- local file = vim.fn.readfile(config_path)
|
||||
-- local vscode_settings = vim.fn.json_decode(file)
|
||||
-- tailwindcss_settings =
|
||||
-- vim.tbl_deep_extend(
|
||||
-- "force",
|
||||
-- tailwindcss_settings,
|
||||
-- {
|
||||
-- tailwindCSS = {
|
||||
-- rootFontSize = vscode_settings["tailwindCSS.rootFontSize"]
|
||||
-- }
|
||||
-- }
|
||||
-- )
|
||||
-- end
|
||||
-- end
|
||||
-- pcall(patch_tailwindcss_settings)
|
||||
nvim_lsp.tailwindcss.setup {
|
||||
on_attach = on_attach,
|
||||
flags = {
|
||||
debounce_text_changes = 150
|
||||
},
|
||||
capabilities = capabilities,
|
||||
-- settings = tailwindcss_settings
|
||||
settings = {
|
||||
tailwindCSS = {
|
||||
experimental = {
|
||||
classRegex = {
|
||||
{"cva\\(([^)]*)\\)", '["\'`]([^"\'`]*).*?["\'`]'},
|
||||
{"cx\\(([^)]*)\\)", '(?:\'|"|`)([^\']*)(?:\'|"|`)'},
|
||||
{"cn\\(([^)]*)\\)", '(?:\'|"|`)([^\']*)(?:\'|"|`)'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require("roslyn").setup(
|
||||
{
|
||||
config = {},
|
||||
exe = {
|
||||
"dotnet",
|
||||
vim.fs.joinpath(vim.fn.stdpath("data"), "roslyn", "Microsoft.CodeAnalysis.LanguageServer.dll")
|
||||
},
|
||||
filewatching = true
|
||||
}
|
||||
)
|
||||
|
||||
nvim_lsp.rust_analyzer.setup {
|
||||
on_attach = on_attach,
|
||||
flags = {
|
||||
debounce_text_changes = 150
|
||||
},
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
imports = {
|
||||
granularity = {
|
||||
group = "module"
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
{ 'mason-org/mason.nvim', opts = {} },
|
||||
'mason-org/mason-lspconfig.nvim',
|
||||
{ 'j-hui/fidget.nvim', opts = {
|
||||
notification = {
|
||||
window = {
|
||||
winblend = 0,
|
||||
},
|
||||
prefix = "crate"
|
||||
},
|
||||
cargo = {
|
||||
buildScripts = {
|
||||
enable = true
|
||||
}
|
||||
} },
|
||||
'saghen/blink.cmp',
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
'b0o/schemastore.nvim',
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
||||
callback = function(event)
|
||||
local map = function(keys, func, desc, mode)
|
||||
mode = mode or 'n'
|
||||
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
||||
end
|
||||
|
||||
-- map('<leader>a', vim.lsp.buf.code_action, 'Code Action', { 'n', 'x', 'v' })
|
||||
|
||||
map('gr', require('telescope.builtin').lsp_references, 'Goto References')
|
||||
|
||||
map('gi', require('telescope.builtin').lsp_implementations, 'Goto Implementation')
|
||||
|
||||
map('gd', require('telescope.builtin').lsp_definitions, 'Goto Definition')
|
||||
|
||||
map('<leader>fs', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Open Workspace Symbols')
|
||||
|
||||
map('<leader>d', vim.diagnostic.open_float, 'Show Diagnostics')
|
||||
map('<leader>D', function()
|
||||
vim.diagnostic.jump({ count = 1, float = true })
|
||||
end, 'Next Diagnostics')
|
||||
|
||||
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
|
||||
---@param client vim.lsp.Client
|
||||
---@param method vim.lsp.protocol.Method
|
||||
---@param bufnr? integer some lsp support methods only in specific files
|
||||
---@return boolean
|
||||
local function client_supports_method(client, method, bufnr)
|
||||
if vim.fn.has('nvim-0.11') == 1 then
|
||||
return client:supports_method(method, bufnr)
|
||||
else
|
||||
return client.supports_method(method, { bufnr = bufnr })
|
||||
end
|
||||
end
|
||||
|
||||
-- The following two autocommands are used to highlight references of the
|
||||
-- word under your cursor when your cursor rests there for a little while.
|
||||
-- See `:help CursorHold` for information about when this is executed
|
||||
--
|
||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then
|
||||
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||
buffer = event.buf,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||
buffer = event.buf,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('LspDetach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
||||
callback = function(event2)
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.api.nvim_clear_autocmds({ group = 'kickstart-lsp-highlight', buffer = event2.buf })
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- The following code creates a keymap to toggle inlay hints in your
|
||||
-- code, if the language server you are using supports them
|
||||
--
|
||||
-- This may be unwanted, since they displace some of your code
|
||||
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then
|
||||
map('<leader>th', function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf }))
|
||||
end, '[T]oggle Inlay [H]ints')
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local servers = {
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
path = {
|
||||
'lua/?.lua',
|
||||
'lua/?/init.lua',
|
||||
},
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = vim.api.nvim_get_runtime_file('', true),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
procMacro = {
|
||||
enable = true
|
||||
}
|
||||
bashls = {},
|
||||
zls = {},
|
||||
cssls = {},
|
||||
prismals = {},
|
||||
intelephense = {},
|
||||
html = {},
|
||||
yamlls = {},
|
||||
eslint = {},
|
||||
tailwindcss = {},
|
||||
vtsls = {
|
||||
settings = {
|
||||
vtsls = { autoUseWorkspaceTsdk = true },
|
||||
},
|
||||
},
|
||||
jsonls = {
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require('schemastore').json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
gopls = {},
|
||||
}
|
||||
}
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua',
|
||||
'prettierd',
|
||||
'php-cs-fixer',
|
||||
'cspell',
|
||||
})
|
||||
|
||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||
|
||||
require('mason-tool-installer').setup({ ensure_installed = ensure_installed })
|
||||
for server_name, server in pairs(servers) do
|
||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||
vim.lsp.config(server_name, server)
|
||||
vim.lsp.enable(server_name)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
return {
|
||||
'nvimdev/lspsaga.nvim',
|
||||
config = function()
|
||||
require('lspsaga').setup({
|
||||
symbol_in_winbar = {
|
||||
enable = false,
|
||||
},
|
||||
lightbulb = {
|
||||
enable = false,
|
||||
},
|
||||
beacon = {
|
||||
enable = false,
|
||||
},
|
||||
rename = {
|
||||
keys = {
|
||||
quit = '<C-c>',
|
||||
},
|
||||
},
|
||||
code_action = {
|
||||
keys = {
|
||||
quit = '<C-c>',
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.keymap.set('', '<leader>a', '<cmd>Lspsaga code_action<CR>')
|
||||
vim.keymap.set('n', 'K', '<cmd>Lspsaga hover_doc<CR>')
|
||||
vim.keymap.set('n', '<F2>', '<cmd>Lspsaga rename<CR>')
|
||||
end,
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter', -- optional
|
||||
'nvim-tree/nvim-web-devicons', -- optional
|
||||
},
|
||||
}
|
||||
|
|
@ -1,268 +1,260 @@
|
|||
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
|
||||
vim.api.nvim_set_keymap("", "<TAB>", ":Neotree reveal<CR>", {silent = true})
|
||||
-- require "window-picker".setup()
|
||||
require "window-picker".setup(
|
||||
{
|
||||
autoselect_one = true,
|
||||
include_current = false,
|
||||
filter_rules = {
|
||||
-- filter using buffer options
|
||||
bo = {
|
||||
-- if the file type is one of following, the window will be ignored
|
||||
filetype = {"neo-tree", "neo-tree-popup", "notify"},
|
||||
-- if the buffer type is one of following, the window will be ignored
|
||||
buftype = {"terminal", "quickfix"}
|
||||
}
|
||||
},
|
||||
selection_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
||||
highlights = {
|
||||
statusline = {
|
||||
focused = {
|
||||
bg = "#519aba"
|
||||
return {
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
||||
'MunifTanjim/nui.nvim',
|
||||
's1n7ax/nvim-window-picker',
|
||||
},
|
||||
lazy = false, -- neo-tree will lazily load itself
|
||||
opts = {},
|
||||
config = function()
|
||||
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
|
||||
vim.api.nvim_set_keymap('', '<TAB>', ':Neotree reveal<CR>', { silent = true })
|
||||
require('window-picker').setup({
|
||||
autoselect_one = true,
|
||||
include_current = false,
|
||||
filter_rules = {
|
||||
bo = {
|
||||
filetype = { 'neo-tree', 'neo-tree-popup', 'notify' },
|
||||
buftype = { 'terminal', 'quickfix' },
|
||||
},
|
||||
unfocused = {
|
||||
bg = "#519aba"
|
||||
}
|
||||
},
|
||||
winbar = {
|
||||
focused = {
|
||||
bg = "#519aba"
|
||||
selection_chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
||||
highlights = {
|
||||
statusline = {
|
||||
focused = {
|
||||
bg = '#519aba',
|
||||
},
|
||||
unfocused = {
|
||||
bg = '#519aba',
|
||||
},
|
||||
},
|
||||
unfocused = {
|
||||
bg = "#519aba"
|
||||
}
|
||||
}
|
||||
}
|
||||
-- other_win_hl_color = "#519aba"
|
||||
}
|
||||
)
|
||||
winbar = {
|
||||
focused = {
|
||||
bg = '#519aba',
|
||||
},
|
||||
unfocused = {
|
||||
bg = '#519aba',
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("neo-tree").setup(
|
||||
{
|
||||
default_component_configs = {
|
||||
icon = {
|
||||
folder_empty = "",
|
||||
folder_empty_open = ""
|
||||
require('neo-tree').setup({
|
||||
default_component_configs = {
|
||||
icon = {
|
||||
folder_empty = '',
|
||||
folder_empty_open = '',
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
renamed = '',
|
||||
unstaged = '',
|
||||
},
|
||||
},
|
||||
},
|
||||
document_symbols = {
|
||||
kinds = {
|
||||
File = { icon = '', hl = 'Tag' },
|
||||
Namespace = { icon = '', hl = 'Include' },
|
||||
Package = { icon = '', hl = 'Label' },
|
||||
Class = { icon = '', hl = 'Include' },
|
||||
Property = { icon = '', hl = '@property' },
|
||||
Enum = { icon = '', hl = '@number' },
|
||||
Function = { icon = '', hl = 'Function' },
|
||||
String = { icon = '', hl = 'String' },
|
||||
Number = { icon = '', hl = 'Number' },
|
||||
Array = { icon = '', hl = 'Type' },
|
||||
Object = { icon = '', hl = 'Type' },
|
||||
Key = { icon = '', hl = '' },
|
||||
Struct = { icon = '', hl = 'Type' },
|
||||
Operator = { icon = '', hl = 'Operator' },
|
||||
TypeParameter = { icon = '', hl = 'Type' },
|
||||
StaticMethod = { icon = ' ', hl = 'Function' },
|
||||
},
|
||||
},
|
||||
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
|
||||
popup_border_style = 'rounded',
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = false,
|
||||
sort_case_insensitive = false,
|
||||
sort_function = nil,
|
||||
default_component_configs = {
|
||||
container = {
|
||||
enable_character_fade = true,
|
||||
},
|
||||
indent = {
|
||||
indent_size = 2,
|
||||
padding = 1, -- extra padding on left hand side
|
||||
-- indent guides
|
||||
with_markers = true,
|
||||
indent_marker = '│',
|
||||
last_indent_marker = '└',
|
||||
highlight = 'NeoTreeIndentMarker',
|
||||
-- expander config, needed for nesting files
|
||||
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
|
||||
expander_collapsed = '',
|
||||
expander_expanded = '',
|
||||
expander_highlight = 'NeoTreeExpander',
|
||||
},
|
||||
icon = {
|
||||
folder_closed = '',
|
||||
folder_open = '',
|
||||
folder_empty = '',
|
||||
default = '',
|
||||
highlight = 'NeoTreeFileIcon',
|
||||
},
|
||||
modified = {
|
||||
symbol = '[+]',
|
||||
highlight = 'NeoTreeGitAdded',
|
||||
},
|
||||
name = {
|
||||
trailing_slash = false,
|
||||
use_git_status_colors = true,
|
||||
highlight = 'NeoTreeFileName',
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
added = '',
|
||||
modified = '',
|
||||
deleted = '✖',
|
||||
renamed = '',
|
||||
untracked = '',
|
||||
ignored = '',
|
||||
unstaged = '',
|
||||
staged = '',
|
||||
conflict = '',
|
||||
},
|
||||
},
|
||||
},
|
||||
window = {
|
||||
position = 'left',
|
||||
width = 35,
|
||||
mapping_options = {
|
||||
noremap = true,
|
||||
nowait = true,
|
||||
},
|
||||
mappings = {
|
||||
['<space>'] = {
|
||||
'toggle_node',
|
||||
nowait = false,
|
||||
},
|
||||
['<esc>'] = 'revert_preview',
|
||||
['P'] = { 'toggle_preview', config = { use_float = true } },
|
||||
['s'] = 'split_with_window_picker',
|
||||
['v'] = 'vsplit_with_window_picker',
|
||||
['t'] = 'open_tabnew',
|
||||
['<cr>'] = 'open_with_window_picker',
|
||||
['<2-LeftMouse>'] = 'open_with_window_picker',
|
||||
['C'] = 'close_node',
|
||||
['z'] = 'close_all_nodes',
|
||||
['a'] = {
|
||||
'add',
|
||||
config = {
|
||||
show_path = 'absolute',
|
||||
},
|
||||
},
|
||||
['d'] = 'delete',
|
||||
['r'] = 'rename',
|
||||
['y'] = 'copy_to_clipboard',
|
||||
['x'] = 'cut_to_clipboard',
|
||||
['p'] = 'paste_from_clipboard',
|
||||
['c'] = 'copy',
|
||||
['m'] = {
|
||||
'move',
|
||||
config = {
|
||||
show_path = 'absolute',
|
||||
},
|
||||
},
|
||||
['q'] = 'close_window',
|
||||
['R'] = 'refresh',
|
||||
['?'] = 'show_help',
|
||||
['>'] = 'prev_source',
|
||||
['<'] = 'next_source',
|
||||
},
|
||||
},
|
||||
nesting_rules = {},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = false, -- when true, they will just be displayed differently than normal items
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = true,
|
||||
hide_by_name = { '.git' },
|
||||
hide_by_pattern = {},
|
||||
always_show = { 'node_modules' },
|
||||
never_show = {},
|
||||
never_show_by_pattern = {},
|
||||
},
|
||||
follow_current_file = { enabled = false }, -- This will find and focus the file in the active buffer every
|
||||
-- time the current file is changed while the tree is open.
|
||||
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
||||
hijack_netrw_behavior = 'open_default', -- netrw disabled, opening a directory opens neo-tree
|
||||
-- in whatever position is specified in window.position
|
||||
-- "open_current", -- netrw disabled, opening a directory opens within the
|
||||
-- window like netrw would, regardless of window.position
|
||||
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
||||
use_libuv_file_watcher = true, -- This will use the OS level file watchers to detect changes
|
||||
-- instead of relying on nvim autocmd events.
|
||||
window = {
|
||||
mappings = {
|
||||
['<bs>'] = 'navigate_up',
|
||||
['.'] = 'set_root',
|
||||
['H'] = 'toggle_hidden',
|
||||
['/'] = 'fuzzy_finder',
|
||||
['D'] = 'fuzzy_finder_directory',
|
||||
['f'] = 'filter_on_submit',
|
||||
['<c-x>'] = 'clear_filter',
|
||||
['[g'] = 'prev_git_modified',
|
||||
[']g'] = 'next_git_modified',
|
||||
},
|
||||
},
|
||||
},
|
||||
buffers = {
|
||||
follow_current_file = { enabled = true }, -- This will find and focus the file in the active buffer every
|
||||
-- time the current file is changed while the tree is open.
|
||||
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||
show_unloaded = true,
|
||||
window = {
|
||||
mappings = {
|
||||
['d'] = 'buffer_delete',
|
||||
['<bs>'] = 'navigate_up',
|
||||
['.'] = 'set_root',
|
||||
},
|
||||
},
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
renamed = "",
|
||||
unstaged = ""
|
||||
}
|
||||
}
|
||||
},
|
||||
document_symbols = {
|
||||
kinds = {
|
||||
File = {icon = "", hl = "Tag"},
|
||||
Namespace = {icon = "", hl = "Include"},
|
||||
Package = {icon = "", hl = "Label"},
|
||||
Class = {icon = "", hl = "Include"},
|
||||
Property = {icon = "", hl = "@property"},
|
||||
Enum = {icon = "", hl = "@number"},
|
||||
Function = {icon = "", hl = "Function"},
|
||||
String = {icon = "", hl = "String"},
|
||||
Number = {icon = "", hl = "Number"},
|
||||
Array = {icon = "", hl = "Type"},
|
||||
Object = {icon = "", hl = "Type"},
|
||||
Key = {icon = "", hl = ""},
|
||||
Struct = {icon = "", hl = "Type"},
|
||||
Operator = {icon = "", hl = "Operator"},
|
||||
TypeParameter = {icon = "", hl = "Type"},
|
||||
StaticMethod = {icon = " ", hl = "Function"}
|
||||
}
|
||||
},
|
||||
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
|
||||
popup_border_style = "rounded",
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = false,
|
||||
sort_case_insensitive = false, -- used when sorting files and directories in the tree
|
||||
sort_function = nil, -- use a custom function for sorting files and directories in the tree
|
||||
-- sort_function = function (a,b)
|
||||
-- if a.type == b.type then
|
||||
-- return a.path > b.path
|
||||
-- else
|
||||
-- return a.type > b.type
|
||||
-- end
|
||||
-- end , -- this sorts files and directories descendantly
|
||||
default_component_configs = {
|
||||
container = {
|
||||
enable_character_fade = true
|
||||
},
|
||||
indent = {
|
||||
indent_size = 2,
|
||||
padding = 1, -- extra padding on left hand side
|
||||
-- indent guides
|
||||
with_markers = true,
|
||||
indent_marker = "│",
|
||||
last_indent_marker = "└",
|
||||
highlight = "NeoTreeIndentMarker",
|
||||
-- expander config, needed for nesting files
|
||||
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
|
||||
expander_collapsed = "",
|
||||
expander_expanded = "",
|
||||
expander_highlight = "NeoTreeExpander"
|
||||
},
|
||||
icon = {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
folder_empty = "",
|
||||
default = "",
|
||||
highlight = "NeoTreeFileIcon"
|
||||
},
|
||||
modified = {
|
||||
symbol = "[+]",
|
||||
highlight = "NeoTreeGitAdded"
|
||||
},
|
||||
name = {
|
||||
trailing_slash = false,
|
||||
use_git_status_colors = true,
|
||||
highlight = "NeoTreeFileName"
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
-- Change type
|
||||
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
||||
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
||||
deleted = "✖",
|
||||
-- this can only be used in the git_status source
|
||||
renamed = "",
|
||||
-- this can only be used in the git_status source
|
||||
-- Status type
|
||||
untracked = "",
|
||||
ignored = "",
|
||||
unstaged = "",
|
||||
staged = "",
|
||||
conflict = ""
|
||||
}
|
||||
}
|
||||
},
|
||||
window = {
|
||||
position = "left",
|
||||
width = 35,
|
||||
mapping_options = {
|
||||
noremap = true,
|
||||
nowait = true
|
||||
},
|
||||
mappings = {
|
||||
["<space>"] = {
|
||||
"toggle_node",
|
||||
nowait = false
|
||||
window = {
|
||||
position = 'float',
|
||||
mappings = {
|
||||
['gA'] = 'git_add_all',
|
||||
['gu'] = 'git_unstage_file',
|
||||
['ga'] = 'git_add_file',
|
||||
['gr'] = 'git_revert_file',
|
||||
['gc'] = 'git_commit',
|
||||
['gp'] = 'git_push',
|
||||
['gg'] = 'git_commit_and_push',
|
||||
},
|
||||
},
|
||||
["<esc>"] = "revert_preview",
|
||||
["P"] = {"toggle_preview", config = {use_float = true}},
|
||||
["s"] = "split_with_window_picker",
|
||||
["v"] = "vsplit_with_window_picker",
|
||||
["t"] = "open_tabnew",
|
||||
["<cr>"] = "open_with_window_picker",
|
||||
["<2-LeftMouse>"] = "open_with_window_picker",
|
||||
["C"] = "close_node",
|
||||
["z"] = "close_all_nodes",
|
||||
["a"] = {
|
||||
"add",
|
||||
config = {
|
||||
show_path = "absolute"
|
||||
}
|
||||
},
|
||||
["d"] = "delete",
|
||||
["r"] = "rename",
|
||||
["y"] = "copy_to_clipboard",
|
||||
["x"] = "cut_to_clipboard",
|
||||
["p"] = "paste_from_clipboard",
|
||||
["c"] = "copy",
|
||||
["m"] = {
|
||||
"move",
|
||||
config = {
|
||||
show_path = "absolute"
|
||||
}
|
||||
},
|
||||
["q"] = "close_window",
|
||||
["R"] = "refresh",
|
||||
["?"] = "show_help",
|
||||
[">"] = "prev_source",
|
||||
["<"] = "next_source"
|
||||
}
|
||||
},
|
||||
nesting_rules = {},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = false, -- when true, they will just be displayed differently than normal items
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = true,
|
||||
hide_by_name = {".git"},
|
||||
hide_by_pattern = {},
|
||||
always_show = {"node_modules"},
|
||||
never_show = {},
|
||||
never_show_by_pattern = {}
|
||||
},
|
||||
follow_current_file = {enabled = false}, -- This will find and focus the file in the active buffer every
|
||||
-- time the current file is changed while the tree is open.
|
||||
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
||||
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
|
||||
-- in whatever position is specified in window.position
|
||||
-- "open_current", -- netrw disabled, opening a directory opens within the
|
||||
-- window like netrw would, regardless of window.position
|
||||
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
||||
use_libuv_file_watcher = true, -- This will use the OS level file watchers to detect changes
|
||||
-- instead of relying on nvim autocmd events.
|
||||
window = {
|
||||
mappings = {
|
||||
["<bs>"] = "navigate_up",
|
||||
["."] = "set_root",
|
||||
["H"] = "toggle_hidden",
|
||||
["/"] = "fuzzy_finder",
|
||||
["D"] = "fuzzy_finder_directory",
|
||||
["f"] = "filter_on_submit",
|
||||
["<c-x>"] = "clear_filter",
|
||||
["[g"] = "prev_git_modified",
|
||||
["]g"] = "next_git_modified"
|
||||
}
|
||||
}
|
||||
},
|
||||
buffers = {
|
||||
follow_current_file = {enabled = true}, -- This will find and focus the file in the active buffer every
|
||||
-- time the current file is changed while the tree is open.
|
||||
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||
show_unloaded = true,
|
||||
window = {
|
||||
mappings = {
|
||||
["d"] = "buffer_delete",
|
||||
["<bs>"] = "navigate_up",
|
||||
["."] = "set_root"
|
||||
}
|
||||
}
|
||||
},
|
||||
git_status = {
|
||||
window = {
|
||||
position = "float",
|
||||
mappings = {
|
||||
["gA"] = "git_add_all",
|
||||
["gu"] = "git_unstage_file",
|
||||
["ga"] = "git_add_file",
|
||||
["gr"] = "git_revert_file",
|
||||
["gc"] = "git_commit",
|
||||
["gp"] = "git_push",
|
||||
["gg"] = "git_commit_and_push"
|
||||
}
|
||||
}
|
||||
},
|
||||
source_selector = {
|
||||
winbar = true,
|
||||
statusline = false,
|
||||
sources = {
|
||||
-- table
|
||||
{
|
||||
source = "filesystem", -- string
|
||||
display_name = " Files" -- string | nil
|
||||
source_selector = {
|
||||
winbar = true,
|
||||
statusline = false,
|
||||
sources = {
|
||||
{
|
||||
source = 'filesystem',
|
||||
display_name = ' Files',
|
||||
},
|
||||
{
|
||||
source = 'document_symbols',
|
||||
display_name = ' Symbols',
|
||||
},
|
||||
{
|
||||
source = 'git_status',
|
||||
display_name = ' Git',
|
||||
},
|
||||
},
|
||||
{
|
||||
source = "buffers", -- string
|
||||
display_name = " Buffers" -- string | nil
|
||||
},
|
||||
{
|
||||
source = "git_status", -- string
|
||||
display_name = " Git" -- string | nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
require("neotest").setup(
|
||||
{
|
||||
adapters = {
|
||||
require("neotest-jest")(
|
||||
{
|
||||
jestCommand = "npx jest --bail --ci",
|
||||
env = {
|
||||
NODE_OPTIONS = "--no-deprecation"
|
||||
}
|
||||
}
|
||||
),
|
||||
require("neotest-zig")
|
||||
},
|
||||
icons = {
|
||||
passed = "🌈",
|
||||
skipped = "🌙",
|
||||
failed = "⛈️",
|
||||
running = "☀️"
|
||||
},
|
||||
highlights = {
|
||||
passed = "DiagnosticSignSuccess",
|
||||
skipped = "DiagnosticSignInfo",
|
||||
failed = "DiagnosticSignError",
|
||||
running = "DiagnosticSignWarn"
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
local keymap = vim.api.nvim_set_keymap
|
||||
|
||||
keymap("n", "<leader>tf", ':lua require("neotest").run.run(vim.fn.expand("%"))<CR>', {silent = true, noremap = true})
|
||||
keymap("n", "<leader>tn", ':lua require("neotest").run.run()<CR>', {silent = true})
|
||||
keymap("n", "<leader>tr", ':lua require("neotest").run.run()<CR>', {silent = true})
|
||||
keymap("n", "<leader>td", ':lua require("neotest").output.open({enter=true,short=true})<CR>', {silent = true})
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
return {
|
||||
{
|
||||
'nvimtools/none-ls.nvim',
|
||||
event = 'VeryLazy',
|
||||
dependencies = { 'davidmh/cspell.nvim' },
|
||||
opts = function(_, opts)
|
||||
local cspell = require('cspell')
|
||||
opts.sources = opts.sources or {}
|
||||
table.insert(
|
||||
opts.sources,
|
||||
cspell.diagnostics.with({
|
||||
diagnostics_postprocess = function(diagnostic)
|
||||
diagnostic.severity = vim.diagnostic.severity.WARN
|
||||
end,
|
||||
})
|
||||
)
|
||||
table.insert(opts.sources, cspell.code_actions)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
-- vim.g.nvim_tree_indent_markers = 1
|
||||
-- vim.api.nvim_set_keymap("", "<TAB>", ":NvimTreeFindFile<CR>:NvimTreeFocus<CR>", {silent = true})
|
||||
|
||||
vim.cmd [[
|
||||
autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif
|
||||
autocmd BufRead,BufNewFile NvimTree_1 lua vim.diagnostic.disable()
|
||||
]]
|
||||
|
||||
local tree_cb = require "nvim-tree.config".nvim_tree_callback
|
||||
-- default mappings
|
||||
require "nvim-tree".setup(
|
||||
{
|
||||
auto_reload_on_write = true,
|
||||
reload_on_bufenter = true,
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = false,
|
||||
timeout = 500
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
custom = {
|
||||
".git",
|
||||
".webpack",
|
||||
"\\.out",
|
||||
".cache"
|
||||
}
|
||||
},
|
||||
view = {
|
||||
mappings = {
|
||||
custom_only = true,
|
||||
list = {
|
||||
{key = {"<CR>", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")},
|
||||
{key = {"<2-RightMouse>", "<C-]>"}, cb = tree_cb("cd")},
|
||||
{key = "<C-v>", cb = tree_cb("vsplit")},
|
||||
{key = "<C-x>", cb = tree_cb("split")},
|
||||
{key = "t", cb = tree_cb("tabnew")},
|
||||
{key = "<", cb = tree_cb("prev_sibling")},
|
||||
{key = ">", cb = tree_cb("next_sibling")},
|
||||
{key = "P", cb = tree_cb("parent_node")},
|
||||
{key = "<BS>", cb = tree_cb("close_node")},
|
||||
{key = "<S-CR>", cb = tree_cb("close_node")},
|
||||
{key = "<Tab>", cb = tree_cb("preview")},
|
||||
{key = "K", cb = tree_cb("first_sibling")},
|
||||
{key = "J", cb = tree_cb("last_sibling")},
|
||||
{key = "I", cb = tree_cb("toggle_ignored")},
|
||||
{key = "I", cb = tree_cb("toggle_dotfiles")},
|
||||
{key = "r", cb = tree_cb("refresh")},
|
||||
{key = "a", cb = tree_cb("create")},
|
||||
{key = "d", cb = tree_cb("remove")},
|
||||
{key = "m", cb = tree_cb("rename")},
|
||||
{key = "<C-r>", cb = tree_cb("full_rename")},
|
||||
{key = "x", cb = tree_cb("cut")},
|
||||
{key = "c", cb = tree_cb("copy")},
|
||||
{key = "p", cb = tree_cb("paste")},
|
||||
{key = "y", cb = tree_cb("copy_name")},
|
||||
{key = "Y", cb = tree_cb("copy_path")},
|
||||
{key = "gy", cb = tree_cb("copy_absolute_path")},
|
||||
{key = "[c", cb = tree_cb("prev_git_item")},
|
||||
{key = "]c", cb = tree_cb("next_git_item")},
|
||||
{key = "-", cb = tree_cb("dir_up")},
|
||||
{key = "q", cb = tree_cb("close")},
|
||||
{key = "?", cb = tree_cb("toggle_help")}
|
||||
}
|
||||
}
|
||||
},
|
||||
renderer = {
|
||||
indent_markers = {
|
||||
enable = true,
|
||||
icons = {
|
||||
corner = "└",
|
||||
edge = "│ ",
|
||||
none = " "
|
||||
}
|
||||
},
|
||||
icons = {
|
||||
webdev_colors = true,
|
||||
show = {
|
||||
folder_arrow = false
|
||||
},
|
||||
glyphs = {
|
||||
default = "",
|
||||
symlink = "",
|
||||
git = {
|
||||
unstaged = "✗",
|
||||
staged = "✓",
|
||||
unmerged = "",
|
||||
renamed = "➜",
|
||||
untracked = "★",
|
||||
deleted = "",
|
||||
ignored = "◌"
|
||||
},
|
||||
folder = {
|
||||
arrow_open = "",
|
||||
arrow_closed = "",
|
||||
default = "",
|
||||
open = "",
|
||||
empty = "",
|
||||
empty_open = "",
|
||||
symlink = "",
|
||||
symlink_open = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
return {
|
||||
'echasnovski/mini.pairs',
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
modes = { insert = true, command = true, terminal = false },
|
||||
-- skip autopair when next character is one of these
|
||||
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
|
||||
-- skip autopair when the cursor is inside these treesitter nodes
|
||||
skip_ts = { 'string' },
|
||||
-- skip autopair when next character is closing pair
|
||||
-- and there are more closing pairs than opening pairs
|
||||
skip_unbalanced = true,
|
||||
-- better deal with markdown code blocks
|
||||
markdown = true,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
vim.g.signify_sign_add = "│"
|
||||
vim.g.signify_sign_change = "│"
|
||||
|
|
@ -1,56 +1,62 @@
|
|||
local selectX = function(n)
|
||||
return function(bufnr)
|
||||
local a = require("telescope.actions")
|
||||
local s = require("telescope.actions.state")
|
||||
local picker_name = s.get_current_picker(bufnr).prompt_title
|
||||
-- if not quick_prompts[picker_name] then
|
||||
-- -- Disable quick prompts to not press by accident
|
||||
-- -- TODO: Still type the number
|
||||
-- return
|
||||
-- end
|
||||
a.move_to_top(bufnr)
|
||||
for _ = 1, n - 1 do
|
||||
a.move_selection_next(bufnr)
|
||||
end
|
||||
a.select_default(bufnr)
|
||||
end
|
||||
end
|
||||
return { -- Fuzzy Finder (files, lsp, etc)
|
||||
'nvim-telescope/telescope.nvim',
|
||||
event = 'VimEnter',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
|
||||
local dropdown_configs = {
|
||||
layout_config = {
|
||||
prompt_position = "top",
|
||||
vertical = {
|
||||
width = 80,
|
||||
height = 12
|
||||
}
|
||||
},
|
||||
border = {}
|
||||
}
|
||||
-- `build` is used to run some command when the plugin is installed/updated.
|
||||
-- This is only run then, not every time Neovim starts up.
|
||||
build = 'make',
|
||||
|
||||
require("telescope").setup {
|
||||
file_ignore_patterns = {"package-lock.json"},
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown(dropdown_configs)
|
||||
}
|
||||
-- `cond` is a condition used to determine whether this plugin should be
|
||||
-- installed and loaded.
|
||||
cond = function()
|
||||
return vim.fn.executable('make') == 1
|
||||
end,
|
||||
},
|
||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||
|
||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||
},
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<Esc>"] = "close",
|
||||
["1"] = {selectX(1), type = "action"},
|
||||
["2"] = {selectX(2), type = "action"},
|
||||
["3"] = {selectX(3), type = "action"},
|
||||
["4"] = {selectX(4), type = "action"},
|
||||
["5"] = {selectX(5), type = "action"},
|
||||
["6"] = {selectX(6), type = "action"},
|
||||
["7"] = {selectX(7), type = "action"},
|
||||
["8"] = {selectX(8), type = "action"},
|
||||
["9"] = {selectX(9), type = "action"},
|
||||
["0"] = {selectX(10), type = "action"}
|
||||
config = function()
|
||||
local actions = require('telescope.actions')
|
||||
require('telescope').setup({
|
||||
extensions = {
|
||||
['ui-select'] = {
|
||||
require('telescope.themes').get_dropdown(),
|
||||
},
|
||||
},
|
||||
n = {}
|
||||
}
|
||||
}
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
['<C-s>'] = actions.select_horizontal,
|
||||
},
|
||||
n = {
|
||||
['<C-s>'] = actions.select_horizontal,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Enable Telescope extensions if they are installed
|
||||
pcall(require('telescope').load_extension, 'fzf')
|
||||
pcall(require('telescope').load_extension, 'ui-select')
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags)
|
||||
vim.keymap.set('n', '<leader>fk', builtin.keymaps)
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files)
|
||||
vim.keymap.set('n', '<leader>fs', builtin.builtin)
|
||||
vim.keymap.set('n', '<leader>fw', builtin.grep_string)
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep)
|
||||
vim.keymap.set('n', '<leader>fd', builtin.diagnostics)
|
||||
vim.keymap.set('n', '<leader>fr', builtin.resume)
|
||||
vim.keymap.set('n', '<leader>f.', builtin.oldfiles)
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers)
|
||||
vim.keymap.set('n', '<leader>ft', '<CMD>TodoTelescope<CR>')
|
||||
end,
|
||||
}
|
||||
require("telescope").load_extension("ui-select")
|
||||
|
|
|
|||
|
|
@ -1,36 +1,56 @@
|
|||
local parser_configs = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
parser_configs.http = {
|
||||
install_info = {
|
||||
url = "https://github.com/NTBBloodbath/tree-sitter-http",
|
||||
files = {"src/parser.c"},
|
||||
branch = "main"
|
||||
}
|
||||
}
|
||||
local npairs = require("nvim-autopairs")
|
||||
npairs.setup(
|
||||
{
|
||||
check_ts = true,
|
||||
enable_check_bracket_line = true
|
||||
}
|
||||
)
|
||||
|
||||
require("nvim-ts-autotag").setup({})
|
||||
|
||||
local tscc = require("ts_context_commentstring.config")
|
||||
tscc.update(
|
||||
{
|
||||
enable_autocmd = false
|
||||
}
|
||||
)
|
||||
|
||||
require "nvim-treesitter.configs".setup {
|
||||
highlight = {
|
||||
enable = true
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
},
|
||||
autopairs = {
|
||||
enable = true
|
||||
}
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
config = function()
|
||||
local configs = require('nvim-treesitter.configs')
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = {
|
||||
'bash',
|
||||
'c_sharp',
|
||||
'caddy',
|
||||
'css',
|
||||
'csv',
|
||||
'desktop',
|
||||
'diff',
|
||||
'dockerfile',
|
||||
'editorconfig',
|
||||
'gdscript',
|
||||
'gdshader',
|
||||
'git_config',
|
||||
'gitattributes',
|
||||
'gitcommit',
|
||||
'gitignore',
|
||||
'html',
|
||||
'ini',
|
||||
'javascript',
|
||||
'jsdoc',
|
||||
'json',
|
||||
'json5',
|
||||
'jsonc',
|
||||
'lua',
|
||||
'luadoc',
|
||||
'luap',
|
||||
'markdown',
|
||||
'php',
|
||||
'printf',
|
||||
'prisma',
|
||||
'properties',
|
||||
'python',
|
||||
'robots',
|
||||
'scss',
|
||||
'sql',
|
||||
'ssh_config',
|
||||
'toml',
|
||||
'tsx',
|
||||
'typescript',
|
||||
'xml',
|
||||
'yaml',
|
||||
'zig',
|
||||
},
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
return {
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
config = function()
|
||||
require('nvim-web-devicons').set_icon({
|
||||
['test.ts'] = {
|
||||
icon = '',
|
||||
color = '#519aba',
|
||||
name = 'TsTest',
|
||||
},
|
||||
['test.tsx'] = {
|
||||
icon = '',
|
||||
color = '#519aba',
|
||||
name = 'TsTest',
|
||||
},
|
||||
['test.js'] = {
|
||||
icon = '',
|
||||
color = '#cbcb41',
|
||||
name = 'JsTest',
|
||||
},
|
||||
['test.jsx'] = {
|
||||
icon = '',
|
||||
color = '#cbcb41',
|
||||
name = 'JsTest',
|
||||
},
|
||||
['readme.md'] = {
|
||||
icon = '',
|
||||
color = '#42A5F5',
|
||||
name = 'Readme',
|
||||
},
|
||||
['package.json'] = {
|
||||
icon = '',
|
||||
color = '#8BC34A',
|
||||
name = 'PackageJson',
|
||||
},
|
||||
['package-lock.json'] = {
|
||||
icon = '',
|
||||
color = '#8BC34A',
|
||||
name = 'PackageJson',
|
||||
},
|
||||
['tsconfig.json'] = {
|
||||
icon = '',
|
||||
color = '#0288D1',
|
||||
name = 'TsConfig',
|
||||
},
|
||||
['prisma'] = {
|
||||
icon = '',
|
||||
color = '#FFFFFF',
|
||||
name = 'Prisma',
|
||||
},
|
||||
['jar'] = {
|
||||
icon = '',
|
||||
color = '#FFFFFF',
|
||||
name = 'Jar',
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
22
setup.sh
22
setup.sh
|
|
@ -1,22 +0,0 @@
|
|||
[ -e ~/.local/share/nvim/site/pack/packer/start/packer.nvim ] || git clone https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
npm i -g @fsouza/prettierd@latest \
|
||||
diagnostic-languageserver@latest \
|
||||
eslint_d@latest \
|
||||
lua-fmt@latest \
|
||||
typescript-language-server@latest \
|
||||
typescript@latest \
|
||||
vim-language-server@latest \
|
||||
vscode-css-languageserver-bin@latest \
|
||||
vscode-html-languageserver-bin@latest \
|
||||
vscode-json-languageserver@latest \
|
||||
vscode-langservers-extracted@latest \
|
||||
bash-language-server@latest \
|
||||
@prisma/language-server@latest \
|
||||
cspell@latest \
|
||||
@cspell/dict-de-de@latest \
|
||||
tsx@latest \
|
||||
intelephense \
|
||||
@vtsls/language-server
|
||||
|
||||
cspell link add @cspell/dict-de-de
|
||||
dotnet tool install --global csharp-ls
|
||||
Binary file not shown.
|
|
@ -1,18 +0,0 @@
|
|||
auth/!
|
||||
auth
|
||||
Todo
|
||||
Minecraft
|
||||
FTB
|
||||
Technic
|
||||
Mojang
|
||||
config
|
||||
#echnic
|
||||
technic/!
|
||||
ConfigManager
|
||||
Grenning
|
||||
BWL
|
||||
Marriot
|
||||
Loadbalancer
|
||||
nodejs
|
||||
Wordpress
|
||||
VSCode
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,52 +0,0 @@
|
|||
local wezterm = require "wezterm"
|
||||
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
config.font =
|
||||
wezterm.font_with_fallback(
|
||||
{
|
||||
{family = "Input Mono Narrow", stretch = "Normal"},
|
||||
{family = "Hack Nerd Font", stretch = "Normal"}
|
||||
}
|
||||
)
|
||||
|
||||
config.allow_square_glyphs_to_overflow_width = "Always"
|
||||
config.treat_east_asian_ambiguous_width_as_wide = true
|
||||
|
||||
config.default_prog = {"zsh"}
|
||||
config.use_fancy_tab_bar = false
|
||||
config.font_size = 11
|
||||
config.front_end = "WebGpu"
|
||||
config.max_fps = 60
|
||||
config.animation_fps = 60
|
||||
config.colors = {
|
||||
foreground = "#c5c8c6",
|
||||
background = "#1d1f21",
|
||||
cursor_bg = "#c5c8c6",
|
||||
cursor_border = "#c5c8c6",
|
||||
cursor_fg = "#1d1f21",
|
||||
selection_bg = "#373b41",
|
||||
selection_fg = "#c5c8c6",
|
||||
ansi = {
|
||||
"#282a2e", -- black
|
||||
"#a54242", -- red
|
||||
"#8c9440", -- green
|
||||
"#f79d1e", -- yellow
|
||||
"#5f819d", -- blue
|
||||
"#85678f", -- magenta
|
||||
"#049494", -- cyan
|
||||
"#707880" -- white
|
||||
},
|
||||
brights = {
|
||||
"#373b41", -- bright black
|
||||
"#cc6666", -- bright red
|
||||
"#b5bd68", -- bright green
|
||||
"#f7c530", -- bright yellow
|
||||
"#81a2be", -- bright blue
|
||||
"#b294bb", -- bright magenta
|
||||
"#66fbfb", -- bright cyan
|
||||
"#c5c8c6" -- bright white
|
||||
}
|
||||
}
|
||||
|
||||
return config
|
||||
Loading…
Reference in New Issue