updates
This commit is contained in:
1 parent
21c52bc914
commit
ec1f8204dd
26 files changed
+457
-818
No files matched your search
@@ -66,10 +66,11 @@ map("n", "<C-c>", ":%y+<CR>", { desc = "Copy whole text to clipboard", silent =
|
||||
-- Select all text
|
||||
map("n", "<C-a>", "gg<S-V>G", { desc = "Select all text", silent = true, noremap = true })
|
||||
|
||||
-- Better paste
|
||||
-- remap "p" in visual mode to delete the highlighted text without overwriting your yanked/copied text, and then paste the content from the unnamed register.
|
||||
map("v", "p", '"_dP')
|
||||
-- Paste options
|
||||
map("i", "<C-v>", '<C-r>"', { desc = "Paste on insert mode" })
|
||||
map("v", "p", '"_dP', { desc = "Paste without overwriting" })
|
||||
|
||||
-- Deleting without yanking empty line
|
||||
map("n", "dd", function()
|
||||
local is_empty_line = vim.api.nvim_get_current_line():match("^%s*$")
|
||||
if is_empty_line then
|
||||
|
||||
@@ -11,16 +11,7 @@ ResizeGuiFont = function(delta)
|
||||
RefreshGuiFont()
|
||||
end
|
||||
|
||||
ResetGuiFont = function()
|
||||
vim.g.gui_font_size = vim.g.gui_font_default_size
|
||||
RefreshGuiFont()
|
||||
end
|
||||
|
||||
-- Call function on startup to set default value
|
||||
ResetGuiFont()
|
||||
|
||||
-- Keymaps
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
vim.keymap.set({ "n", "i" }, "<C-+>", function()
|
||||
@@ -29,9 +20,6 @@ end, opts)
|
||||
vim.keymap.set({ "n", "i" }, "<C-->", function()
|
||||
ResizeGuiFont(-1)
|
||||
end, opts)
|
||||
vim.keymap.set({ "n", "i" }, "<C-BS>", function()
|
||||
ResetGuiFont()
|
||||
end, opts)
|
||||
|
||||
vim.g.neovide_padding_top = 5
|
||||
vim.g.neovide_padding_right = 5
|
||||
@@ -47,24 +35,3 @@ vim.g.neovide_cursor_antialiasing = false
|
||||
vim.g.neovide_cursor_vfx_mode = "pixiedust"
|
||||
|
||||
vim.opt.winblend = 20
|
||||
|
||||
if vim.fn.exists("g:terminal_color_0") == 0 then
|
||||
vim.api.nvim_set_var("terminal_color_0", "#494D64")
|
||||
vim.api.nvim_set_var("terminal_color_1", "#ED8796")
|
||||
vim.api.nvim_set_var("terminal_color_2", "#A6DA95")
|
||||
vim.api.nvim_set_var("terminal_color_3", "#EED49F")
|
||||
vim.api.nvim_set_var("terminal_color_4", "#8AADF4")
|
||||
vim.api.nvim_set_var("terminal_color_5", "#F5BDE6")
|
||||
vim.api.nvim_set_var("terminal_color_6", "#8BD5CA")
|
||||
vim.api.nvim_set_var("terminal_color_7", "#B8C0E0")
|
||||
vim.api.nvim_set_var("terminal_color_8", "#5B6078")
|
||||
vim.api.nvim_set_var("terminal_color_9", "#ED8796")
|
||||
vim.api.nvim_set_var("terminal_color_10", "#A6DA95")
|
||||
vim.api.nvim_set_var("terminal_color_11", "#EED49F")
|
||||
vim.api.nvim_set_var("terminal_color_12", "#8AADF4")
|
||||
vim.api.nvim_set_var("terminal_color_13", "#F5BDE6")
|
||||
vim.api.nvim_set_var("terminal_color_14", "#8BD5CA")
|
||||
vim.api.nvim_set_var("terminal_color_15", "#B8C0E0")
|
||||
end
|
||||
|
||||
vim.g.neovide_theme = "catppuccin-macchiato"
|
||||
@@ -1,16 +1,16 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
-- Neovide options
|
||||
require("config.neovide")
|
||||
|
||||
-- Optimizations on startup
|
||||
vim.loader.enable()
|
||||
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Font
|
||||
vim.g.gui_font_default_size = 10
|
||||
vim.g.gui_font_size = vim.g.gui_font_default_size
|
||||
vim.g.gui_font_face = "JetBrainsMono Nerd Font"
|
||||
|
||||
vim.o.winwidth = 10
|
||||
vim.o.winminwidth = 10
|
||||
vim.o.equalalways = false
|
||||
-- Define leader key
|
||||
vim.g.mapleader = " "
|
||||
@@ -1,6 +1,13 @@
|
||||
local prefix = "<leader>G"
|
||||
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "gh" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"almo7aya/openingh.nvim",
|
||||
cmd = { "OpenInGHRepo", "OpenInGHFile", "OpenInGHFileLines" },
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "java" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.registries = {
|
||||
"github:nvim-java/mason-registry",
|
||||
"github:mason-org/mason-registry",
|
||||
}
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "java-test", "java-debug-adapter" })
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-java/nvim-java",
|
||||
lazy = true,
|
||||
ft = "java",
|
||||
dependencies = {
|
||||
{ "nvim-java/lua-async-await" },
|
||||
{ "nvim-java/nvim-java-core" },
|
||||
{ "nvim-java/nvim-java-test" },
|
||||
{ "nvim-java/nvim-java-dap" },
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
jdtls = {
|
||||
keys = {
|
||||
-- Workaround for the lack of a DAP strategy in neotest-java
|
||||
{
|
||||
"<leader>td",
|
||||
function()
|
||||
require("java").dap.config_dap()
|
||||
require("java").test.debug_current_method()
|
||||
end,
|
||||
desc = "Debug Nearest (Java)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = {
|
||||
handlers = {
|
||||
["jdtls"] = function()
|
||||
require("java").setup({
|
||||
java_test = {
|
||||
enable = Util.has("nvim-dap"),
|
||||
},
|
||||
java_debug_adapter = {
|
||||
enable = Util.has("nvim-dap"),
|
||||
},
|
||||
jdk = {
|
||||
auto_install = false,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
"rcasia/neotest-java",
|
||||
},
|
||||
opts = {
|
||||
adapters = {
|
||||
["neotest-java"] = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,5 +1,67 @@
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||
{
|
||||
"simrat39/rust-tools.nvim",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^3", -- Recommended
|
||||
ft = { "rust" },
|
||||
opts = {
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
-- register which-key mappings
|
||||
local wk = require("which-key")
|
||||
-- stylua: ignore
|
||||
wk.register({
|
||||
["<leader>cR"] = { function() vim.cmd.RustLsp("codeAction") end, "Code Action" },
|
||||
["<leader>dr"] = { function() vim.cmd.RustLsp("debuggables") end, "Rust debuggables" },
|
||||
}, { mode = "n", buffer = bufnr })
|
||||
end,
|
||||
settings = {
|
||||
-- rust-analyzer language server configuration
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
loadOutDirsFromCheck = true,
|
||||
runBuildScripts = true,
|
||||
},
|
||||
-- Add clippy lints for Rust.
|
||||
checkOnSave = {
|
||||
allFeatures = true,
|
||||
command = "clippy",
|
||||
extraArgs = { "--no-deps" },
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
ignored = {
|
||||
["async-trait"] = { "async_trait" },
|
||||
["napi-derive"] = { "napi" },
|
||||
["async-recursion"] = { "async_recursion" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
vim.g.rustaceanvim = vim.tbl_deep_extend("force", {}, opts or {})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
rust_analyzer = {},
|
||||
},
|
||||
setup = {
|
||||
rust_analyzer = function()
|
||||
return true
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"luckasRanarison/nvim-devdocs",
|
||||
optional = true,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
return {
|
||||
{ import = "pugins.extras.lang.web.typescript-extended" },
|
||||
{ import = "plugins.extras.lang.web.html" },
|
||||
{ import = "plugins.extras.lang.web.css" },
|
||||
{ import = "plugins.extras.lang.web.html-css" },
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
|
||||
+14
-4
@@ -2,15 +2,19 @@ return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "css", "scss" })
|
||||
end
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"html",
|
||||
"css",
|
||||
"scss",
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
emmet_language_server = {},
|
||||
html = {},
|
||||
cssmodules_ls = {},
|
||||
cssls = {
|
||||
lint = {
|
||||
@@ -39,13 +43,19 @@ return {
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "cssmodules-language-server", "css-lsp" })
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"emmet-language-server",
|
||||
"html-lsp",
|
||||
"cssmodules-language-server",
|
||||
"css-lsp",
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"luckasRanarison/nvim-devdocs",
|
||||
optional = true,
|
||||
ensure_installed = {
|
||||
"html",
|
||||
"css",
|
||||
"sass",
|
||||
},
|
||||
@@ -1,33 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"html",
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
emmet_language_server = {},
|
||||
html = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "emmet-language-server", "html-lsp" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"luckasRanarison/nvim-devdocs",
|
||||
optional = true,
|
||||
ensure_installed = {
|
||||
"html",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,6 +1,15 @@
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"dmmulroy/tsc.nvim",
|
||||
opts = {
|
||||
@@ -95,7 +104,7 @@ return {
|
||||
["neotest-mocha"] = {
|
||||
command = "npm test --",
|
||||
env = { CI = true },
|
||||
cwd = function(path)
|
||||
cwd = function()
|
||||
return vim.fn.getcwd()
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -7,5 +7,16 @@ return {
|
||||
return "BufRead"
|
||||
end
|
||||
end,
|
||||
opts = {},
|
||||
opts = {
|
||||
vt_position = "end_of_line",
|
||||
text_format = function(symbol)
|
||||
if symbol.references then
|
||||
local usage = symbol.references <= 1 and "usage" or "usages"
|
||||
local num = symbol.references == 0 and "no" or symbol.references
|
||||
return string.format(" %s %s", num, usage)
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -10,6 +10,7 @@ return {
|
||||
light = "latte",
|
||||
dark = "macchiato",
|
||||
},
|
||||
term_colors = true,
|
||||
integrations = {
|
||||
alpha = true,
|
||||
cmp = true,
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"HakonHarnes/img-clip.nvim",
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<leader>P", "<cmd>PasteImage<cr>", desc = "Paste clipboard image" },
|
||||
},
|
||||
}
|
||||
@@ -6,5 +6,6 @@ return {
|
||||
extra_keymaps = true,
|
||||
extended_keymaps = true,
|
||||
override_keymaps = true,
|
||||
default_delay = 3,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
---@type string
|
||||
local xdg_config = vim.env.XDG_CONFIG_HOME or vim.env.HOME .. "/.config"
|
||||
|
||||
---@param path string
|
||||
local function have(path)
|
||||
return vim.loop.fs_stat(xdg_config .. "/" .. path) ~= nil
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
import = "lazyvim.plugins.extras.util.dot",
|
||||
},
|
||||
{
|
||||
"luckasRanarison/tree-sitter-hypr",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"luckasRanarison/tree-sitter-hyprlang",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
if have("hypr") then
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "hyprlang" })
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
enabled = function()
|
||||
return have("hypr")
|
||||
end,
|
||||
event = "BufRead */hypr/*.conf",
|
||||
build = ":TSUpdate hyprlang",
|
||||
},
|
||||
}
|
||||
@@ -37,7 +37,7 @@ vim.api.nvim_create_autocmd("User", {
|
||||
vim.keymap.set("n", "<leader>/", [[<cmd>call VSCodeNotify('workbench.action.findInFiles')<cr>]])
|
||||
-- open symbol
|
||||
vim.keymap.set("n", "<leader>ss", [[<cmd>call VSCodeNotify('workbench.action.gotoSymbol')<cr>]])
|
||||
-- view problem
|
||||
-- view problems
|
||||
vim.keymap.set("n", "<leader>xx", [[<cmd>call VSCodeNotify('workbench.actions.view.problems')<cr>]])
|
||||
-- open file explorer in left sidebar
|
||||
vim.keymap.set("n", "<leader>e", [[<cmd>call VSCodeNotify('workbench.view.explorer')<cr>]])
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
return {
|
||||
"rafi/theme-loader.nvim",
|
||||
lazy = false,
|
||||
priority = 999,
|
||||
opts = {},
|
||||
{
|
||||
"rafi/theme-loader.nvim",
|
||||
lazy = false,
|
||||
priority = 999,
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
config = function(_, opts)
|
||||
opts = opts or {}
|
||||
-- disable the colorscheme
|
||||
opts.colorscheme = function() end
|
||||
require("lazyvim").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user