refactor(nvim): add / enable a bunch of stuff

chezmoi
sgoudham 2 years ago
parent 011dee305e
commit e69e163b38
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

@ -1,5 +1,4 @@
{ {
"Comment.nvim": { "branch": "master", "commit": "eab2c83a0207369900e92783f56990808082eac2" },
"LuaSnip": { "branch": "master", "commit": "d404ec306bfa4cdb0c3605dbb17e8a93a9597337" }, "LuaSnip": { "branch": "master", "commit": "d404ec306bfa4cdb0c3605dbb17e8a93a9597337" },
"actually.nvim": { "branch": "main", "commit": "a735082694b1f06c4d9874f2a7288dba94acdb71" }, "actually.nvim": { "branch": "main", "commit": "a735082694b1f06c4d9874f2a7288dba94acdb71" },
"ascii-blocks.nvim": { "branch": "main", "commit": "a8a7d99fc52df30d7c4e7664818542fd44839d97" }, "ascii-blocks.nvim": { "branch": "main", "commit": "a8a7d99fc52df30d7c4e7664818542fd44839d97" },
@ -16,6 +15,7 @@
"delaytrain.nvim": { "branch": "main", "commit": "eb8d2157e6a7de1b4f024f7ca5bccc4014d88b05" }, "delaytrain.nvim": { "branch": "main", "commit": "eb8d2157e6a7de1b4f024f7ca5bccc4014d88b05" },
"dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" }, "dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" },
"feline.nvim": { "branch": "master", "commit": "d48b6f92c6ccdd6654c956f437be49ea160b5b0c" }, "feline.nvim": { "branch": "master", "commit": "d48b6f92c6ccdd6654c956f437be49ea160b5b0c" },
"gitsigns.nvim": { "branch": "main", "commit": "ec4742a7eebf68bec663041d359b95637242b5c3" },
"haskell-tools.nvim": { "branch": "master", "commit": "03dfa7fa3d08a34cdef09ca05a6da166a1ba22a2" }, "haskell-tools.nvim": { "branch": "master", "commit": "03dfa7fa3d08a34cdef09ca05a6da166a1ba22a2" },
"lazy.nvim": { "branch": "main", "commit": "3d2dcb2d5ef99106c5ff412da88c6f59a9f8a693" }, "lazy.nvim": { "branch": "main", "commit": "3d2dcb2d5ef99106c5ff412da88c6f59a9f8a693" },
"lsp-format.nvim": { "branch": "master", "commit": "ca0df5c8544e51517209ea7b86ecc522c98d4f0a" }, "lsp-format.nvim": { "branch": "master", "commit": "ca0df5c8544e51517209ea7b86ecc522c98d4f0a" },
@ -45,6 +45,7 @@
"overseer.nvim": { "branch": "master", "commit": "42c0d69f505314d6994a84da4e3fcbaf308c1a86" }, "overseer.nvim": { "branch": "master", "commit": "42c0d69f505314d6994a84da4e3fcbaf308c1a86" },
"plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" }, "plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" },
"py_lsp.nvim": { "branch": "main", "commit": "6f160d0e1864b1a46c932c542a132a57abd7f1c1" }, "py_lsp.nvim": { "branch": "main", "commit": "6f160d0e1864b1a46c932c542a132a57abd7f1c1" },
"quick-scope": { "branch": "master", "commit": "428e8698347f254d24b248af9f656194a80081e5" }, "quick-scope": { "branch": "master", "commit": "428e8698347f254d24b248af9f656194a80081e5" },
"rust-tools.nvim": { "branch": "master", "commit": "b297167d9e01accc9b9afe872ce91e791df2dde0" }, "rust-tools.nvim": { "branch": "master", "commit": "b297167d9e01accc9b9afe872ce91e791df2dde0" },

@ -3,6 +3,12 @@
vim.opt.number = true vim.opt.number = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
-- don't show status
vim.opt.showmode = false
-- don't jump around when signs appear
vim.opt.signcolumn = "yes"
-- default to 4 spaces for indentation -- default to 4 spaces for indentation
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 4
vim.opt.tabstop = 4 vim.opt.tabstop = 4
@ -21,9 +27,6 @@ vim.opt.laststatus = 3
-- apparently this makes cmp work -- apparently this makes cmp work
vim.opt.completeopt = "menu,menuone,noselect" vim.opt.completeopt = "menu,menuone,noselect"
-- no more jumping around when signs arrive
vim.opt.signcolumn = "yes"
-- live life dangerously -- live life dangerously
vim.opt.swapfile = true vim.opt.swapfile = true
vim.opt.backup = true vim.opt.backup = true
@ -44,11 +47,3 @@ vim.opt.timeoutlen = 500
-- 24bit tui colours -- 24bit tui colours
vim.opt.termguicolors = true vim.opt.termguicolors = true
-- gui/neovide stuff
vim.opt.guifont = "Fantasque Sans Mono:h13"
if vim.g.neovide then
vim.g.neovide_cursor_vfx_mode = "pixiedust"
vim.g.neovide_cursor_vfx_particle_density = 50
end

@ -50,6 +50,7 @@ return {
TelescopeTitle = { fg = cp.subtext0 }, TelescopeTitle = { fg = cp.subtext0 },
QuickScopePrimary = { fg = cp.maroon }, QuickScopePrimary = { fg = cp.maroon },
QuickScopeSecondary = { fg = cp.peach }, QuickScopeSecondary = { fg = cp.peach },
-- MiniIndentscopeSymbol = { fg = cp.blue },
}, },
}) })
vim.cmd.colorscheme("catppuccin") vim.cmd.colorscheme("catppuccin")

@ -62,15 +62,23 @@ return {
sign("DapLogPoint", { text = "", texthl = "DapLogPoint", linehl = "", numhl = "" }) sign("DapLogPoint", { text = "", texthl = "DapLogPoint", linehl = "", numhl = "" })
end, end,
keys = { keys = {
{ "<leader>xb", vim.cmd.DapToggleBreakpoint, desc = "Toggle breakpoint" },
{ {
"<leader>xu", "<leader>db",
vim.cmd.DapToggleBreakpoint,
desc = "Toggle breakpoint",
},
{
"<leader>du",
function() function()
require("dapui").toggle({}) require("dapui").toggle({})
end, end,
desc = "Toggle UI", desc = "Toggle UI",
}, },
{ "<leader>xx", vim.cmd.DapContinue, desc = "Start / Continue" }, {
"<leader>dx",
vim.cmd.DapContinue,
desc = "Start / Continue",
},
}, },
dependencies = { dependencies = {
"williamboman/mason.nvim", "williamboman/mason.nvim",

@ -3,7 +3,7 @@ return {
"ja-ford/delaytrain.nvim", "ja-ford/delaytrain.nvim",
config = { config = {
grace_period = 3, grace_period = 3,
ignore_filetypes = {"help", "NvimTr*", "toggleterm"} ignore_filetypes = { "help", "NvimTr*", "lazy", "mason" },
}, },
}, },
} }

@ -5,9 +5,22 @@ return {
local feline = require("feline") local feline = require("feline")
local ctp_feline = require("catppuccin.groups.integrations.feline") local ctp_feline = require("catppuccin.groups.integrations.feline")
feline.setup({
components = ctp_feline.get(),
force_inactive = {
filetypes = {
-- "^NvimTree$",
"^packer$",
"^startify$",
"^fugitive$",
"^fugitiveblame$",
"^qf$",
"^help$",
},
},
})
-- catppuccin statusline -- catppuccin statusline
ctp_feline.setup({}) ctp_feline.setup({})
feline.setup({ components = ctp_feline.get() })
end, end,
dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { "nvim-tree/nvim-web-devicons" },
}, },

@ -32,18 +32,17 @@ local default_config = {
map("K", vim.lsp.buf.hover, "Hover") map("K", vim.lsp.buf.hover, "Hover")
map("]d", vim.diagnostic.goto_next, "Next diagnostic") map("]d", vim.diagnostic.goto_next, "Next diagnostic")
map("[d", vim.diagnostic.goto_prev, "Previous diagnostic") map("[d", vim.diagnostic.goto_prev, "Previous diagnostic")
-- add git signs later
map("<leader>la", vim.lsp.buf.code_action, "Code Action") map("<leader>la", vim.lsp.buf.code_action, "Code Action")
map("<leader>lr", vim.lsp.buf.rename, "Rename") map("<leader>lr", vim.lsp.buf.rename, "Rename")
map("<leader>lf", vim.lsp.buf.format, "Format") map("<leader>lf", vim.lsp.buf.format, "Format")
map("<leader>li", "<cmd>LspInfo<cr>", "LSP Info")
map("<leader>lI", "<cmd>Mason<cr>", "Mason Info")
map("<leader>lw", function() map("<leader>lw", function()
require("telescope.builtin").diagnostics() require("telescope.builtin").diagnostics()
end, "LSP Workplace Diagnostics") end, "LSP Workplace Diagnostics")
map("<leader>ld", function() map("<leader>ld", function()
require("telescope.builtin").diagnostics({ require("telescope.builtin").diagnostics({ bufnr = 0 })
bufnr = 0,
})
end, "LSP Buffer Diagnostics") end, "LSP Buffer Diagnostics")
map("<leader>ls", function() map("<leader>ls", function()
require("telescope.builtin").lsp_document_symbols() require("telescope.builtin").lsp_document_symbols()
@ -114,8 +113,8 @@ return {
local opts = vim.tbl_extend("keep", def_opts, { buffer = bufnr }) local opts = vim.tbl_extend("keep", def_opts, { buffer = bufnr })
-- haskell-language-server relies heavily on codeLenses, -- haskell-language-server relies heavily on codeLenses,
-- so auto-refresh (see advanced configuration) is enabled by default -- so auto-refresh (see advanced configuration) is enabled by default
vim.keymap.set("n", "<space>ca", vim.lsp.codelens.run, opts) -- vim.keymap.set("n", "<space>ca", vim.lsp.codelens.run, opts)
vim.keymap.set("n", "<space>hs", ht.hoogle.hoogle_signature, opts) -- vim.keymap.set("n", "<space>hs", ht.hoogle.hoogle_signature, opts)
end, end,
}, },
}) })

@ -1,6 +1,8 @@
return { return {
{ {
"williamboman/mason.nvim", "williamboman/mason.nvim",
config = { ui = { border = "rounded" } }, config = {
} ui = { border = "rounded" },
},
},
} }

@ -5,6 +5,10 @@ return {
-- add gc/gcc actions, gc textobject -- add gc/gcc actions, gc textobject
require("mini.comment").setup({}) require("mini.comment").setup({})
-- autochange dir
-- require("mini.misc").setup({})
-- MiniMisc.setup_auto_root()
-- highlight word under cursor -- highlight word under cursor
require("mini.cursorword").setup({ delay = 0 }) require("mini.cursorword").setup({ delay = 0 })
@ -14,5 +18,5 @@ return {
symbol = "", symbol = "",
}) })
end, end,
} },
} }

@ -2,13 +2,14 @@ return {
{ {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
config = function() config = function()
require("telescope").load_extension("projects")
require("telescope").load_extension("fzy_native") require("telescope").load_extension("fzy_native")
require("telescope").load_extension("catppuccin") require("telescope").load_extension("catppuccin")
require("telescope").load_extension("smart_open") require("telescope").load_extension("smart_open")
end, end,
keys = { keys = {
-- { "<leader>fg", "<cmd>Telescope git_files<cr>", "Git files" },
{ "<leader>ff", "<cmd>Telescope smart_open<cr>", "Find files" }, { "<leader>ff", "<cmd>Telescope smart_open<cr>", "Find files" },
{ "<leader>fp", "<cmd>Telescope projects<cr>", "All Projects" },
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", "Recent Files" }, { "<leader>fr", "<cmd>Telescope oldfiles<cr>", "Recent Files" },
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", "Live grep" }, { "<leader>fg", "<cmd>Telescope live_grep<cr>", "Live grep" },
{ "<leader>fc", "<cmd>Telescope catppuccin<cr>", "Catppuccin Colours" }, { "<leader>fc", "<cmd>Telescope catppuccin<cr>", "Catppuccin Colours" },

@ -9,15 +9,6 @@ return {
require("nvim-treesitter.configs").setup({ require("nvim-treesitter.configs").setup({
ensure_installed = "all", ensure_installed = "all",
highlight = { enable = true }, highlight = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<cr>",
scope_incremental = "<cr>",
node_incremental = "<tab>",
node_decremental = "<s-tab>",
},
},
indent = { enable = false }, indent = { enable = false },
textobjects = { textobjects = {
select = { select = {

@ -7,7 +7,7 @@ return {
window = { window = {
border = "rounded", border = "rounded",
}, },
}) })
wk.register({ wk.register({
g = { name = "Go to" }, g = { name = "Go to" },
@ -16,15 +16,13 @@ return {
}) })
wk.register({ wk.register({
c = { name = "Code" },
f = { name = "Find" }, f = { name = "Find" },
g = { name = "Git" }, g = { name = "Git" },
j = { name = "Jump" }, -- j = { name = "Jump" },
l = { name = "LSP" }, l = { name = "LSP" },
o = { name = "Open" }, -- o = { name = "Open" },
s = { name = "Search" },
t = { name = "Tasks" }, t = { name = "Tasks" },
x = { name = "Debug" }, d = { name = "Debug" },
}, { prefix = "<leader>" }) }, { prefix = "<leader>" })
end, end,
}, },

Loading…
Cancel
Save