Configuration for my NixOS based systems and Home Manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Upgrade format, add outline.nvim

+22 -18
+12 -14
nvim/init.lua
··· 72 72 end 73 73 vim.api.nvim_create_user_command("ConjureChicken", set_chicken, {}) 74 74 75 - -- Neoformat 76 - vim.g.neoformat_run_all_formatters = 1 77 - vim.g.neoformat_enabled_python = {"black", "docformatter", "isort"} 78 - vim.g.neoformat_python_black = { 79 - exe = "ruff", 80 - stdin = 1, 81 - args = {'format', '-q', '-'} 82 - } 83 - 84 75 -- KEYMAPS 85 - 86 76 local keymap = vim.keymap.set 87 77 local noremap = {noremap = true} 88 78 local silentnoremap = {noremap = true, silent = true} ··· 140 130 keymap("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", silentnoremap) 141 131 142 132 -- Autoformat! 143 - keymap("n", "<C-n>", "<cmd>Neoformat<cr>", silentnoremap) 144 - 145 - local conform = require("conform") 146 - keymap("n", "<C-n>", conform.format, silentnoremap) 133 + vim.api.nvim_create_user_command("Format", function(args) 134 + local range = nil 135 + if args.count ~= -1 then 136 + local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1] 137 + range = { 138 + start = { args.line1, 0 }, 139 + ["end"] = { args.line2, end_line:len() }, 140 + } 141 + end 142 + require("conform").format({ async = true, lsp_format = "fallback", range = range }) 143 + end, { range = true }) 144 + keymap("n", "<C-n>", "<cmd>Format<CR>", silentnoremap) 147 145 148 146 -- Python Specific 149 147 vim.g.python3_host_prog = vim.fn.expand("~/.envs/nvim/bin/python3")
+10 -4
nvim/lua/plugins.lua
··· 81 81 sh = {"shfmt"}, 82 82 c = {"clang-format"}, 83 83 } 84 - }, -- Distraction free writing: GoYo + Limelight 85 - {"junegunn/limelight.vim", lazy = true, ft = "markdown"}, 86 - {"junegunn/goyo.vim", lazy = true, ft = "markdown"}, -- Golang plugins 87 - -- use {"fatih/vim-go", run = ":GoUpdateBinaries", lazy = true, ft = "go"} 84 + }, 85 + { 86 + "hedyhli/outline.nvim", 87 + lazy = true, 88 + cmd = { "Outline", "OutlineOpen" }, 89 + config = true, 90 + keys = { 91 + { "<leader>o", "<cmd>Outline<cr>", desc = "Toggle outline" }, 92 + }, 93 + }, 88 94 { 89 95 "ray-x/go.nvim", 90 96 ft = "go",