Formatter, Linter, LSP, DAP 管理器: mason 与mason-installer 补全: nvim-cmp Snippets: nvim-snippy Markdown: plasticboy/vim-markdown 与markdown-preview 与headlines.nvim 与vim-MarkdownTOC 括号配对: nvim-surround 与nvim-autop
笔者遇到的问题主要是在Python文件中,不希望对代码宽度小于125的代码进行分行的格式化(也就是一行代码拆成多行,避免过长)。 如果在每个项目里都新建一个pyproject.toml又有点太蠢了,想要弄一个全局配置。 全局配置Ruff Formatter 在~/.config/文件夹下新建文件夹ruff,然后在ruff文件夹在新建文件pyproject.toml,在...
"formatter") if (not status) then return end formatter.setup( { filetype = { lua = { -- luafmt function() return { exe = "luafmt", args = {"--indent-count", 2, "--stdin"}, stdin = true } end }, python = { function() return { exe = "python3 -m autopep8", args ...
Python: one of Jedi Language Server Python LSP Server Pyright Rust: Rust Analyzer LaTeX: TexLab VimL: VimLS Markdown: Marksman Go: Gopls Typescript: Typescript Language Server and Biome General-purpose language server: EFM Language Server Already configured for Black (formatter) Shfmt...
Make sure the formatter or linter is installed and add it to this setup function: null-ls NOTE Some are already setup as examples, remove them if you want Plugins You can install new plugins here: plugins Heres the wiki for installing new plugins refer to this: wiki Plugins alpha-nvim bu...
nvim ~/.config/nvim/after/plugin/formatter.lualocalstatus, formatter =pcall(require,"formatter")if(notstatus)thenreturnendformatter.setup( { filetype = { lua = {-- luafmtfunction()return{ exe ="luafmt", args = {"--indent-count",2,"--stdin"},stdin=true}end}, python = {function()...
{ source = 'hrsh7th/nvim-cmp' }) add({ source = 'zbirenbaum/copilot.lua' }) add({ source = 'HakonHarnes/img-clip.nvim' }) add({ source = 'MeanderingProgrammer/render-markdown.nvim' }) later(function() require('render-markdown').setup({...}) end) later(function() require...
首先定义一个局部变量lazypath,它是Lazy.nvim插件的存放路径,通常位于~\.local\share\nvim\lazy\目录下。 然后检测Lazy.nvim是否被安装,如果在lazypath中没有找到它,就通过Git克隆这个插件到lazypath。 最后将lazypath加入runtimepath,这样Neovim就能找到插件。
利用autoformat 实现中文标点自动格式化 (对 latex 与 markdown 开启,在应用端修正了上游 formatter 的添加空行问题),利用 jieba 实现中文分词,部分使用 hack 的方式解决了上游以及自动格式化的一些问题; iTerm2 / kitty 终端下的 pdf 终端预览,基于 tdf 阅读器与 GPU 加速,允许利用快捷键 <localleader>lf 实现精...
-- python = { "isort", "black" }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, }, }, }, { -- Autocompletion "hrsh7th/nvim-cmp", event = "InsertEnter", ...