diff --git a/nvim/init.lua b/nvim/init.lua index a90e98b..3157200 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -4,3 +4,6 @@ require("plugin_manager") require("interface") require("languages") require("tabbing") +require("keybinds") + +require("repl_cfg") diff --git a/nvim/lua/interface.lua b/nvim/lua/interface.lua index bfae6a4..de5465f 100644 --- a/nvim/lua/interface.lua +++ b/nvim/lua/interface.lua @@ -1,6 +1,7 @@ -- Interface settings --- Set preferred colour scheme here; it will be substituted below -local colours = "scheakur" +-- Set preferred colour scheme/background colour here; it will be substituted below +local colours = "aurora" +local background = "light" -- Show line numbers vim.wo.number = true @@ -10,6 +11,6 @@ vim.wo.number = true -- but true-colour otherwise vim.o.termguicolors = (os.getenv("TERM") ~= "linux") -vim.o.background = "dark" +vim.o.background = background vim.cmd("syntax on") vim.cmd(string.gsub("colorscheme ", "$", colours)) diff --git a/nvim/lua/keybinds.lua b/nvim/lua/keybinds.lua new file mode 100644 index 0000000..1cbc262 --- /dev/null +++ b/nvim/lua/keybinds.lua @@ -0,0 +1,15 @@ +-- Keybinds +-- +local map = vim.api.nvim_set_keymap +local noremap = { noremap = true } + +-- Map leader key to +-- map("n", "", "", {}) +vim.g.mapleader = "\\" -- double slash because single is escape +-- Default leader key is \ + +-- Repl.nvim keybinds +-- +map("n", "r", "(ReplSend)", {}) +map("n", "rr", "(ReplSendLine)", {}) +map("v", "r", "(ReplSend)", {}) diff --git a/nvim/lua/languages.lua b/nvim/lua/languages.lua index 28ce8e1..5379ec5 100644 --- a/nvim/lua/languages.lua +++ b/nvim/lua/languages.lua @@ -3,8 +3,11 @@ -- ALE settings -- Which linters to use vim.g.ale_linters = { - ["python"] = {"pycodestyle", "pylint"}, + ["java"] = {"javac"}, + ["python"] = {"pycodestyle", "pydocstyle", "bandit", "mypy", "vulture"}, + ["lua"] = {"luac", "luacheck"}, } + -- When to run linters vim.g.ale_lint_on_text_changed = 1 vim.g.ale_lint_on_insert_leave = 0 @@ -29,3 +32,4 @@ vim.g.ale_completion_max_suggestions = 6 -- zig.vim config -- Do not autoformat code on save vim.g.zig_fmt_autosave = 0 + diff --git a/nvim/lua/plugin_manager.lua b/nvim/lua/plugin_manager.lua index d836084..e1d1ec9 100644 --- a/nvim/lua/plugin_manager.lua +++ b/nvim/lua/plugin_manager.lua @@ -11,7 +11,7 @@ return require("packer").startup(function() -- Language support -- Zig - use {"ziglang/zig.vim", ft={"zig"}} + use "ziglang/zig.vim" -- Odin use {"Tetralux/odin.vim", ft={"odin"}} -- Pony @@ -20,6 +20,9 @@ return require("packer").startup(function() -- Pencil, for writing prose use "reedes/vim-pencil" + -- REPL, for, uh, REPLs + use "https://gitlab.com/HiPhish/repl.nvim.git" + -- Colour schemes use "nightsense/cosmic_latte" use "scheakur/vim-scheakur" @@ -27,6 +30,6 @@ return require("packer").startup(function() use "nice/sweater" use "ajgrf/sprinkles" use "xero/sourcerer.vim" - use "franbahc/miramare" + use "franbach/miramare" use "everard/vim-aurora" end) diff --git a/nvim/lua/repl_cfg.lua b/nvim/lua/repl_cfg.lua new file mode 100644 index 0000000..9b985af --- /dev/null +++ b/nvim/lua/repl_cfg.lua @@ -0,0 +1,8 @@ +-- Configuration for repl.nvim's REPLs + +-- REPL setup +vim.g.repl = { + ["python"] = {["syntax"] = "python"}, + ["racket"] = {["syntax"] = "scheme"}, + ["lua"] = {["syntax"] = "lua"} +}