Neovide copy and paste and a based Python LSP

ew python
those darn snake charmers (that's practically a slur for python devs,
right?)
This commit is contained in:
foreverpyrite
2025-10-05 17:56:58 -05:00
parent afce2ca400
commit 05d7845b60
7 changed files with 73 additions and 401 deletions

View File

@@ -1,10 +1,30 @@
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")
-- Unfortunately, the file paths are too long and break things
vim.loader.enable(false)
-- Clipboard (hopefully, right now my clipboard provider is tmux ig so...)
vim.o.clipboard = "unnamedplus"
vim.api.nvim_set_keymap("", "<D-v>", "+p<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("!", "<D-v>", "<C-R>+", { noremap = true, silent = true })
vim.api.nvim_set_keymap("t", "<D-v>", "<C-R>+", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<D-v>", "<C-R>+", { noremap = true, silent = true })
-- Is there a way I can set these in neovide config?
if vim.g.neovide then
-- Neovide copy & pasting
vim.keymap.set("n", "<D-s>", ":w<CR>") -- Save
vim.keymap.set("v", "<D-c>", '"+y') -- Copy
vim.keymap.set("n", "<D-v>", '"+P') -- Paste normal mode
vim.keymap.set("v", "<D-v>", '"+P') -- Paste visual mode
vim.keymap.set("c", "<D-v>", "<C-R>+") -- Paste command mode
vim.keymap.set("i", "<D-v>", '<ESC>l"+Pli') -- Paste insert mode
-- Neovide Scaling support
vim.g.neovide_scale_factor = 1.0
local set_scale_factor = function(value)
vim.g.nevoide_scale_factor = value
end
local change_scale_factor = function(delta)
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta
end
@@ -14,10 +34,10 @@ if vim.g.neovide then
vim.keymap.set("n", "<C-->", function()
change_scale_factor(1 / 1.25)
end)
-- Neovide
vim.keymap.set("n", "<C-0>", function()
set_scale_factor(1.0)
end)
-- General Neovide settings
vim.g.neovide_detach_on_quit = "always_detach"
vim.g.neovide_fullscreen = true
end
-- Unfortunately, the file paths are too long and break things
vim.loader.enable(false)

View File

@@ -1,3 +1,8 @@
-- 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
-- LSP Server to use for Python.
vim.g.lazyvim_python_lsp = "basedpyright"
-- Set to "ruff_lsp" to use the old LSP implementation version.
vim.g.lazyvim_python_ruff = "ruff"

View File

@@ -0,0 +1,16 @@
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
basedpyright = {
settings = {
basedpyright = {
analysis = {
typeCheckingMode = "strict",
},
},
},
},
},
},
}

View File

@@ -0,0 +1,25 @@
return {
"andweeb/presence.nvim",
opts = {
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
neovim_image_text = "certifiably NOT getting laid", -- Text displayed when hovered over the Neovim image
main_image = "neovim", -- Main image display (either "neovim" or "file")
client_id = "793271441293967371", -- Use your own Discord application client id (not recommended)
log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
enable_line_number = false, -- Displays the current line number instead of the current project
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
show_time = true, -- Show the timer
-- Rich Presence text options
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
},
}