Compare commits

..

No commits in common. "5b2a2b4dff89dee6a1fce1a4c3427c649ef8ce49" and "87a6044f29873e678072cd777812e63992c1fee0" have entirely different histories.

3 changed files with 62 additions and 66 deletions

View file

@ -1,63 +1,62 @@
HOME = os.getenv("HOME") HOME = os.getenv("HOME")
if not vim.g.vscode then -- Configure the clipboard to access the "+ and "* registers
-- Configure the clipboard to access the "+ and "* registers -- N.B. JavaScript copy buttons on the web do not necessarily work as expected
-- N.B. JavaScript copy buttons on the web do not necessarily work as expected vim.opt.clipboard = "unnamedplus,unnamed"
vim.opt.clipboard = "unnamedplus,unnamed"
-- Spaces indentation -- Spaces indentation
vim.opt.expandtab = true -- converts tabs to spaces vim.opt.expandtab = true -- converts tabs to spaces
vim.opt.tabstop = 4 -- tab equals 4 spaces vim.opt.tabstop = 4 -- tab equals 4 spaces
vim.opt.shiftwidth = 4 -- indent size in characters vim.opt.shiftwidth = 4 -- indent size in characters
-- Show whitespace (:list) -- Show whitespace (:list)
vim.opt.listchars = "eol:¬,tab:>-,trail:~,extends:>,precedes:<,space:·" vim.opt.listchars = "eol:¬,tab:>-,trail:~,extends:>,precedes:<,space:·"
-- Show line numbers -- Show line numbers
vim.opt.number = true vim.opt.number = true
-- Vertically splitting a window (:vsplit) places new window to the right -- Vertically splitting a window (:vsplit) places new window to the right
vim.opt.splitright = true vim.opt.splitright = true
-- Highlight cursor line -- Highlight cursor line
vim.opt.cursorline = true vim.opt.cursorline = true
-- Enable folding -- Enable folding
vim.opt.foldmethod = "syntax" vim.opt.foldmethod = "syntax"
vim.opt.foldlevel = 5 vim.opt.foldlevel = 5
-- Enable 24-bit RGB color in the TUI -- Enable 24-bit RGB color in the TUI
vim.opt.termguicolors = true vim.opt.termguicolors = true
-- Minimal number of lines kept above and below the cursor -- Minimal number of lines kept above and below the cursor
vim.opt.scrolloff = 5 vim.opt.scrolloff = 5
-- Turn off highlight search -- Turn off highlight search
vim.opt.hlsearch = false vim.opt.hlsearch = false
-- Temporary file locations -- Temporary file locations
vim.opt.backupdir = ".backup/," .. HOME .. "/.backup/,/tmp//" vim.opt.backupdir = ".backup/," .. HOME .. "/.backup/,/tmp//"
vim.opt.directory = ".swp/," .. HOME .. "/.swp/,/tmp//" vim.opt.directory = ".swp/," .. HOME .. "/.swp/,/tmp//"
-- netrw -- netrw
-- This is the workspace file explorer -- This is the workspace file explorer
vim.g.netrw_winsize = 25 -- width of the file explorer vim.g.netrw_winsize = 25 -- width of the file explorer
vim.g.netrw_liststyle = 3 -- tree style listing vim.g.netrw_liststyle = 3 -- tree style listing
-- Sane vim split naviagation (via Gaslight blog) -- Sane vim split naviagation (via Gaslight blog)
vim.keymap.set("n", "<c-j>", "<c-w>j", { noremap = true, desc = 'Go to window below' }) vim.keymap.set("n", "<c-j>", "<c-w>j", { noremap = true, desc = 'Go to window below' })
vim.keymap.set("n", "<c-k>", "<c-w>k", { noremap = true, desc = 'Go to window above' }) vim.keymap.set("n", "<c-k>", "<c-w>k", { noremap = true, desc = 'Go to window above' })
vim.keymap.set("n", "<c-h>", "<c-w>h", { noremap = true, desc = 'Go to window to the left' }) vim.keymap.set("n", "<c-h>", "<c-w>h", { noremap = true, desc = 'Go to window to the left' })
-- N.B. This conflicts with the NetRW directory refresh command. Use the alternative `:e .`. -- N.B. This conflicts with the NetRW directory refresh command. Use the alternative `:e .`.
-- TODO: This seems not to work for netrw. -- TODO: This seems not to work for netrw.
vim.keymap.set("n", "<c-l>", "<c-w>l", { noremap = true, desc = 'Go to window to the right' }) vim.keymap.set("n", "<c-l>", "<c-w>l", { noremap = true, desc = 'Go to window to the right' })
vim.keymap.set("t", "<c-j>", "<c-\\><c-n><c-w>j", { noremap = true, desc = 'Go to window below' }) vim.keymap.set("t", "<c-j>", "<c-\\><c-n><c-w>j", { noremap = true, desc = 'Go to window below' })
vim.keymap.set("t", "<c-k>", "<c-\\><c-n><c-w>k", { noremap = true, desc = 'Go to window above' }) vim.keymap.set("t", "<c-k>", "<c-\\><c-n><c-w>k", { noremap = true, desc = 'Go to window above' })
vim.keymap.set("t", "<c-h>", "<c-\\><c-n><c-w>h", { noremap = true, desc = 'Go to window to the left' }) vim.keymap.set("t", "<c-h>", "<c-\\><c-n><c-w>h", { noremap = true, desc = 'Go to window to the left' })
vim.keymap.set("t", "<c-l>", "<c-\\><c-n><c-w>l", { noremap = true, desc = 'Go to window to the right' }) vim.keymap.set("t", "<c-l>", "<c-\\><c-n><c-w>l", { noremap = true, desc = 'Go to window to the right' })
vim.keymap.set( vim.keymap.set(
{ "n", "t" }, { "n", "t" },
"<leader>z", "<leader>z",
function() function()
@ -67,18 +66,17 @@ if not vim.g.vscode then
end end
end, end,
{ desc = "Revert window layout" } { desc = "Revert window layout" }
) )
local terminalgroup = vim.api.nvim_create_augroup("TerminalGroup", { clear = true }) local terminalgroup = vim.api.nvim_create_augroup("TerminalGroup", { clear = true })
vim.api.nvim_create_autocmd( vim.api.nvim_create_autocmd(
{ "TermOpen", "TermEnter" }, { "TermOpen", "TermEnter" },
{ {
group = terminalgroup, group = terminalgroup,
pattern = "*", pattern = "*",
command = "set nonumber" command = "set nonumber"
} }
) )
end
-- lazy.nvim -- lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"

View file

@ -1,2 +0,0 @@
return {
}