12 changed files with 0 additions and 852 deletions
@ -1 +0,0 @@ |
|||||
lazy-lock.json |
|
||||
@ -1,43 +0,0 @@ |
|||||
require('config.common') |
|
||||
require('config.keymap') |
|
||||
|
|
||||
if vim.g.neovide then |
|
||||
require('config.neovide') |
|
||||
end |
|
||||
|
|
||||
--------------------------------- |
|
||||
--- Fix: auto detect filetype --- |
|
||||
--------------------------------- |
|
||||
vim.api.nvim_create_autocmd({ 'BufWinEnter', 'BufReadPost' }, { |
|
||||
pattern = '*', |
|
||||
callback = function () |
|
||||
if vim.bo.filetype == '' then |
|
||||
vim.cmd('filetype detect') |
|
||||
end |
|
||||
end, |
|
||||
}) |
|
||||
|
|
||||
----------------- |
|
||||
--- lazy.nvim --- |
|
||||
----------------- |
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" |
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then |
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git" |
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) |
|
||||
if vim.v.shell_error ~= 0 then |
|
||||
vim.api.nvim_echo({ |
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" }, |
|
||||
{ out, "WarningMsg" }, |
|
||||
{ "\nPress any key to exit..." }, |
|
||||
}, true, {}) |
|
||||
vim.fn.getchar() |
|
||||
os.exit(1) |
|
||||
end |
|
||||
end |
|
||||
vim.opt.rtp:prepend(lazypath) |
|
||||
|
|
||||
require('lazy').setup({ |
|
||||
spec = { |
|
||||
{ import = "plugins" }, |
|
||||
}, |
|
||||
}) |
|
||||
@ -1,36 +0,0 @@ |
|||||
local opt = vim.opt |
|
||||
|
|
||||
opt.number = true |
|
||||
opt.relativenumber = true |
|
||||
opt.ruler = true |
|
||||
--opt.colorcolumn = "80" |
|
||||
|
|
||||
opt.expandtab = true |
|
||||
opt.tabstop = 4 |
|
||||
opt.softtabstop = 4 |
|
||||
opt.shiftwidth = 4 |
|
||||
|
|
||||
opt.autoindent = true |
|
||||
|
|
||||
opt.hlsearch = true |
|
||||
opt.incsearch = true |
|
||||
opt.ignorecase = true |
|
||||
opt.smartcase = true |
|
||||
|
|
||||
opt.swapfile = false |
|
||||
opt.backup = false |
|
||||
opt.writebackup = false |
|
||||
|
|
||||
opt.showmatch = true |
|
||||
|
|
||||
opt.wrap = false |
|
||||
|
|
||||
opt.compatible = false |
|
||||
|
|
||||
opt.clipboard:append("unnamedplus") |
|
||||
|
|
||||
opt.termguicolors = true |
|
||||
opt.signcolumn = "yes" |
|
||||
|
|
||||
opt.list = true |
|
||||
opt.listchars = { trail = '·', extends = '>'} |
|
||||
@ -1,45 +0,0 @@ |
|||||
local kms = vim.keymap.set |
|
||||
vim.g.mapleader = ';' |
|
||||
|
|
||||
-- window |
|
||||
-- switch |
|
||||
kms('', '<Leader>h', '<ESC><C-w>h') |
|
||||
kms('', '<Leader>j', '<ESC><C-w>j') |
|
||||
kms('', '<Leader>k', '<ESC><C-w>k') |
|
||||
kms('', '<Leader>l', '<ESC><C-w>l') |
|
||||
kms('', '<Leader>w', '<ESC><C-w>w') |
|
||||
kms('', '<Leader>H', '<ESC><C-w>H') |
|
||||
kms('', '<Leader>J', '<ESC><C-w>J') |
|
||||
kms('', '<Leader>K', '<ESC><C-w>K') |
|
||||
kms('', '<Leader>L', '<ESC><C-w>L') |
|
||||
kms('i', '<Left>', '<ESC><C-w>h') |
|
||||
kms('i', '<Down>', '<ESC><C-w>j') |
|
||||
kms('i', '<Up>', '<ESC><C-w>k') |
|
||||
kms('i', '<Right>', '<ESC><C-w>l') |
|
||||
-- close |
|
||||
kms('n', '<Space>h', '<C-w>h:q<CR>') |
|
||||
kms('n', '<Space>j', '<C-w>j:q<CR>') |
|
||||
kms('n', '<Space>k', '<C-w>k:q<CR>') |
|
||||
kms('n', '<Space>l', '<C-w>l:q<CR>') |
|
||||
-- cancle something |
|
||||
kms('n', '<Space>/', ':noh<CR>') |
|
||||
|
|
||||
-- buffer |
|
||||
kms('n', '<C-h>', ':bprev<CR>') |
|
||||
kms('n', '<C-l>', ':bnext<CR>') |
|
||||
|
|
||||
-- editing |
|
||||
kms('i', '<Leader>w', '<ESC>:w<CR>a') |
|
||||
kms('i', '<Leader>c', '<ESC>cc') |
|
||||
kms('i', '<Leader>a', '<ESC>A') |
|
||||
kms('i', '<Leader>;', '<ESC>A;') |
|
||||
kms('i', '<Leader>,', '<ESC>A,') |
|
||||
kms('i', '<Leader>j', '<ESC>o') |
|
||||
kms('i', '<Leader>k', '<ESC>O') |
|
||||
|
|
||||
-- Move multi lines |
|
||||
kms('v', 'J', ':m \'>+1<CR>gv=gv') |
|
||||
kms('v', 'K', ':m \'<-2<CR>gv=gv') |
|
||||
|
|
||||
-- terminal |
|
||||
-- kms('t', '<ESC>', '<C-\\><C-n>') |
|
||||
@ -1,40 +0,0 @@ |
|||||
vim.opt.guifont = { "FiraCode Nerd Font" } |
|
||||
|
|
||||
vim.g.neovide_opacity = 0.3 |
|
||||
vim.g.neovide_normal_opacity = 0.6 |
|
||||
vim.g.neovide_window_blurred = true |
|
||||
|
|
||||
vim.g.neovide_hide_mouse_when_typing = true |
|
||||
vim.g.neovide_fullscreen = false |
|
||||
vim.g.neovide_remember_window_size = true |
|
||||
|
|
||||
vim.g.neovide_refresh_rate = 60 |
|
||||
vim.g.neovide_refresh_rate_idle = 5 |
|
||||
vim.g.neovide_no_idle = false |
|
||||
--vim.g.neovide_profiler = true |
|
||||
|
|
||||
vim.g.neovide_cursor_smooth_blink = true |
|
||||
vim.g.neovide_cursor_vfx_mode = "torpedo" |
|
||||
vim.g.neovide_cursor_vfx_particle_lifetime = 3.0 |
|
||||
vim.g.neovide_cursor_vfx_particle_density = 4.5 |
|
||||
|
|
||||
vim.g.neovide_floating_shadow = true |
|
||||
|
|
||||
local function set_ime(args) |
|
||||
if args.event:match("Enter$") then |
|
||||
vim.g.neovide_input_ime = true |
|
||||
else |
|
||||
vim.g.neovide_input_ime = false |
|
||||
end |
|
||||
end |
|
||||
local ime_input = vim.api.nvim_create_augroup("ime_input", { clear = true }) |
|
||||
vim.api.nvim_create_autocmd({"InsertEnter", "InsertLeave"}, { |
|
||||
group = ime_input, |
|
||||
pattern = "*", |
|
||||
callback = set_ime, |
|
||||
}) |
|
||||
vim.api.nvim_create_autocmd({"CmdlineEnter", "CmdlineLeave"}, { |
|
||||
group = ime_input, |
|
||||
pattern = "[/\\?]", |
|
||||
callback = set_ime, |
|
||||
}) |
|
||||
@ -1,60 +0,0 @@ |
|||||
-- local cmp_autopairs = require('nvim-autopairs.completion.cmp') |
|
||||
|
|
||||
return { |
|
||||
opts = { |
|
||||
cmdline = { enabled = false }, |
|
||||
snippets = { preset = 'default' }, |
|
||||
completion = { |
|
||||
keyword = { range = 'full' }, --'prefix', 'full' |
|
||||
accept = { |
|
||||
auto_brackets = { enabled = false }, |
|
||||
}, |
|
||||
list = { |
|
||||
selection = { |
|
||||
preselect = false, |
|
||||
auto_insert = true, |
|
||||
}, |
|
||||
}, |
|
||||
menu = { |
|
||||
auto_show = true, |
|
||||
}, |
|
||||
documentation = { |
|
||||
auto_show = true, |
|
||||
auto_show_delay_ms = 500, |
|
||||
}, |
|
||||
ghost_text = { enabled = true }, |
|
||||
}, |
|
||||
sources = { |
|
||||
default = { 'lsp', 'path', 'snippets', 'buffer' }, |
|
||||
}, |
|
||||
keymap = { |
|
||||
preset = 'none', |
|
||||
|
|
||||
-- ['<C-h>'] = { 'show', 'show_documentation', 'hide_documentation' }, |
|
||||
['<C-h>'] = { 'hide', 'fallback' }, |
|
||||
['<Space>'] = { 'accept', 'fallback' }, |
|
||||
--['<CR>'] = { 'select_and_accept', 'fallback' }, |
|
||||
['<CR>'] = { 'accept', 'fallback' }, |
|
||||
-- ['<Space>'] = { function(cmp) |
|
||||
-- return cmp.accept({ callback = cmp_autopairs.on_confirm_done }) |
|
||||
-- end }, |
|
||||
-- ['<CR>'] = { function(cmp) |
|
||||
-- return cmp.select_and_accept({ callback = cmp_autopairs.on_confirm_done }) |
|
||||
-- end }, |
|
||||
|
|
||||
['<S-Tab>'] = { 'select_prev', 'fallback' }, |
|
||||
['<Tab>'] = { 'select_next', 'fallback' }, |
|
||||
['<C-p>'] = { 'select_prev', 'fallback_to_mappings' }, |
|
||||
['<C-n>'] = { 'select_next', 'fallback_to_mappings' }, |
|
||||
|
|
||||
['<C-b>'] = { 'scroll_documentation_up', 'fallback' }, |
|
||||
['<C-f>'] = { 'scroll_documentation_down', 'fallback' }, |
|
||||
|
|
||||
['<C-j>'] = { 'snippet_forward', 'fallback' }, |
|
||||
['<C-k>'] = { 'snippet_backward', 'fallback' }, |
|
||||
|
|
||||
['<C-l>'] = { 'show_signature', 'hide_signature', 'fallback' }, |
|
||||
}, |
|
||||
signature = { enabled = true }, |
|
||||
} |
|
||||
} |
|
||||
@ -1,64 +0,0 @@ |
|||||
local cmp = require('cmp') |
|
||||
cmp.setup({ |
|
||||
snippet = { |
|
||||
expand = function(args) |
|
||||
vim.snippet.expand(args.body) |
|
||||
end |
|
||||
}, |
|
||||
window = { |
|
||||
completion = cmp.config.window.bordered(), |
|
||||
documentation = cmp.config.window.bordered(), |
|
||||
}, |
|
||||
mapping = cmp.mapping.preset.insert({ |
|
||||
--['<C-b>'] = cmp.mapping.scroll_docs(-4), |
|
||||
--['<C-f>'] = cmp.mapping.scroll_docs(4), |
|
||||
--['<C-Space>'] = cmp.mapping.complete(), |
|
||||
['<C-e>'] = cmp.mapping.abort(), |
|
||||
['<CR>'] = cmp.mapping.confirm({ |
|
||||
behavior = cmp.ConfirmBehavior.Replace, |
|
||||
select = true, |
|
||||
}), |
|
||||
['<Tab>'] = cmp.mapping(function(fallback) |
|
||||
if cmp.visible() then |
|
||||
cmp.select_next_item() |
|
||||
--elseif luasnip.expand_or_jumpable() then |
|
||||
-- luasnip.expand_or_jump() |
|
||||
else |
|
||||
fallback() |
|
||||
end |
|
||||
end, { 'i', 's' }), |
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback) |
|
||||
if cmp.visible() then |
|
||||
cmp.select_prev_item() |
|
||||
--elseif luasnip.jumpable(-1) then |
|
||||
-- luasnip.jump(-1) |
|
||||
else |
|
||||
fallback() |
|
||||
end |
|
||||
end, { 'i', 's' }), |
|
||||
}), |
|
||||
sources = { |
|
||||
{ name = 'nvim_lsp' }, |
|
||||
{ name = 'buffer' }, |
|
||||
{ name = 'path' }, |
|
||||
{ name = 'cmdline' }, |
|
||||
}, |
|
||||
sorting = { |
|
||||
comparators = { |
|
||||
cmp.config.compare.offset, |
|
||||
cmp.config.compare.exact, |
|
||||
cmp.config.compare.score, |
|
||||
require('cmp-under-comparator').under, |
|
||||
cmp.config.compare.kind, |
|
||||
cmp.config.compare.sort_text, |
|
||||
cmp.config.compare.length, |
|
||||
cmp.config.compare.order, |
|
||||
}, |
|
||||
}, |
|
||||
}) |
|
||||
|
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp') |
|
||||
cmp.event:on( |
|
||||
'confirm_done', |
|
||||
cmp_autopairs.on_confirm_done() |
|
||||
) |
|
||||
@ -1,118 +0,0 @@ |
|||||
local M = {} |
|
||||
|
|
||||
M.config = function() |
|
||||
-- Mapping |
|
||||
local opts = { noremap = true, silent = true } |
|
||||
local kms = vim.keymap.set |
|
||||
kms('n', '<leader>e', vim.diagnostic.open_float, opts) |
|
||||
kms('n', '[d', function() vim.diagnostic.jump({ count = 1, float = true }) end, opts) |
|
||||
kms('n', ']d', function() vim.diagnostic.jump({ count = -1, float = true }) end, opts) |
|
||||
kms('n', '<leader>q', vim.diagnostic.setloclist, opts) |
|
||||
|
|
||||
vim.lsp.config('*', { |
|
||||
capabilities = require('blink.cmp').get_lsp_capabilities(), |
|
||||
on_attach = function(_, bufnr) |
|
||||
-- Enable completion triggered by <c-x><c-o> |
|
||||
vim.api.nvim_set_option_value('omnifunc', 'v:lua.vim.lsp.omnifunc', { buf = bufnr }) |
|
||||
|
|
||||
-- Mappings. |
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions |
|
||||
local bufopts = { noremap = true, silent = true, buffer = bufnr } |
|
||||
local kms = vim.keymap.set |
|
||||
-- goto * |
|
||||
kms('n', 'gD', vim.lsp.buf.declaration, bufopts) |
|
||||
kms('n', 'gd', vim.lsp.buf.definition, bufopts) |
|
||||
kms('n', 'gr', vim.lsp.buf.references, bufopts) |
|
||||
kms('n', 'gi', vim.lsp.buf.implementation, bufopts) |
|
||||
--kms('n', '<leader>D', vim.lsp.buf.type_definition, bufopts) |
|
||||
-- show info |
|
||||
kms('n', 'K', vim.lsp.buf.hover, bufopts) |
|
||||
kms('n', '<C-k>', vim.lsp.buf.signature_help, bufopts) |
|
||||
-- Workspace |
|
||||
kms('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, bufopts) |
|
||||
kms('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, bufopts) |
|
||||
kms('n', '<leader>wl', function() |
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders())) |
|
||||
end, bufopts) |
|
||||
-- operation |
|
||||
kms('n', '<leader>rn', vim.lsp.buf.rename, bufopts) |
|
||||
kms('n', '<leader>ca', vim.lsp.buf.code_action, bufopts) |
|
||||
kms('n', '<leader>f', function() vim.lsp.buf.format { async = true } end, bufopts) |
|
||||
end, |
|
||||
}) |
|
||||
|
|
||||
vim.lsp.config('lua_ls', { |
|
||||
--cmd = { 'lua-language-server.cmd' }, |
|
||||
on_init = function(client) |
|
||||
if client.workspace_folders then |
|
||||
local path = client.workspace_folders[1].name |
|
||||
if |
|
||||
path ~= vim.fn.stdpath('config') |
|
||||
and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) |
|
||||
then |
|
||||
return |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, { |
|
||||
runtime = { |
|
||||
-- Tell the language server which version of Lua you're using (most |
|
||||
-- likely LuaJIT in the case of Neovim) |
|
||||
version = 'Lua 5.5', |
|
||||
-- Tell the language server how to find Lua modules same way as Neovim |
|
||||
-- (see `:h lua-module-load`) |
|
||||
path = { |
|
||||
'lua/?.lua', |
|
||||
'lua/?/init.lua', |
|
||||
'/usr/share/lua/5.5/?.lua', |
|
||||
'/usr/share/lua/5.5/?/init.lua', |
|
||||
}, |
|
||||
}, |
|
||||
workspace = { |
|
||||
checkThirdParty = false, |
|
||||
library = { |
|
||||
-- Make the server aware of Neovim runtime files |
|
||||
vim.env.VIMRUNTIME, |
|
||||
vim.api.nvim_get_runtime_file('lua/lspconfig', false)[1], |
|
||||
'/usr/share/hypr/stubs', |
|
||||
'/usr/share/lua/5.5', |
|
||||
}, |
|
||||
-- Or pull in all of 'runtimepath'. |
|
||||
-- NOTE: this is a lot slower and will cause issues when working on |
|
||||
-- your own configuration. |
|
||||
-- See https://github.com/neovim/nvim-lspconfig/issues/3189 |
|
||||
-- library = vim.api.nvim_get_runtime_file('', true), |
|
||||
}, |
|
||||
}) |
|
||||
end, |
|
||||
}) |
|
||||
vim.lsp.enable('lua_ls') |
|
||||
|
|
||||
vim.lsp.enable('rust_analyzer') |
|
||||
|
|
||||
vim.lsp.config('powershell_es', { |
|
||||
bundle_path = 'D:/DevKits/SDKs/LSP/MasonManaged/packages/powershell-editor-services', |
|
||||
shell = 'powershell.exe', |
|
||||
}) |
|
||||
vim.lsp.enable('powershell_es') |
|
||||
|
|
||||
vim.lsp.enable('csharp_ls') |
|
||||
|
|
||||
vim.lsp.config('jsonls', { |
|
||||
capabilities = setmetatable({ |
|
||||
textDocument = { completion = { completionItem = { snippetSupport = true } } } |
|
||||
}, { |
|
||||
__index = require('blink.cmp').get_lsp_capabilities() |
|
||||
}), |
|
||||
cmd = { 'node.exe', 'D:/DevKits/SDKs/LSP/MasonManaged/packages/json-lsp/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server', '--stdio' }, |
|
||||
}) |
|
||||
vim.lsp.enable('jsonls') |
|
||||
|
|
||||
vim.lsp.config('qmlls', { cmd = { 'qmlls6' } }) |
|
||||
vim.lsp.enable('qmlls') |
|
||||
|
|
||||
vim.lsp.config('gdscript', {}) |
|
||||
vim.lsp.enable('gdscript') |
|
||||
end |
|
||||
|
|
||||
return M |
|
||||
@ -1,107 +0,0 @@ |
|||||
local M = {} |
|
||||
|
|
||||
M.config = function() |
|
||||
-- Mapping |
|
||||
local opts = { noremap = true, silent = true } |
|
||||
local kms = vim.keymap.set |
|
||||
kms('n', '<leader>e', vim.diagnostic.open_float, opts) |
|
||||
kms('n', '[d', function() vim.diagnostic.jump({ count = 1, float = true }) end, opts) |
|
||||
kms('n', ']d', function() vim.diagnostic.jump({ count = -1, float = true }) end, opts) |
|
||||
kms('n', '<leader>q', vim.diagnostic.setloclist, opts) |
|
||||
|
|
||||
vim.lsp.config('*', { |
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(), |
|
||||
on_attach = function(_, bufnr) |
|
||||
-- Enable completion triggered by <c-x><c-o> |
|
||||
vim.api.nvim_set_option_value('omnifunc', 'v:lua.vim.lsp.omnifunc', { buf = bufnr }) |
|
||||
|
|
||||
-- Mappings. |
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions |
|
||||
local bufopts = { noremap = true, silent = true, buffer = bufnr } |
|
||||
local kms = vim.keymap.set |
|
||||
-- goto * |
|
||||
kms('n', 'gD', vim.lsp.buf.declaration, bufopts) |
|
||||
kms('n', 'gd', vim.lsp.buf.definition, bufopts) |
|
||||
kms('n', 'gr', vim.lsp.buf.references, bufopts) |
|
||||
kms('n', 'gi', vim.lsp.buf.implementation, bufopts) |
|
||||
--kms('n', '<leader>D', vim.lsp.buf.type_definition, bufopts) |
|
||||
-- show info |
|
||||
kms('n', 'K', vim.lsp.buf.hover, bufopts) |
|
||||
kms('n', '<C-k>', vim.lsp.buf.signature_help, bufopts) |
|
||||
-- Workspace |
|
||||
kms('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, bufopts) |
|
||||
kms('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, bufopts) |
|
||||
kms('n', '<leader>wl', function() |
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders())) |
|
||||
end, bufopts) |
|
||||
-- operation |
|
||||
kms('n', '<leader>rn', vim.lsp.buf.rename, bufopts) |
|
||||
kms('n', '<leader>ca', vim.lsp.buf.code_action, bufopts) |
|
||||
kms('n', '<leader>f', function() vim.lsp.buf.format { async = true } end, bufopts) |
|
||||
end, |
|
||||
}) |
|
||||
|
|
||||
vim.lsp.config('lua_ls', { |
|
||||
--cmd = { 'lua-language-server.cmd' }, |
|
||||
on_init = function(client) |
|
||||
if client.workspace_folders then |
|
||||
local path = client.workspace_folders[1].name |
|
||||
if |
|
||||
path ~= vim.fn.stdpath('config') |
|
||||
and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) |
|
||||
then |
|
||||
return |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, { |
|
||||
runtime = { |
|
||||
-- Tell the language server which version of Lua you're using (most |
|
||||
-- likely LuaJIT in the case of Neovim) |
|
||||
version = 'LuaJIT', |
|
||||
-- Tell the language server how to find Lua modules same way as Neovim |
|
||||
-- (see `:h lua-module-load`) |
|
||||
path = { |
|
||||
'lua/?.lua', |
|
||||
'lua/?/init.lua', |
|
||||
}, |
|
||||
}, |
|
||||
-- Make the server aware of Neovim runtime files |
|
||||
workspace = { |
|
||||
checkThirdParty = false, |
|
||||
library = { |
|
||||
vim.env.VIMRUNTIME, |
|
||||
-- Depending on the usage, you might want to add additional paths |
|
||||
-- here. |
|
||||
-- '${3rd}/luv/library', |
|
||||
-- '${3rd}/busted/library', |
|
||||
}, |
|
||||
-- Or pull in all of 'runtimepath'. |
|
||||
-- NOTE: this is a lot slower and will cause issues when working on |
|
||||
-- your own configuration. |
|
||||
-- See https://github.com/neovim/nvim-lspconfig/issues/3189 |
|
||||
-- library = vim.api.nvim_get_runtime_file('', true), |
|
||||
}, |
|
||||
}) |
|
||||
end, |
|
||||
}) |
|
||||
vim.lsp.enable('lua_ls') |
|
||||
|
|
||||
vim.lsp.enable('rust_analyzer') |
|
||||
|
|
||||
vim.lsp.config('powershell_es', { |
|
||||
bundle_path = 'D:/DevKits/SDKs/LSP/MasonManaged/packages/powershell-editor-services', |
|
||||
shell = 'powershell.exe', |
|
||||
}) |
|
||||
vim.lsp.enable('powershell_es') |
|
||||
|
|
||||
vim.lsp.config('jsonls', { |
|
||||
capabilities = setmetatable({ |
|
||||
textDocument = { completion = { completionItem = { snippetSupport = true } } } |
|
||||
}, { |
|
||||
__index = require('cmp_nvim_lsp').default_capabilities() |
|
||||
}), |
|
||||
cmd = { 'node.exe', 'D:/DevKits/SDKs/LSP/MasonManaged/packages/json-lsp/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server', '--stdio' }, |
|
||||
}) |
|
||||
vim.lsp.enable('jsonls') |
|
||||
end |
|
||||
@ -1,94 +0,0 @@ |
|||||
local mason_root = "D:\\DevKits\\SDKs\\LSP\\MasonManaged" |
|
||||
|
|
||||
return { { |
|
||||
'mason-org/mason.nvim', |
|
||||
version = '2.*', |
|
||||
cond = jit.os == "Windows", |
|
||||
cmd = { 'Mason', 'MasonUpdate', 'MasonInstall', 'MasonUninstall', 'MasonUninstallAll', 'MasonLog' }, |
|
||||
opts = { |
|
||||
install_root_dir = mason_root, |
|
||||
log_level = vim.log.levels.WARN, |
|
||||
}, |
|
||||
}, { |
|
||||
'neovim/nvim-lspconfig', |
|
||||
version = '2.*', |
|
||||
event = { 'BufReadPost', 'BufNewFile' }, |
|
||||
config = require('plugins.conf.lsp').config, |
|
||||
}, { |
|
||||
-- 'hrsh7th/nvim-cmp', |
|
||||
-- event = { 'InsertEnter', 'CmdlineEnter' }, |
|
||||
-- dependencies = { |
|
||||
-- 'hrsh7th/cmp-nvim-lsp', |
|
||||
-- 'hrsh7th/cmp-buffer', |
|
||||
-- 'hrsh7th/cmp-path', |
|
||||
-- 'hrsh7th/cmp-cmdline', |
|
||||
-- 'windwp/nvim-autopairs', |
|
||||
-- 'lukas-reineke/cmp-under-comparator', |
|
||||
-- }, |
|
||||
-- config = require('plugins.conf.cmp').config, |
|
||||
-- }, { |
|
||||
'saghen/blink.cmp', |
|
||||
version = '1.*', |
|
||||
event = { |
|
||||
'InsertEnter', |
|
||||
-- 'CmdlineEnter', |
|
||||
}, |
|
||||
dependencies = { |
|
||||
'rafamadriz/friendly-snippets', |
|
||||
}, |
|
||||
opts = require('plugins.conf.cmp').opts, |
|
||||
opts_extend = { 'sources.default' }, |
|
||||
}, { |
|
||||
'windwp/nvim-autopairs', |
|
||||
version = '*', |
|
||||
event = 'InsertEnter', |
|
||||
opts = { |
|
||||
map_cr = true, |
|
||||
}, |
|
||||
}, { |
|
||||
'MeanderingProgrammer/render-markdown.nvim', |
|
||||
version = '8.*', |
|
||||
dependencies = { |
|
||||
'nvim-treesitter/nvim-treesitter', |
|
||||
'nvim-mini/mini.icons', |
|
||||
}, |
|
||||
keys = { { |
|
||||
'<Leader>md', |
|
||||
'<Cmd>RenderMarkdown preview<Cr>', |
|
||||
mode = 'n', |
|
||||
ft = { 'markdown', 'quarto' }, |
|
||||
} }, |
|
||||
ft = { 'markdown', 'quarto' }, |
|
||||
opts = { |
|
||||
completions = { lsp = { enabled = true } }, |
|
||||
}, |
|
||||
}, { |
|
||||
"rachartier/tiny-inline-diagnostic.nvim", |
|
||||
event = "LspAttach", |
|
||||
init = function() |
|
||||
vim.diagnostic.config({ virtual_text = false }) |
|
||||
end, |
|
||||
opts = { |
|
||||
options = { |
|
||||
multilines = { enabled = true }, |
|
||||
}, |
|
||||
}, |
|
||||
}, { |
|
||||
'stevearc/aerial.nvim', |
|
||||
version = '3.*', |
|
||||
dependencies = { |
|
||||
'nvim-mini/mini.icons', |
|
||||
}, |
|
||||
keys = { |
|
||||
{ '<Leader>cs', '<Cmd>AerialToggle<cr>' }, |
|
||||
}, |
|
||||
opts = { |
|
||||
backends = { 'lsp', 'markdown', 'asciidoc' }, |
|
||||
layout = { |
|
||||
default_direction = 'right', |
|
||||
}, |
|
||||
ignore = { |
|
||||
filetypes = { 'dashboard' }, |
|
||||
}, |
|
||||
}, |
|
||||
} } |
|
||||
@ -1,209 +0,0 @@ |
|||||
return { { |
|
||||
'nvim-mini/mini.icons', |
|
||||
version = '*', |
|
||||
config = function() |
|
||||
local mini_icons = require('mini.icons') |
|
||||
mini_icons.setup() |
|
||||
mini_icons.mock_nvim_web_devicons() |
|
||||
end, |
|
||||
}, { |
|
||||
'catppuccin/nvim', |
|
||||
version = '*', |
|
||||
name = 'catppuccin', |
|
||||
lazy = false, |
|
||||
priority = 1000, |
|
||||
init = function() |
|
||||
vim.cmd.colorscheme 'catppuccin-nvim' |
|
||||
end, |
|
||||
opts = { |
|
||||
flavour = 'auto', |
|
||||
background = { |
|
||||
light = 'latte', |
|
||||
dark = 'mocha', |
|
||||
}, |
|
||||
transparent_background = true, |
|
||||
float = { |
|
||||
transparent = false, |
|
||||
solid = false, |
|
||||
}, |
|
||||
term_colors = true, |
|
||||
show_end_of_buffer = false, |
|
||||
integrations = { |
|
||||
cmp = true, |
|
||||
gitsigns = true, |
|
||||
nvimtree = true, |
|
||||
notify = true, |
|
||||
}, |
|
||||
}, |
|
||||
}, { |
|
||||
'nvimdev/dashboard-nvim', |
|
||||
dependencies = { |
|
||||
'nvim-mini/mini.icons', |
|
||||
}, |
|
||||
cond = function() return vim.g.neovide ~= nil end, |
|
||||
event = 'VimEnter', |
|
||||
opts = { |
|
||||
theme = "hyper", |
|
||||
change_to_vcs_root = true, |
|
||||
config = { |
|
||||
week_header = { |
|
||||
enable = true, |
|
||||
} |
|
||||
}, |
|
||||
hide = { |
|
||||
statusline = true, |
|
||||
tabline = true, |
|
||||
winbar = true |
|
||||
} |
|
||||
}, |
|
||||
config = function(_, opts) |
|
||||
require('dashboard').setup(opts) |
|
||||
|
|
||||
-- Fix filetype error |
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWinEnter' }, { |
|
||||
callback = function() |
|
||||
if vim.bo.filetype == '' then |
|
||||
vim.cmd('filetype detect') |
|
||||
end |
|
||||
end, |
|
||||
}) |
|
||||
end |
|
||||
}, { |
|
||||
'Bekaboo/dropbar.nvim', |
|
||||
version = '*', |
|
||||
event = 'LspAttach', |
|
||||
-- optional, but required for fuzzy finder support |
|
||||
config = function() |
|
||||
local dropbar_api = require('dropbar.api') |
|
||||
vim.keymap.set('n', '<Leader>,,', dropbar_api.pick, { desc = 'Pick symbols in winbar' }) |
|
||||
vim.keymap.set('n', '<Leader>,h', dropbar_api.goto_context_start, { desc = 'Go to start of current context' }) |
|
||||
vim.keymap.set('n', '<Leader>,l', dropbar_api.select_next_context, { desc = 'Select next context' }) |
|
||||
end, |
|
||||
dependencies = { |
|
||||
'nvim-mini/mini.icons', |
|
||||
}, |
|
||||
}, { |
|
||||
'akinsho/bufferline.nvim', |
|
||||
version = '4.*', |
|
||||
event = 'VeryLazy', |
|
||||
dependencies = { |
|
||||
'nvim-mini/mini.icons', |
|
||||
}, |
|
||||
config = function() |
|
||||
require('bufferline').setup { |
|
||||
options = { |
|
||||
separator_style = 'slant', |
|
||||
always_show_bufferline = false, |
|
||||
auto_toggle_bufferline = true, |
|
||||
diagnostics = 'nvim_lsp', |
|
||||
} |
|
||||
} |
|
||||
vim.opt.termguicolors = true |
|
||||
end, |
|
||||
}, { |
|
||||
'nvim-lualine/lualine.nvim', |
|
||||
version = false, |
|
||||
event = 'VeryLazy', |
|
||||
dependencies = { |
|
||||
'nvim-mini/mini.icons', |
|
||||
}, |
|
||||
opts = { |
|
||||
options = { |
|
||||
theme = 'catppuccin-nvim', |
|
||||
disabled_filetypes = { |
|
||||
statusline = { 'dashboard' }, |
|
||||
winbar = { 'dashboard' }, |
|
||||
}, |
|
||||
ignore_focus = { 'neo-tree', 'aerial' }, |
|
||||
} |
|
||||
}, |
|
||||
}, { |
|
||||
'rcarriga/nvim-notify', |
|
||||
version = '3.*', |
|
||||
event = 'VeryLazy', |
|
||||
init = function() |
|
||||
vim.notify = require('notify') |
|
||||
end, |
|
||||
opts = { |
|
||||
background_colour = "#000000", |
|
||||
timeout = 5000, |
|
||||
}, |
|
||||
}, { |
|
||||
'lukas-reineke/indent-blankline.nvim', |
|
||||
version = '3.*', |
|
||||
event = 'LspAttach', |
|
||||
dependencies = { |
|
||||
'nvim-treesitter/nvim-treesitter', |
|
||||
{ |
|
||||
'HiPhish/rainbow-delimiters.nvim', |
|
||||
submodules = false, |
|
||||
event = { 'BufReadPost', 'BufNewFile' }, |
|
||||
}, |
|
||||
-- 'https://gitlab.com/HiPhish/rainbow-delimiters.nvim.git', |
|
||||
}, |
|
||||
config = function() |
|
||||
local highlight = { |
|
||||
"RainbowRed", |
|
||||
"RainbowYellow", |
|
||||
"RainbowBlue", |
|
||||
"RainbowOrange", |
|
||||
"RainbowGreen", |
|
||||
"RainbowViolet", |
|
||||
"RainbowCyan", |
|
||||
} |
|
||||
local hooks = require('ibl.hooks') |
|
||||
-- create the highlight groups in the highlight setup hook, so they are reset |
|
||||
-- every time the colorscheme changes |
|
||||
hooks.register(hooks.type.HIGHLIGHT_SETUP, function() |
|
||||
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" }) |
|
||||
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" }) |
|
||||
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" }) |
|
||||
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" }) |
|
||||
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" }) |
|
||||
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" }) |
|
||||
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" }) |
|
||||
end) |
|
||||
|
|
||||
local rainbow_delimiters = require('rainbow-delimiters') |
|
||||
vim.g.rainbow_delimiters = { |
|
||||
strategy = { |
|
||||
[''] = rainbow_delimiters.strategy['global'], |
|
||||
vim = rainbow_delimiters.strategy['local'], |
|
||||
}, |
|
||||
query = { |
|
||||
[''] = 'rainbow-delimiters', |
|
||||
lua = 'rainbow-blocks', |
|
||||
}, |
|
||||
priority = { |
|
||||
[''] = 110, |
|
||||
lua = 210, |
|
||||
}, |
|
||||
highlight = highlight, |
|
||||
} |
|
||||
require('ibl').setup { |
|
||||
scope = { highlight = highlight }, |
|
||||
exclude = { |
|
||||
filetypes = { 'dashboard' }, |
|
||||
}, |
|
||||
} |
|
||||
|
|
||||
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark) |
|
||||
end, |
|
||||
}, { |
|
||||
'nvim-neo-tree/neo-tree.nvim', |
|
||||
version = '2.*', |
|
||||
dependencies = { |
|
||||
'nvim-lua/plenary.nvim', |
|
||||
'MunifTanjim/nui.nvim', |
|
||||
'nvim-mini/mini.icons', |
|
||||
}, |
|
||||
keys = { |
|
||||
{ '<Leader><Tab>', '<Cmd>Neotree toggle reveal<Cr>' }, |
|
||||
}, |
|
||||
opts = {}, |
|
||||
}, { |
|
||||
'karb94/neoscroll.nvim', |
|
||||
version = false, |
|
||||
event = 'VeryLazy', |
|
||||
opts = {}, |
|
||||
} } |
|
||||
@ -1,35 +0,0 @@ |
|||||
return { { |
|
||||
'nvim-telescope/telescope.nvim', |
|
||||
version = '*', |
|
||||
cmd = { 'Telescope' }, |
|
||||
dependencies = { |
|
||||
'nvim-lua/plenary.nvim', |
|
||||
{ |
|
||||
'nvim-telescope/telescope-fzf-native.nvim', |
|
||||
build = |
|
||||
'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release --target install' |
|
||||
}, |
|
||||
}, |
|
||||
}, { |
|
||||
'mikavilpas/yazi.nvim', |
|
||||
version = '13.*', |
|
||||
-- event = 'VeryLazy', |
|
||||
dependencies = { |
|
||||
{ 'nvim-lua/plenary.nvim', lazy = true }, |
|
||||
}, |
|
||||
-- keys = {{ |
|
||||
-- '<Leader><Tab>', '<Cmd>Yazi<Cr>', |
|
||||
-- mode = { 'n' }, |
|
||||
-- desc = 'Open yazi at current file', |
|
||||
-- }}, |
|
||||
cmd = { 'Yazi' }, |
|
||||
init = function() |
|
||||
vim.g.loaded_netrwPlugin = 1 |
|
||||
end, |
|
||||
opts = { |
|
||||
open_for_directories = true, |
|
||||
keymaps = { |
|
||||
show_help = '<F1>', |
|
||||
}, |
|
||||
}, |
|
||||
} } |
|
||||
Loading…
Reference in new issue