irongit

A readme explaining how to make neovim work fast

fold comments now resets global in_docstring

huncholanehuncholaneauthored
parent 97ce34dcommit ee4a0e6084c2d6f6914a799537fbc23406e39d99Browse files

6 files changed, +26 -2

+3-0bashrc.sh
@@ -23,3 +23,6 @@ PROMPT_COMMAND="wezterm_osc7_cwd; $PROMPT_COMMAND"
2323
2424 # remove stupid zone identifier files
2525 alias rmzif='sudo find . -name "*.Identifier" -type f -delete'
26+
27+# copy last command
28+alias clc='fc -ln -1 | clip.exe'
+1-1lua/config/autocmds/init.lua
@@ -24,8 +24,8 @@ vim.api.nvim_create_autocmd({ "FocusLost", "BufLeave", "CmdlineEnter", "QuitPre"
2424 local ft = vim.bo.filetype
2525 if vim.bo.modifiable and not vim.bo.readonly and vim.bo.modified and not vim.tbl_contains(ignore_ft, ft) then
2626 local file = vim.fn.expand("%t")
27- vim.cmd("silent! write")
2827 vim.cmd("LazyFormat")
28+ vim.cmd("silent! write")
2929 vim.notify("Autosaved " .. file .. "\nSource " .. opts.event)
3030 end
3131 end,
+1-0lua/config/keymaps/init.lua
@@ -52,6 +52,7 @@ end, { desc = "Telescope Hidden" })
5252
5353 -- Force comment folding
5454 vim.keymap.set("n", "zk", function()
55+ _G.in_docstring = false
5556 vim.cmd("UseFoldComment")
5657 vim.cmd("normal zx")
5758 vim.cmd("normal zM")
+3-0lua/config/options.lua
@@ -42,6 +42,9 @@ vim.g.snacks_animate = false
4242 -- set normal numbers
4343 vim.cmd("set norelativenumber")
4444
45+-- fold basic comments
46+-- fold basic comments
47+-- fold basic comments
4548 -- fold basic comments
4649 vim.opt.foldmethod = "expr"
4750 vim.opt.foldopen = ""
+3-1lua/plugins/folding.lua
@@ -1,3 +1,5 @@
1+local general = vim.api.nvim_create_augroup("Folding", { clear = true })
2+
13 -- use comments for fold expression
24 -- use comments for fold expression
35 -- use comments for fold expression
@@ -25,7 +27,7 @@ _G.CommentFoldExpr = function()
2527 if ft == "lua" then
2628 if line:match("--%[%[") then
2729 _G.in_docstring = true
28- should_fold = true
30+ -- should_fold = true
2931 end
3032 if line:match("--%]%]") and _G.in_docstring then
3133 _G.in_docstring = false
+15-0lua/plugins/lspconfig.lua
@@ -2,6 +2,21 @@ return {
22 {
33 "neovim/nvim-lspconfig",
44 opts = {
5+ servers = {
6+ pyright = {
7+ settings = {
8+ python = {
9+ pythonPath = "/home/huncho/anaconda3/bin/python",
10+ analysis = {
11+ autoSearchPaths = true,
12+ useLibraryCodeForTypes = true,
13+ typeCheckingMode = "basic",
14+ diagnosticMode = "workspace",
15+ },
16+ },
17+ },
18+ },
19+ },
520 inlay_hints = {
621 enabled = false,
722 },