|
|
|
@@ -33,7 +33,7 @@ O.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
|
|
|
|
if OS == "win" then
|
|
|
|
|
-- The newer pwsh is faster, but this is required for some legacy functionality
|
|
|
|
|
-- such as [G]o [T]eams below.
|
|
|
|
|
O.shell = "powershell" -- or the newer pwsh
|
|
|
|
|
O.shell = "powershell" -- powershell = NET Framework, pwsh = .NET Core
|
|
|
|
|
O.shellcmdflag = "-NoLogo -NoProfile -ExecutionPolicy Bypass -Command"
|
|
|
|
|
O.shellxquote = ''
|
|
|
|
|
end
|
|
|
|
@@ -81,64 +81,17 @@ lazy.setup({
|
|
|
|
|
-------------
|
|
|
|
|
-- Colors --
|
|
|
|
|
-------------
|
|
|
|
|
"catppuccin/nvim",
|
|
|
|
|
name = "catppuccin",
|
|
|
|
|
'arcticicestudio/nord-vim',
|
|
|
|
|
lazy = false,
|
|
|
|
|
priority = 1000,
|
|
|
|
|
config = function()
|
|
|
|
|
require('catppuccin').setup({
|
|
|
|
|
flavour = "frappe", -- latte, frappe, macchiato, mocha
|
|
|
|
|
background = { -- :h background
|
|
|
|
|
light = "frappe",
|
|
|
|
|
dark = "mocha",
|
|
|
|
|
},
|
|
|
|
|
transparent_background = true, -- disables setting the background color.
|
|
|
|
|
show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
|
|
|
|
|
term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
|
|
|
|
|
dim_inactive = {
|
|
|
|
|
enabled = false, -- dims the background color of inactive window
|
|
|
|
|
shade = "dark",
|
|
|
|
|
percentage = 0.15, -- percentage of the shade to apply to the inactive window
|
|
|
|
|
},
|
|
|
|
|
no_italic = false, -- Force no italic
|
|
|
|
|
no_bold = false, -- Force no bold
|
|
|
|
|
no_underline = false, -- Force no underline
|
|
|
|
|
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
|
|
|
|
|
comments = { "bold" }, -- Change the style of comments
|
|
|
|
|
conditionals = {},
|
|
|
|
|
loops = {},
|
|
|
|
|
functions = {},
|
|
|
|
|
keywords = {},
|
|
|
|
|
strings = {},
|
|
|
|
|
variables = {},
|
|
|
|
|
numbers = {},
|
|
|
|
|
booleans = {},
|
|
|
|
|
properties = {},
|
|
|
|
|
types = {},
|
|
|
|
|
operators = {},
|
|
|
|
|
-- miscs = {}, -- Uncomment to turn off hard-coded styles
|
|
|
|
|
},
|
|
|
|
|
color_overrides = {},
|
|
|
|
|
custom_highlights = {},
|
|
|
|
|
integrations = {
|
|
|
|
|
cmp = true,
|
|
|
|
|
gitsigns = true,
|
|
|
|
|
nvimtree = true,
|
|
|
|
|
treesitter = true,
|
|
|
|
|
notify = false,
|
|
|
|
|
mini = {
|
|
|
|
|
enabled = true,
|
|
|
|
|
indentscope_color = "",
|
|
|
|
|
},
|
|
|
|
|
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
V.cmd([[colorscheme catppuccin-frappe]])
|
|
|
|
|
V.cmd([[colorscheme nord]])
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
'nvim-lualine/lualine.nvim',
|
|
|
|
|
opts = {
|
|
|
|
|
theme = "catppuccin-frappe"
|
|
|
|
|
theme = "nordic"
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@@ -189,7 +142,7 @@ lazy.setup({
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- Nvim-notify will be plugged into the default vim notify system for a
|
|
|
|
|
-- Nvim-notify will be plugged into the default vim notify system for a
|
|
|
|
|
-- better notification box
|
|
|
|
|
{
|
|
|
|
|
"rcarriga/nvim-notify",
|
|
|
|
@@ -206,7 +159,7 @@ lazy.setup({
|
|
|
|
|
config = function()
|
|
|
|
|
require('notify').setup({
|
|
|
|
|
stages = "static",
|
|
|
|
|
timeout = 3000,
|
|
|
|
|
timeout = 500,
|
|
|
|
|
max_height = function()
|
|
|
|
|
return math.floor(V.o.lines * 0.75)
|
|
|
|
|
end,
|
|
|
|
@@ -247,14 +200,21 @@ lazy.setup({
|
|
|
|
|
"ThePrimeagen/harpoon",
|
|
|
|
|
branch = "harpoon2",
|
|
|
|
|
dependencies = { "nvim-lua/plenary.nvim" },
|
|
|
|
|
config = function()
|
|
|
|
|
local harpoon = require("harpoon")
|
|
|
|
|
harpoon.setup({})
|
|
|
|
|
|
|
|
|
|
local opts = { noremap = true, silent = true }
|
|
|
|
|
V.keymap.set('n', '<leader>hh', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, opts)
|
|
|
|
|
V.keymap.set('n', '<leader>ha', function() harpoon:list():append() end, opts)
|
|
|
|
|
end
|
|
|
|
|
config = true,
|
|
|
|
|
keys = {
|
|
|
|
|
{
|
|
|
|
|
'<leader>hh',
|
|
|
|
|
function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end,
|
|
|
|
|
desc =
|
|
|
|
|
"[H]arpoon [H]ome"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
'<leader>ha',
|
|
|
|
|
function() require("harpoon"):list():add() end,
|
|
|
|
|
desc =
|
|
|
|
|
"[H]arpoon [A]ppend"
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
---------------
|
|
|
|
@@ -369,10 +329,10 @@ lazy.setup({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- Copilot!!
|
|
|
|
|
{
|
|
|
|
|
"github/copilot.vim",
|
|
|
|
|
event = { "BufReadPre", "BufNewFile" },
|
|
|
|
|
},
|
|
|
|
|
-- {
|
|
|
|
|
-- "github/copilot.vim",
|
|
|
|
|
-- event = { "BufReadPre", "BufNewFile" },
|
|
|
|
|
-- },
|
|
|
|
|
|
|
|
|
|
-- lspconfig is the configuration framework for the nvim lsp client. It has best effort
|
|
|
|
|
-- configs for every language. Mason.nvim is the plugin that will install the lsp servers
|
|
|
|
@@ -409,7 +369,7 @@ lazy.setup({
|
|
|
|
|
["textDocument/hover"] = V.lsp.with(V.lsp.handlers.hover, { border = border }),
|
|
|
|
|
["textDocument/signatureHelp"] = V.lsp.with(V.lsp.handlers.signature_help, { border = border }),
|
|
|
|
|
}
|
|
|
|
|
require("lspconfig").rust_analyzer.setup { handlers = handlers }
|
|
|
|
|
require("lspconfig").rust_analyzer.setup({ handlers = handlers })
|
|
|
|
|
|
|
|
|
|
-- C# --
|
|
|
|
|
local omnisharp_extended = require("omnisharp_extended") -- decompilation support
|
|
|
|
@@ -421,16 +381,16 @@ lazy.setup({
|
|
|
|
|
["textDocument/implementation"] = omnisharp_extended.implementation_handler,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
require("lspconfig").omnisharp.setup {
|
|
|
|
|
require("lspconfig").omnisharp.setup({
|
|
|
|
|
handlers = omnisharp_handlers,
|
|
|
|
|
enable_editorconfig_support = true,
|
|
|
|
|
enable_ms_build_load_projects_on_demand = false,
|
|
|
|
|
enable_roslyn_analyzers = true,
|
|
|
|
|
organize_imports_on_format = true,
|
|
|
|
|
enable_import_completion = false,
|
|
|
|
|
enable_import_completion = true,
|
|
|
|
|
sdk_include_prereleases = true,
|
|
|
|
|
analyze_open_documents_only = true,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- Add default LSP keybindings
|
|
|
|
|
V.api.nvim_create_autocmd('LspAttach', {
|
|
|
|
@@ -464,6 +424,10 @@ lazy.setup({
|
|
|
|
|
V.keymap.set('n', '<leader>fe', V.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
|
|
|
|
|
V.keymap.set('n', '<leader>fd', V.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
|
|
|
|
V.keymap.set('n', '<leader>fe', V.diagnostic.open_float, { desc = 'Open diagnostic message on the line' })
|
|
|
|
|
-- Define some keybinding to build the current solution
|
|
|
|
|
V.keymap.set('n', '<leader>dtb', function()
|
|
|
|
|
V.cmd('!dotnet build')
|
|
|
|
|
end, { silent = true })
|
|
|
|
|
end,
|
|
|
|
|
})
|
|
|
|
|
end,
|
|
|
|
@@ -474,15 +438,16 @@ lazy.setup({
|
|
|
|
|
-- This plugin provides a way to configure which LSP servers to install
|
|
|
|
|
"williamboman/mason-lspconfig.nvim",
|
|
|
|
|
config = function()
|
|
|
|
|
require('mason-lspconfig').setup {
|
|
|
|
|
require('mason-lspconfig').setup({
|
|
|
|
|
ensure_installed = {
|
|
|
|
|
"lua_ls",
|
|
|
|
|
"powershell_es",
|
|
|
|
|
"rust_analyzer",
|
|
|
|
|
"omnisharp",
|
|
|
|
|
-- "omnisharp@1.39.8", -- The last known good version
|
|
|
|
|
-- "netcoredbg", Install this manually, this is DAP, not LSP
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
end,
|
|
|
|
|
dependencies = {
|
|
|
|
|
-- This plugin provides a way to install LSP and DAP servers
|
|
|
|
@@ -603,7 +568,7 @@ lazy.setup({
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- Below configuration tells how to launch a debugging interactive session for a C#
|
|
|
|
|
-- Below configuration tells how to launch a debugging interactive session for a C#
|
|
|
|
|
-- application when using the netcoredbg adapeter.
|
|
|
|
|
dap.configurations.cs = {
|
|
|
|
|
{
|
|
|
|
@@ -643,10 +608,40 @@ lazy.setup({
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- Shows a popups with the keybindings that are available after a small delay
|
|
|
|
|
-- Treesitter
|
|
|
|
|
{
|
|
|
|
|
"folke/which-key.nvim",
|
|
|
|
|
config = true
|
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
|
branch = 'master',
|
|
|
|
|
lazy = false,
|
|
|
|
|
build = ":TSUpdate",
|
|
|
|
|
opts_extend = { "ensure_installed" },
|
|
|
|
|
opts = {
|
|
|
|
|
ensure_installed = {
|
|
|
|
|
"rust",
|
|
|
|
|
"lua",
|
|
|
|
|
"vim",
|
|
|
|
|
"vimdoc",
|
|
|
|
|
"ruby",
|
|
|
|
|
"markdown",
|
|
|
|
|
"bash",
|
|
|
|
|
"c_sharp",
|
|
|
|
|
"ruby",
|
|
|
|
|
"html",
|
|
|
|
|
"yaml",
|
|
|
|
|
"text",
|
|
|
|
|
"gitignore",
|
|
|
|
|
"markdown_inline",
|
|
|
|
|
"json",
|
|
|
|
|
"toml",
|
|
|
|
|
"xml",
|
|
|
|
|
"gitcommit",
|
|
|
|
|
"make",
|
|
|
|
|
"html",
|
|
|
|
|
"scss",
|
|
|
|
|
"yaml",
|
|
|
|
|
"git_config"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@@ -680,7 +675,10 @@ keymap("x", "<A-k>", ":move '<-2<cr>gv-gv", opts)
|
|
|
|
|
|
|
|
|
|
-- Misc
|
|
|
|
|
keymap('n', '<S-u>', ':red<cr>', opts)
|
|
|
|
|
keymap('n', '<ESC>', '<cmd>nohlsearch<cr>', {})
|
|
|
|
|
keymap('n', '<ESC>', '<cmd>nohlsearch<cr>', opts)
|
|
|
|
|
|
|
|
|
|
-- Run rust programs
|
|
|
|
|
keymap('n', '<leader>rr', ':!cargo run<cr>', opts)
|
|
|
|
|
|
|
|
|
|
----------
|
|
|
|
|
-- Misc --
|
|
|
|
|