Add a few more formatters, run formatting on files

This commit is contained in:
Evie Litherland-Smith 2023-02-13 12:57:12 +00:00
parent d3ed6bae04
commit ac62702feb
20 changed files with 1035 additions and 999 deletions

View file

@ -1,7 +1,9 @@
# Personal dotfiles
Collection of various settings, configurations and other miscellaneous tools.
## Settings
- [neovim](https://neovim.io)
- [kitty](https://sw.kovidgoyal.net/kitty/)
- [lazygit](https://github.com/jesseduffield/lazygit)
@ -11,9 +13,11 @@ Collection of various settings, configurations and other miscellaneous tools.
- [zsh]() paths and aliases
## Fonts
- [NerdFonts symbols](https://github.com/ryanoasis/nerd-fonts)
## Binaries
- [EFM LSP]()
- [Lazygit]()
- [Lua LSP]()
@ -22,11 +26,13 @@ Collection of various settings, configurations and other miscellaneous tools.
- [Treesitter]()
## Templates
- SSH config
- Python package
- Crontab
## Installation
Run `make` to symlink configs and download extras.
`software.sh` (WIP) installs common programs.

View file

@ -1,7 +1,9 @@
# Vim config
Personal configuration and plugins for Vim
## Installing neovim AppImage
```bash
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
@ -9,23 +11,29 @@ mv nvim.appimage "$HOME/bin/nvim"
```
## Installing configuration
```bash
ln -s /path/to/config/nvim ${XDG_CONFIG_HOME:-$HOME/.config}/nvim
```
### Install script
`install.sh` currently handles installing `Packer` and `pynvim`.
Will also update existing installs if already present.
### Installing `Packer` plugin manager
```bash
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim
```
Plugin definitions are in `plugins.lua`, inside `vim` run `:PackerSync` to install plugins
## Enabling python support
Set up neovim specific virtual environment to install `pynvim` package:
```bash
python3 -m venv "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/venv"
source "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/venv/bin/activate"
@ -34,6 +42,7 @@ source deactivate
```
### Installing language servers using `pipx`
Install [pipx](https://pypa.github.io/pipx/) in chosen manner, e.g. as given in documentation:
```bash
@ -52,4 +61,5 @@ pipx install zimports
```
## Add LUA language server
Follow instructions from [sumneko/lua-language-server GitHub](https://github.com/sumneko/lua-language-server/wiki/Getting-Started#command-line).

View file

@ -1,11 +1,11 @@
-- Set vim options
require 'options'
require("options")
-- Load plugins as defined for Packer
require 'plugins'
require("plugins")
-- Define custom keymappings
require 'keymaps'
require("keymaps")
-- Remaining vim commands to be converted to lua
require 'vimcommands'
require("vimcommands")

View file

@ -1,7 +1,7 @@
local cmp = require 'cmp'
local luasnip = require 'luasnip'
local cmp = require("cmp")
local luasnip = require("luasnip")
require('luasnip.loaders.from_vscode').lazy_load()
require("luasnip.loaders.from_vscode").lazy_load()
cmp.setup({
snippet = {
@ -10,14 +10,14 @@ cmp.setup({
end,
},
mapping = cmp.mapping.preset.insert({
['<C-u>'] = cmp.mapping.scroll_docs(-4), -- Up
['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down
['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm {
["<C-u>"] = cmp.mapping.scroll_docs(-4), -- Up
["<C-d>"] = cmp.mapping.scroll_docs(4), -- Down
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = cmp.mapping(function(fallback)
}),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
@ -25,8 +25,8 @@ cmp.setup({
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
@ -34,42 +34,42 @@ cmp.setup({
else
fallback()
end
end, { 'i', 's' }),
end, { "i", "s" }),
}),
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'latex_symbols' },
}
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = {
{ name = 'git' },
{ name = 'commit' },
{ name = 'buffer' },
}
})
cmp.setup.filetype('markdown', {
sources = {
{ name = 'spell' },
{ name = 'buffer' },
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "latex_symbols" },
},
})
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
-- Set configuration for specific filetype.
cmp.setup.filetype("gitcommit", {
sources = {
{ name = 'buffer' }
}
{ name = "git" },
{ name = "commit" },
{ name = "buffer" },
},
})
cmp.setup.cmdline(':', {
cmp.setup.filetype("markdown", {
sources = {
{ name = "spell" },
{ name = "buffer" },
},
})
cmp.setup.cmdline("/", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'path' },
{ name = 'cmdline' }
}
{ name = "buffer" },
},
})
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "path" },
{ name = "cmdline" },
},
})

View file

@ -140,7 +140,8 @@ _G._generate_user_statusline_highlights = function()
colors["UserRv" .. name] = { fg = value.bg, bg = value.fg, bold = true }
end
local status = vim.o.background == "dark" and { fg = pal.black, bg = pal.white } or { fg = pal.white, bg = pal.black }
local status = vim.o.background == "dark" and { fg = pal.black, bg = pal.white }
or { fg = pal.white, bg = pal.black }
local groups = {
-- statusline

View file

@ -1,4 +1,4 @@
require('gitsigns').setup {
require("gitsigns").setup({
signcolumn = true,
numhl = true,
linehl = false,
@ -14,32 +14,44 @@ require('gitsigns').setup {
end
-- Navigation
map('n', ']c', function()
if vim.wo.diff then return ']c' end
vim.schedule(function() gs.next_hunk() end)
return '<Ignore>'
map("n", "]c", function()
if vim.wo.diff then
return "]c"
end
vim.schedule(function()
gs.next_hunk()
end)
return "<Ignore>"
end, { expr = true })
map('n', '[c', function()
if vim.wo.diff then return '[c' end
vim.schedule(function() gs.prev_hunk() end)
return '<Ignore>'
map("n", "[c", function()
if vim.wo.diff then
return "[c"
end
vim.schedule(function()
gs.prev_hunk()
end)
return "<Ignore>"
end, { expr = true })
-- Actions
map({ 'n', 'v' }, '<leader>hs', ':Gitsigns stage_hunk<CR>')
map({ 'n', 'v' }, '<leader>hr', ':Gitsigns reset_hunk<CR>')
map('n', '<leader>hS', gs.stage_buffer)
map('n', '<leader>hu', gs.undo_stage_hunk)
map('n', '<leader>hR', gs.reset_buffer)
map('n', '<leader>hp', gs.preview_hunk)
map('n', '<leader>hb', function() gs.blame_line { full = true } end)
map('n', '<leader>tb', gs.toggle_current_line_blame)
map('n', '<leader>hd', gs.diffthis)
map('n', '<leader>hD', function() gs.diffthis('~') end)
map('n', '<leader>td', gs.toggle_deleted)
map({ "n", "v" }, "<leader>hs", ":Gitsigns stage_hunk<CR>")
map({ "n", "v" }, "<leader>hr", ":Gitsigns reset_hunk<CR>")
map("n", "<leader>hS", gs.stage_buffer)
map("n", "<leader>hu", gs.undo_stage_hunk)
map("n", "<leader>hR", gs.reset_buffer)
map("n", "<leader>hp", gs.preview_hunk)
map("n", "<leader>hb", function()
gs.blame_line({ full = true })
end)
map("n", "<leader>tb", gs.toggle_current_line_blame)
map("n", "<leader>hd", gs.diffthis)
map("n", "<leader>hD", function()
gs.diffthis("~")
end)
map("n", "<leader>td", gs.toggle_deleted)
-- Text object
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>")
end,
}
})

View file

@ -1,31 +1,16 @@
local lsp_status = require('lsp-status')
lsp_status.config {
local lsp_status = require("lsp-status")
lsp_status.config({
diagnostics = false,
}
})
lsp_status.register_progress()
-- Set up null_ls first
local null_ls = require("null-ls")
null_ls.setup {
sources = {
null_ls.builtins.code_actions.gitsigns,
null_ls.builtins.diagnostics.mypy,
null_ls.builtins.diagnostics.zsh,
null_ls.builtins.formatting.black,
null_ls.builtins.formatting.isort,
null_ls.builtins.formatting.latexindent,
null_ls.builtins.formatting.trim_whitespace,
null_ls.builtins.hover.dictionary,
},
}
-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, opts)
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, opts)
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, opts)
local signs = { Error = "", Warn = "", Hint = "", Info = "" }
for type, icon in pairs(signs) do
@ -51,23 +36,23 @@ local on_attach = function(client, bufnr)
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'gd', '<cmd>Trouble lsp_definitions<cr>', bufopts)
vim.keymap.set('n', 'gR', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', 'gr', '<cmd>Trouble lsp_references<cr>', bufopts)
vim.keymap.set('n', 'gI', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', 'gi', '<cmd>Trouble lsp_implementations<cr>', bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<leader>wl', function()
vim.keymap.set("n", "gD", vim.lsp.buf.definition, bufopts)
vim.keymap.set("n", "gd", "<cmd>Trouble lsp_definitions<cr>", bufopts)
vim.keymap.set("n", "gR", vim.lsp.buf.references, bufopts)
vim.keymap.set("n", "gr", "<cmd>Trouble lsp_references<cr>", bufopts)
vim.keymap.set("n", "gI", vim.lsp.buf.implementation, bufopts)
vim.keymap.set("n", "gi", "<cmd>Trouble lsp_implementations<cr>", bufopts)
vim.keymap.set("n", "K", vim.lsp.buf.hover, bufopts)
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts)
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set("n", "<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', '<leader>i', lsp_formatting, bufopts)
vim.keymap.set("n", "<leader>D", vim.lsp.buf.type_definition, bufopts)
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, bufopts)
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, bufopts)
vim.keymap.set("n", "<leader>i", lsp_formatting, bufopts)
end
local lsp_flags = {
@ -75,28 +60,48 @@ local lsp_flags = {
debounce_text_changes = 150,
}
local capabilities = vim.tbl_extend('keep', require('cmp_nvim_lsp').default_capabilities(), lsp_status.capabilities)
local capabilities = vim.tbl_extend("keep", require("cmp_nvim_lsp").default_capabilities(), lsp_status.capabilities)
require('lspconfig')['pyright'].setup{
-- Set up null_ls first
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.code_actions.gitsigns,
null_ls.builtins.diagnostics.mypy,
null_ls.builtins.diagnostics.zsh,
null_ls.builtins.formatting.black,
null_ls.builtins.formatting.isort,
null_ls.builtins.formatting.trim_whitespace,
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.shfmt,
null_ls.builtins.formatting.prettier,
null_ls.builtins.hover.dictionary,
},
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}
})
require('lspconfig')['fortls'].setup {
require("lspconfig")["pyright"].setup({
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities
}
capabilities = capabilities,
})
require('lspconfig')['sumneko_lua'].setup {
require("lspconfig")["fortls"].setup({
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
})
require("lspconfig")["sumneko_lua"].setup({
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
version = "LuaJIT",
},
diagnostics = {
globals = { 'vim' },
globals = { "vim" },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
@ -110,10 +115,10 @@ require('lspconfig')['sumneko_lua'].setup {
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}
})
require('lspconfig')['texlab'].setup {
require("lspconfig")["texlab"].setup({
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}
})

View file

@ -1,7 +1,7 @@
require('nightfox').setup {
require("nightfox").setup({
options = {
transparent = true,
},
}
require('nightfox').compile()
})
require("nightfox").compile()
vim.cmd("colorscheme nightfox")

View file

@ -1,7 +1,7 @@
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.opt.termguicolors = true
require('nvim-tree').setup {
require("nvim-tree").setup({
disable_netrw = true,
hijack_netrw = true,
hijack_cursor = true,
@ -48,7 +48,7 @@ require('nvim-tree').setup {
filters = {
dotfiles = true,
},
}
})
local function open_nvim_tree(data)
-- buffer is a [No Name]

View file

@ -1,4 +1,4 @@
require("project_nvim").setup {
require("project_nvim").setup({
-- Manual mode doesn't automatically change your root directory, so you have
-- the option to manually do so using `:ProjectRoot` command.
manual_mode = false,
@ -32,9 +32,9 @@ require("project_nvim").setup {
-- * global (default)
-- * tab
-- * win
scope_chdir = 'global',
scope_chdir = "global",
-- Path where project.nvim will store the project history for use in
-- telescope
datapath = vim.fn.stdpath("data"),
}
})

View file

@ -1,7 +1,7 @@
require('telescope.actions')
local trouble = require('trouble.providers.telescope')
require("telescope.actions")
local trouble = require("trouble.providers.telescope")
require('telescope').setup {
require("telescope").setup({
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
@ -25,8 +25,8 @@ require('telescope').setup {
n = { ["<c-t>"] = trouble.open_with_trouble },
},
},
}
})
require('telescope').load_extension('fzf')
require('telescope').load_extension('notify')
require('telescope').load_extension('projects')
require("telescope").load_extension("fzf")
require("telescope").load_extension("notify")
require("telescope").load_extension("projects")

View file

@ -1,5 +1,5 @@
require('toggleterm').setup {
direction = 'horizontal',
require("toggleterm").setup({
direction = "horizontal",
open_mapping = [[\t]],
size = function(term)
if term.direction == "horizontal" then
@ -11,12 +11,12 @@ require('toggleterm').setup {
hide_numbers = true, -- hide the number column in toggleterm buffers
persist_size = false,
float_opts = {
border = 'curved',
border = "curved",
},
winbar = {
enabled = false,
name_formatter = function(term) -- term: Terminal
return term.name
end
end,
},
}
})

View file

@ -1,7 +1,7 @@
require 'nvim-treesitter.configs'.setup {
require("nvim-treesitter.configs").setup({
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
disable = { 'help', 'fortran' },
disable = { "help", "fortran" },
},
}
})

View file

@ -1,4 +1,4 @@
require('trouble').setup {
require("trouble").setup({
position = "bottom", -- position of the list can be: bottom, top, left, right
height = 10, -- height of the trouble list when position is top or bottom
width = 50, -- width of the list when position is left or right
@ -27,7 +27,7 @@ require('trouble').setup {
open_folds = { "zR", "zr" }, -- open all folds
toggle_fold = { "zA", "za" }, -- toggle fold of current file
previous = "k", -- previous item
next = "j" -- next item
next = "j", -- next item
},
indent_lines = true, -- add an indent guide below the fold icons
auto_open = false, -- automatically open the list when you have diagnostics
@ -41,7 +41,7 @@ require('trouble').setup {
warning = "",
hint = "",
information = "",
other = ""
other = "",
},
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
}
})

View file

@ -1,39 +1,39 @@
vim.g.mapleader = ' '
vim.keymap.set('i', 'jk', '<esc>')
vim.g.mapleader = " "
vim.keymap.set("i", "jk", "<esc>")
-- Toggleterm
vim.keymap.set('n', '<leader>th', '<cmd>ToggleTerm direction=horizontal<cr>')
vim.keymap.set('n', '<leader>tv', '<cmd>ToggleTerm direction=vertical<cr>')
vim.keymap.set('n', '<leader>tf', '<cmd>ToggleTerm direction=float<cr>')
vim.keymap.set('n', '<leader>tt', '<cmd>ToggleTerm direction=tab<cr>')
vim.keymap.set("n", "<leader>th", "<cmd>ToggleTerm direction=horizontal<cr>")
vim.keymap.set("n", "<leader>tv", "<cmd>ToggleTerm direction=vertical<cr>")
vim.keymap.set("n", "<leader>tf", "<cmd>ToggleTerm direction=float<cr>")
vim.keymap.set("n", "<leader>tt", "<cmd>ToggleTerm direction=tab<cr>")
-- Aerial
vim.keymap.set('n', '<leader>aa', '<cmd>AerialToggle<cr>')
vim.keymap.set("n", "<leader>aa", "<cmd>AerialToggle<cr>")
-- Telescope
vim.keymap.set('n', '<leader>;', '<cmd>Telescope builtin<cr>')
vim.keymap.set('n', '<leader>ff', '<cmd>Telescope find_files<cr>')
vim.keymap.set('n', '<leader>fg', '<cmd>Telescope live_grep<cr>')
vim.keymap.set('n', '<leader>fp', '<cmd>Telescope projects<cr>')
vim.keymap.set('n', '<leader>fa', '<cmd>Telescope aerial<cr>')
vim.keymap.set('n', '<leader>fl', '<cmd>Telescope lsp_document_symbols<cr>')
vim.keymap.set('n', '<leader>fe', '<cmd>Telescope diagnostics<cr>')
vim.keymap.set('n', '<leader>fs', '<cmd>Telescope treesitter<cr>')
vim.keymap.set('n', '<leader>fz', '<cmd>Telescope current_buffer_fuzzy_find<cr>')
vim.keymap.set("n", "<leader>;", "<cmd>Telescope builtin<cr>")
vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>")
vim.keymap.set("n", "<leader>fg", "<cmd>Telescope live_grep<cr>")
vim.keymap.set("n", "<leader>fp", "<cmd>Telescope projects<cr>")
vim.keymap.set("n", "<leader>fa", "<cmd>Telescope aerial<cr>")
vim.keymap.set("n", "<leader>fl", "<cmd>Telescope lsp_document_symbols<cr>")
vim.keymap.set("n", "<leader>fe", "<cmd>Telescope diagnostics<cr>")
vim.keymap.set("n", "<leader>fs", "<cmd>Telescope treesitter<cr>")
vim.keymap.set("n", "<leader>fz", "<cmd>Telescope current_buffer_fuzzy_find<cr>")
-- Nvim-tree
vim.keymap.set('n', '<leader>n', '<cmd>NvimTreeToggle<cr>')
vim.keymap.set("n", "<leader>n", "<cmd>NvimTreeToggle<cr>")
-- Trouble
vim.keymap.set('n', '<leader>xx', '<cmd>TroubleToggle<cr>')
vim.keymap.set('n', '<leader>xw', '<cmd>TroubleToggle workspace_diagnostics<cr>')
vim.keymap.set('n', '<leader>xd', '<cmd>TroubleToggle document_diagnostics<cr>')
vim.keymap.set('n', '<leader>xq', '<cmd>TroubleToggle quickfix<cr>')
vim.keymap.set('n', '<leader>xl', '<cmd>TroubleToggle loclist<cr>')
vim.keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>")
vim.keymap.set("n", "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>")
vim.keymap.set("n", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>")
vim.keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>")
vim.keymap.set("n", "<leader>xl", "<cmd>TroubleToggle loclist<cr>")
-- Navigator
vim.keymap.set({'n', 't'}, '<A-h>', '<CMD>NavigatorLeft<CR>')
vim.keymap.set({'n', 't'}, '<A-l>', '<CMD>NavigatorRight<CR>')
vim.keymap.set({'n', 't'}, '<A-k>', '<CMD>NavigatorUp<CR>')
vim.keymap.set({'n', 't'}, '<A-j>', '<CMD>NavigatorDown<CR>')
vim.keymap.set({'n', 't'}, '<A-p>', '<CMD>NavigatorPrevious<CR>')
vim.keymap.set({ "n", "t" }, "<A-h>", "<CMD>NavigatorLeft<CR>")
vim.keymap.set({ "n", "t" }, "<A-l>", "<CMD>NavigatorRight<CR>")
vim.keymap.set({ "n", "t" }, "<A-k>", "<CMD>NavigatorUp<CR>")
vim.keymap.set({ "n", "t" }, "<A-j>", "<CMD>NavigatorDown<CR>")
vim.keymap.set({ "n", "t" }, "<A-p>", "<CMD>NavigatorPrevious<CR>")

View file

@ -1,17 +1,17 @@
vim.opt.title = true
vim.g.python3_host_prog = '/usr/bin/python3'
vim.g.python3_host_prog = "/usr/bin/python3"
vim.g.python_indent = {
open_paren = 'shiftwidth()',
nested_paren = 'shiftwidth()',
continue = 'shiftwidth()',
closed_paren_align_last_line = 'v:false',
open_paren = "shiftwidth()",
nested_paren = "shiftwidth()",
continue = "shiftwidth()",
closed_paren_align_last_line = "v:false",
}
vim.opt.termguicolors = true
vim.opt.mouse = "nv"
vim.opt.shiftwidth = 4
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.listchars = { trail = '.', tab = '>_' }
vim.opt.listchars = { trail = ".", tab = ">_" }
vim.opt.list = true
vim.opt.wrap = true
vim.opt.linebreak = true

View file

@ -5,153 +5,153 @@ vim.cmd([[
augroup end
]])
require('packer').startup {
require("packer").startup({
function(use)
use 'wbthomason/packer.nvim'
use 'lewis6991/impatient.nvim'
use 'stevearc/dressing.nvim'
use {
use("wbthomason/packer.nvim")
use("lewis6991/impatient.nvim")
use("stevearc/dressing.nvim")
use({
"EdenEast/nightfox.nvim",
config = function()
require 'config.nightfox'
end
}
use {
'nanozuki/tabby.nvim',
require("config.nightfox")
end,
})
use({
"nanozuki/tabby.nvim",
config = function()
require 'config.tabby'
end
}
use {
'rcarriga/nvim-notify',
require("config.tabby")
end,
})
use({
"rcarriga/nvim-notify",
config = function()
require("notify").setup {
require("notify").setup({
background_colour = "#282c34",
}
})
vim.notify = require("notify")
end
}
use {
'vigoux/notifier.nvim',
end,
})
use({
"vigoux/notifier.nvim",
config = function()
require('notifier')
end
}
use 'kyazdani42/nvim-web-devicons'
use 'nvim-lua/plenary.nvim'
use {
'neovim/nvim-lspconfig',
'https://github.com/nvim-lua/lsp-status.nvim.git',
'hrsh7th/nvim-cmp',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
'f3fora/cmp-spell',
'petertriho/cmp-git',
'Dosx001/cmp-commit',
'kdheepak/cmp-latex-symbols',
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',
'rafamadriz/friendly-snippets',
'windwp/nvim-autopairs',
'https://github.com/jose-elias-alvarez/null-ls.nvim',
}
use {
'nvim-treesitter/nvim-treesitter',
require("notifier")
end,
})
use("kyazdani42/nvim-web-devicons")
use("nvim-lua/plenary.nvim")
use({
"neovim/nvim-lspconfig",
"https://github.com/nvim-lua/lsp-status.nvim.git",
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"f3fora/cmp-spell",
"petertriho/cmp-git",
"Dosx001/cmp-commit",
"kdheepak/cmp-latex-symbols",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets",
"windwp/nvim-autopairs",
"https://github.com/jose-elias-alvarez/null-ls.nvim",
})
use({
"nvim-treesitter/nvim-treesitter",
config = function()
require 'config.treesitter'
end
}
use {
require("config.treesitter")
end,
})
use({
"ThePrimeagen/refactoring.nvim",
requires = {
{ "nvim-lua/plenary.nvim" },
{"nvim-treesitter/nvim-treesitter"}
{ "nvim-treesitter/nvim-treesitter" },
},
config = function()
require("refactoring").setup()
end
}
use {
'tpope/vim-fugitive',
}
use {
'https://github.com/lewis6991/gitsigns.nvim.git',
end,
})
use({
"tpope/vim-fugitive",
})
use({
"https://github.com/lewis6991/gitsigns.nvim.git",
config = function()
require 'config.gitsigns'
end
}
use {
'feline-nvim/feline.nvim',
require("config.gitsigns")
end,
})
use({
"feline-nvim/feline.nvim",
config = function()
require 'config.feline'
end
}
use {
'kyazdani42/nvim-tree.lua',
require("config.feline")
end,
})
use({
"kyazdani42/nvim-tree.lua",
config = function()
require 'config.nvim-tree'
end
}
use {
require("config.nvim-tree")
end,
})
use({
"ahmedkhalf/project.nvim",
config = function()
require 'config.project'
end
}
use {
'akinsho/toggleterm.nvim',
tag = 'v2.*',
require("config.project")
end,
})
use({
"akinsho/toggleterm.nvim",
tag = "v2.*",
config = function()
require 'config.toggleterm'
end
}
use {
'nvim-telescope/telescope-fzf-native.nvim',
run = 'make'
}
use {
'nvim-telescope/telescope.nvim',
branch = '0.1.x',
require("config.toggleterm")
end,
})
use({
"nvim-telescope/telescope-fzf-native.nvim",
run = "make",
})
use({
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
requires = {
{ 'nvim-lua/plenary.nvim' }
{ "nvim-lua/plenary.nvim" },
},
config = function()
require 'config.telescope'
end
}
use {
'folke/trouble.nvim',
require("config.telescope")
end,
})
use({
"folke/trouble.nvim",
config = function()
require 'config.trouble'
end
}
use {
require("config.trouble")
end,
})
use({
"lukas-reineke/indent-blankline.nvim",
config = function()
require('indent_blankline').setup {
require("indent_blankline").setup({
show_current_context = true,
show_current_context_start = false,
}
end
}
use {
'numToStr/Navigator.nvim',
})
end,
})
use({
"numToStr/Navigator.nvim",
config = function()
require('Navigator').setup {
mux = 'auto'
}
end
}
require("Navigator").setup({
mux = "auto",
})
end,
})
end,
config = {
display = {
open_fn = function()
return require('packer.util').float({ border = 'single' })
end
return require("packer.util").float({ border = "single" })
end,
},
}
}
require 'config.lsp'
require 'config.cmp'
},
})
require("config.lsp")
require("config.cmp")

View file

@ -1,6 +1,6 @@
-- TODO convert to lua
vim.cmd("let &t_ut=''") -- For kitty background colour support
vim.cmd [[
vim.cmd([[
au BufRead,BufNewFile *.ipynb setlocal filetype=json
au BufRead,BufNewFile *.md setlocal spell
au BufRead,BufNewFile *.code-workspace setlocal filetype=json
@ -8,4 +8,4 @@ au BufRead,BufNewFile *.csv setlocal nowrap
au BufRead,BufNewFile *.service[a-zA-Z0-9]* setlocal filetype=systemd
au TermOpen * setlocal nonumber norelativenumber
syntax on
]]
]])

View file

@ -2,7 +2,7 @@ fzf
lazygit
lua-language-server
neovim
pyenv
prettier
python
python-black
python-isort
@ -13,6 +13,8 @@ python-pre-commit
python-pynvim
python-virtualenv
ripgrep
shfmt
stylua
tmux
tree-sitter
wezterm