select(targets, { prompt = "choose target", format_item = function (item) return item.name end }, function(item) cmake.config.build_target = item.name cmake._save_config_to_cache() end) end) end 2.5 根据源文件查找
本文件中是 treesitter 的配置,主要是自动安装一些常用的 treesitter parser,比如 C/C++/CMake/Python 等,配置如下: { "nvim-treesitter/nvim-treesitter", event = { "BufReadPost", "BufNewFile" }, build = ":TSUpdate", config = function() require("nvim-treesitter.configs").setup({ ensure...
├── fix-yank.lua├── global.lua└── im-select.lua 首先init.lua是整个配置的入口文件,负责引用所有其他的模块,基本上想要打开或关闭某个插件只要在这里修改一行代码即可。 basic.lua:基础配置,是对默认配置的一个重置。 colorscheme.lua:我们安装的主题皮肤配置,在这里切换主题。 keybindings.lua:快捷键...
local common = require("lsp.common-config") local opts = { capabilities = common.capabilities, flags = common.flags, on_attach = function(client, bufnr) -- 禁用本身语言格式化 common.disableFormat(client) common.keyAttach(bufnr) end, } return { on_setup = function(server) server.setup(opt...
created 4 years ago / updated 11 days ago A Neovim plugin to make the LSP client use FZF lspneovim-0.5 colorful-menu.nvim 328 2 created 4 months ago / updated last month Bring enjoyment to your auto completion. color ever
Set quickfixtextfunc option and write down corresponding function:local fn = vim.fn function _G.qftf(info) local items local ret = {} -- The name of item in list is based on the directory of quickfix window.-- Change the directory for quickfix window make the name of item shorter....
If you don't need streaming, just make a request and call handler.on_finish with the result.Basic provider example:local test_provider = { request_completion = function(handlers, params, options) vim.notify(vim.inspect({params=params, options=options})) handlers.on_partial('a response') ...
ci: run tests directly rather than via the Makefile test(main_spec): make "nvim -v" test agnostic to build type test(version_spec): expect vim.NIL, not nil, for "build" if not in a git clone test(main_spec): use CMakePresets.json instead of .git for root marker ...
For anything more than a one-liner, though, I’d rather define a new lua functionFin a scratch file and then make the tasklua F(params). Drawbacks Three drawbacks to this over a real task runner plugin: It doesn’t integrate with quickfix, lsp, etc ...
o.columns * 2 / 3, -- Maximum width of windows component, -- it can also be a function that returns -- the value of `max_length` dynamically. filetype_names = { TelescopePrompt = 'Telescope', dashboard = 'Dashboard', packer = 'Packer', fzf = 'FZF', alpha = 'Alpha' }, --...