Skip to content

Commit

Permalink
feat: add g:python_lsp option
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Sep 8, 2024
1 parent 4b44881 commit 4082f5e
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 13 deletions.
2 changes: 1 addition & 1 deletion root/.config/nvim/lua/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ local function setup_lsp(on_attach, capabilities)
-- npm i -g vscode-langservers-extracted
-- "pylsp": too slow
-- "pylyzer": report too many diagnostics
local other_servers = { "jsonls", "basedpyright", "typst_lsp", "cmake", "html" }
local other_servers = { "jsonls", vim.g.python_lsp, "typst_lsp", "cmake", "html" }
if vim.g.python_formatter == "ruff" then
-- pip install ruff-lsp ruff
table.insert(other_servers, "ruff_lsp")
Expand Down
50 changes: 50 additions & 0 deletions root/.config/nvim/lua/plugins/ai.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,56 @@ elseif vim.g.ai_complete == "copilot" then
-- See Commands section for default commands if you want to lazy load on them
},
"github/copilot.vim",
-- https://github.com/olimorris/codecompanion.nvim
-- {
-- "yetone/avante.nvim",
-- event = "VeryLazy",
-- lazy = false,
-- version = false, -- set this if you want to always pull the latest change
-- opts = {
-- -- add any opts here
-- provider = "copilot",
-- behaviour = {
-- auto_suggestions = true, -- Experimental stage
-- },
-- },
-- -- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
-- build = "make",
-- -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
-- dependencies = {
-- "stevearc/dressing.nvim",
-- "nvim-lua/plenary.nvim",
-- "MunifTanjim/nui.nvim",
-- --- The below dependencies are optional,
-- "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
-- "zbirenbaum/copilot.lua", -- for providers='copilot'
-- {
-- -- support for image pasting
-- "HakonHarnes/img-clip.nvim",
-- event = "VeryLazy",
-- opts = {
-- -- recommended settings
-- default = {
-- embed_image_as_base64 = false,
-- prompt_for_file_name = false,
-- drag_and_drop = {
-- insert_mode = true,
-- },
-- -- required for Windows users
-- use_absolute_path = true,
-- },
-- },
-- },
-- {
-- -- Make sure to set this up properly if you have lazy=true
-- "MeanderingProgrammer/render-markdown.nvim",
-- opts = {
-- file_types = { "markdown", "Avante" },
-- },
-- ft = { "markdown", "Avante" },
-- },
-- },
-- },
}
elseif vim.g.ai_complete == "fittencode" then
ai_complete = {
Expand Down
38 changes: 26 additions & 12 deletions root/.vim/doc/ai.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
vim:set ft=help:
*ai.txt*

AI Tools ~
IDE功能需求 ~

https://docs.cursor.com/get-started/usage

Tab
- completion

Chat
- code rewrite
- code generation

Context
- codebase indexing (project files)
- rag

Products ~

perplexity

cursor.com
- Code Generation
- Multi-Line Edits
- Smart Rewrites
- Cursor Prediction

cursor.so
notion.so 文档管理APP

Github Copilot
Expand All @@ -14,6 +36,8 @@ CodiumAI https://www.codium.ai/
阿里 通义灵码 https://tongyi.aliyun.com/lingma/download
百度 文心快码 https://comate.baidu.com/zh
字节 豆包MarsCode https://www.marscode.cn/
deepseek https://www.deepseek.com/
amazonq

fitten code
https://github.com/FittenTech
Expand All @@ -37,18 +61,8 @@ https://www.swebench.com/

https://www.kajetandomagala.com/codeium-vs-copilot/

deepseek https://www.deepseek.com/

Poe https://poe.com/

AI Tool 具备的功能 ~

code completion
code search
chat
- code rewrite
- code generation

OpenAI assistants (beta) ~

Moonshot AI 传文件
Expand Down
1 change: 1 addition & 0 deletions root/.vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ if has('autocmd') " vim-tiny does not have autocmd
let g:clang_format = get(g:, 'clang_format', 'clang-format')
" black, ruff
let g:python_formatter = get(g:, 'python_formatter', 'black')
let g:python_lsp = get(g:, 'python_lsp', 'pyright')
let g:sql_type_default = 'mysql'
let g:ai_complete = get(g:, 'ai_complete', 'copilot')

Expand Down

0 comments on commit 4082f5e

Please sign in to comment.