A readme explaining how to make neovim work fast
fold comments now resets global in_docstring
6 files changed, +26 -2
+3-0bashrc.sh
| @@ -23,3 +23,6 @@ PROMPT_COMMAND="wezterm_osc7_cwd; $PROMPT_COMMAND" | ||
| 23 | 23 | |
| 24 | 24 | # remove stupid zone identifier files |
| 25 | 25 | 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" | ||
| 24 | 24 | local ft = vim.bo.filetype |
| 25 | 25 | if vim.bo.modifiable and not vim.bo.readonly and vim.bo.modified and not vim.tbl_contains(ignore_ft, ft) then |
| 26 | 26 | local file = vim.fn.expand("%t") |
| 27 | - vim.cmd("silent! write") | |
| 28 | 27 | vim.cmd("LazyFormat") |
| 28 | + vim.cmd("silent! write") | |
| 29 | 29 | vim.notify("Autosaved " .. file .. "\nSource " .. opts.event) |
| 30 | 30 | end |
| 31 | 31 | end, |
+1-0lua/config/keymaps/init.lua
| @@ -52,6 +52,7 @@ end, { desc = "Telescope Hidden" }) | ||
| 52 | 52 | |
| 53 | 53 | -- Force comment folding |
| 54 | 54 | vim.keymap.set("n", "zk", function() |
| 55 | + _G.in_docstring = false | |
| 55 | 56 | vim.cmd("UseFoldComment") |
| 56 | 57 | vim.cmd("normal zx") |
| 57 | 58 | vim.cmd("normal zM") |
+3-0lua/config/options.lua
| @@ -42,6 +42,9 @@ vim.g.snacks_animate = false | ||
| 42 | 42 | -- set normal numbers |
| 43 | 43 | vim.cmd("set norelativenumber") |
| 44 | 44 | |
| 45 | +-- fold basic comments | |
| 46 | +-- fold basic comments | |
| 47 | +-- fold basic comments | |
| 45 | 48 | -- fold basic comments |
| 46 | 49 | vim.opt.foldmethod = "expr" |
| 47 | 50 | vim.opt.foldopen = "" |
+3-1lua/plugins/folding.lua
| @@ -1,3 +1,5 @@ | ||
| 1 | +local general = vim.api.nvim_create_augroup("Folding", { clear = true }) | |
| 2 | + | |
| 1 | 3 | -- use comments for fold expression |
| 2 | 4 | -- use comments for fold expression |
| 3 | 5 | -- use comments for fold expression |
| @@ -25,7 +27,7 @@ _G.CommentFoldExpr = function() | ||
| 25 | 27 | if ft == "lua" then |
| 26 | 28 | if line:match("--%[%[") then |
| 27 | 29 | _G.in_docstring = true |
| 28 | - should_fold = true | |
| 30 | + -- should_fold = true | |
| 29 | 31 | end |
| 30 | 32 | if line:match("--%]%]") and _G.in_docstring then |
| 31 | 33 | _G.in_docstring = false |
+15-0lua/plugins/lspconfig.lua
| @@ -2,6 +2,21 @@ return { | ||
| 2 | 2 | { |
| 3 | 3 | "neovim/nvim-lspconfig", |
| 4 | 4 | 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 | + }, | |
| 5 | 20 | inlay_hints = { |
| 6 | 21 | enabled = false, |
| 7 | 22 | }, |