-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrob_options.lua
More file actions
49 lines (43 loc) · 1.25 KB
/
rob_options.lua
File metadata and controls
49 lines (43 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
local function is_wsl()
local uname = vim.fn.systemlist("uname -r")[1] or ""
return uname:match("WSL") ~= nil
end
-- General UI/editor prefs
vim.opt.conceallevel = 0
vim.opt.relativenumber = false
-- LazyVim picker preference
vim.g.lazyvim_picker = "telescope"
-- Clipboard
vim.opt.clipboard = "unnamedplus"
vim.opt.clipboard = "unnamedplus"
if is_wsl then
-- WSL specific settings
-- Add any other WSL-specific configurations here
vim.g.clipboard = {
name = "WslClipboard",
copy = {
["+"] = "xclip -i -selection clipboard",
["*"] = "xclip -i -selection primary",
},
paste = {
["+"] = "xclip -o -selection clipboard | sed 's/\r$//'",
["*"] = "xclip -o -selection primary | sed 's/\r$//'",
},
cache_enabled = 0,
}
else
-- Non-WSL settings
-- Your usual Neovim configuration
end
-- Rust diagnostics source preference (keep if you rely on LazyVim's knob; harmless otherwise).
-- rustaceanvim will still use rust-analyzer for full LSP.
vim.g.lazyvim_rust_diagnostics = "rust-analyzer"
-- Open the :messages in a buffer
-- :MessagesBuffer
vim.api.nvim_create_user_command("MessagesBuffer", function()
vim.cmd("new")
vim.cmd("put =execute('messages')")
vim.bo.buftype = "nofile"
vim.bo.bufhidden = "wipe"
vim.bo.swapfile = false
end, {})