Compare commits
No commits in common. "5b2a2b4dff89dee6a1fce1a4c3427c649ef8ce49" and "87a6044f29873e678072cd777812e63992c1fee0" have entirely different histories.
5b2a2b4dff
...
87a6044f29
3 changed files with 62 additions and 66 deletions
|
@ -1,63 +1,62 @@
|
|||
HOME = os.getenv("HOME")
|
||||
|
||||
if not vim.g.vscode then
|
||||
-- Configure the clipboard to access the "+ and "* registers
|
||||
-- N.B. JavaScript copy buttons on the web do not necessarily work as expected
|
||||
vim.opt.clipboard = "unnamedplus,unnamed"
|
||||
-- Configure the clipboard to access the "+ and "* registers
|
||||
-- N.B. JavaScript copy buttons on the web do not necessarily work as expected
|
||||
vim.opt.clipboard = "unnamedplus,unnamed"
|
||||
|
||||
-- Spaces indentation
|
||||
vim.opt.expandtab = true -- converts tabs to spaces
|
||||
vim.opt.tabstop = 4 -- tab equals 4 spaces
|
||||
vim.opt.shiftwidth = 4 -- indent size in characters
|
||||
-- Spaces indentation
|
||||
vim.opt.expandtab = true -- converts tabs to spaces
|
||||
vim.opt.tabstop = 4 -- tab equals 4 spaces
|
||||
vim.opt.shiftwidth = 4 -- indent size in characters
|
||||
|
||||
-- Show whitespace (:list)
|
||||
vim.opt.listchars = "eol:¬,tab:>-,trail:~,extends:>,precedes:<,space:·"
|
||||
-- Show whitespace (:list)
|
||||
vim.opt.listchars = "eol:¬,tab:>-,trail:~,extends:>,precedes:<,space:·"
|
||||
|
||||
-- Show line numbers
|
||||
vim.opt.number = true
|
||||
-- Show line numbers
|
||||
vim.opt.number = true
|
||||
|
||||
-- Vertically splitting a window (:vsplit) places new window to the right
|
||||
vim.opt.splitright = true
|
||||
-- Vertically splitting a window (:vsplit) places new window to the right
|
||||
vim.opt.splitright = true
|
||||
|
||||
-- Highlight cursor line
|
||||
vim.opt.cursorline = true
|
||||
-- Highlight cursor line
|
||||
vim.opt.cursorline = true
|
||||
|
||||
-- Enable folding
|
||||
vim.opt.foldmethod = "syntax"
|
||||
vim.opt.foldlevel = 5
|
||||
-- Enable folding
|
||||
vim.opt.foldmethod = "syntax"
|
||||
vim.opt.foldlevel = 5
|
||||
|
||||
-- Enable 24-bit RGB color in the TUI
|
||||
vim.opt.termguicolors = true
|
||||
-- Enable 24-bit RGB color in the TUI
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
-- Minimal number of lines kept above and below the cursor
|
||||
vim.opt.scrolloff = 5
|
||||
-- Minimal number of lines kept above and below the cursor
|
||||
vim.opt.scrolloff = 5
|
||||
|
||||
-- Turn off highlight search
|
||||
vim.opt.hlsearch = false
|
||||
-- Turn off highlight search
|
||||
vim.opt.hlsearch = false
|
||||
|
||||
-- Temporary file locations
|
||||
vim.opt.backupdir = ".backup/," .. HOME .. "/.backup/,/tmp//"
|
||||
vim.opt.directory = ".swp/," .. HOME .. "/.swp/,/tmp//"
|
||||
-- Temporary file locations
|
||||
vim.opt.backupdir = ".backup/," .. HOME .. "/.backup/,/tmp//"
|
||||
vim.opt.directory = ".swp/," .. HOME .. "/.swp/,/tmp//"
|
||||
|
||||
-- netrw
|
||||
-- This is the workspace file explorer
|
||||
vim.g.netrw_winsize = 25 -- width of the file explorer
|
||||
vim.g.netrw_liststyle = 3 -- tree style listing
|
||||
-- netrw
|
||||
-- This is the workspace file explorer
|
||||
vim.g.netrw_winsize = 25 -- width of the file explorer
|
||||
vim.g.netrw_liststyle = 3 -- tree style listing
|
||||
|
||||
-- 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-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' })
|
||||
-- N.B. This conflicts with the NetRW directory refresh command. Use the alternative `:e .`.
|
||||
-- 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' })
|
||||
-- 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-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' })
|
||||
-- N.B. This conflicts with the NetRW directory refresh command. Use the alternative `:e .`.
|
||||
-- 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("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-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-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-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(
|
||||
vim.keymap.set(
|
||||
{ "n", "t" },
|
||||
"<leader>z",
|
||||
function()
|
||||
|
@ -67,18 +66,17 @@ if not vim.g.vscode then
|
|||
end
|
||||
end,
|
||||
{ desc = "Revert window layout" }
|
||||
)
|
||||
)
|
||||
|
||||
local terminalgroup = vim.api.nvim_create_augroup("TerminalGroup", { clear = true })
|
||||
vim.api.nvim_create_autocmd(
|
||||
local terminalgroup = vim.api.nvim_create_augroup("TerminalGroup", { clear = true })
|
||||
vim.api.nvim_create_autocmd(
|
||||
{ "TermOpen", "TermEnter" },
|
||||
{
|
||||
group = terminalgroup,
|
||||
pattern = "*",
|
||||
command = "set nonumber"
|
||||
}
|
||||
)
|
||||
end
|
||||
)
|
||||
|
||||
-- lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
@ -1,2 +0,0 @@
|
|||
return {
|
||||
}
|
Loading…
Add table
Reference in a new issue