From f44705c57b1772d8a0f1ae2ba692dbd97762dfdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 24 May 2021 13:47:20 +0200 Subject: [PATCH 1/3] Add csproj files to projectionist for dotnet --- symlinks/config/nvim/lua/plugin/projectionist.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/symlinks/config/nvim/lua/plugin/projectionist.lua b/symlinks/config/nvim/lua/plugin/projectionist.lua index e813a34..b41a73b 100644 --- a/symlinks/config/nvim/lua/plugin/projectionist.lua +++ b/symlinks/config/nvim/lua/plugin/projectionist.lua @@ -170,6 +170,9 @@ local dotnet_solution_config = { type = "extension", alternate = "tests/{dirname}.Tests/Extensions/{basename}Tests.cs" }, + ["*.csproj"] = { + type = "project" + }, ["src/**/appsettings*json"] = { type = "appsettings" }, From 8e7ab862ba39a9d7687e5f088cb13505f95423ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 29 May 2021 18:43:07 +0200 Subject: [PATCH 2/3] add c/cpp projectionist config --- .../config/nvim/lua/plugin/projectionist.lua | 37 +++++++++++++++++++ symlinks/config/nvim/plugin/ale.vim | 2 + symlinks/gitignore | 2 + 3 files changed, 41 insertions(+) diff --git a/symlinks/config/nvim/lua/plugin/projectionist.lua b/symlinks/config/nvim/lua/plugin/projectionist.lua index b41a73b..0d00704 100644 --- a/symlinks/config/nvim/lua/plugin/projectionist.lua +++ b/symlinks/config/nvim/lua/plugin/projectionist.lua @@ -1,3 +1,4 @@ +local log = require "vim.lsp.log" local vim_readme_template = { "# Name", "", @@ -289,11 +290,47 @@ local csharp_project_config = { } } +local function c_project_config(source_extension, header_extension) + return { + ["*"] = { + start = "make run" + }, + ["src/*." .. source_extension] = { + type = "source", + alternate = { + "src/{}." .. header_extension, + "test/{}." .. source_extension, + "include/{project|basename}/{}." .. header_extension, + } + }, + ["test/*." .. source_extension] = { + type = "test", + alternate = { + "src/{}." .. header_extension + } + }, + ["src/*." .. header_extension] = { + type = "header", + alternate = { + "src/{}." .. source_extension + } + }, + ["include/{project|basename}/*." .. header_extension] = { + type = "header", + alternate = { + "src/{}." .. header_extension + } + } + } +end + vim.g.projectionist_heuristics = { ["pubspec.yaml"] = flutter_config, ["requirements.txt|pyproject.toml"] = python_config, ["*.sln"] = dotnet_solution_config, ["*.csproj"] = csharp_project_config, ["plugin/|autoload/"] = vim_plugin_config, + ["src/*.cpp|test/*.cpp"] = c_project_config("cpp", "hpp"), + ["src/*.c|test/*.c"] = c_project_config("c", "h"), ["lua/"] = lua_vim_plugin_config } diff --git a/symlinks/config/nvim/plugin/ale.vim b/symlinks/config/nvim/plugin/ale.vim index 0052b06..ed31a13 100644 --- a/symlinks/config/nvim/plugin/ale.vim +++ b/symlinks/config/nvim/plugin/ale.vim @@ -12,6 +12,7 @@ let g:ale_linters.python = ['flake8'] let g:ale_linters.kotlin = ['ktlint'] let g:ale_linters.clojure = [] let g:ale_linters.cs = ['OmniSharp'] +let g:ale_linters.cpp = ['clangd'] " ALE Fixers configuration let g:ale_fixers = {} @@ -20,6 +21,7 @@ let g:ale_fixers.python = ['autopep8', 'isort'] let g:ale_fixers.dart = ['dartfmt'] let g:ale_fixers.lua = ['luafmt'] let g:ale_fixers.go = ['gofmt'] +let g:ale_fixers.cpp = ['clang-format'] " Warnings navigation nmap [W (ale_first) diff --git a/symlinks/gitignore b/symlinks/gitignore index 95d0950..ad99632 100644 --- a/symlinks/gitignore +++ b/symlinks/gitignore @@ -73,3 +73,5 @@ erl_crash.dump # Python pyrightconfig.json + +**/.lsp/sqlite.db From 50487ab7efccbdf30ef6f13d15b11f0cc4662ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 29 May 2021 23:31:39 +0200 Subject: [PATCH 3/3] Add godot config for neovim --- symlinks/config/nvim/lua/init/plugins.lua | 1 + symlinks/config/nvim/lua/lsp/servers.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/symlinks/config/nvim/lua/init/plugins.lua b/symlinks/config/nvim/lua/init/plugins.lua index 4cd3740..7a983d7 100644 --- a/symlinks/config/nvim/lua/init/plugins.lua +++ b/symlinks/config/nvim/lua/init/plugins.lua @@ -60,6 +60,7 @@ return require('packer').startup { use 'esensar/vimwiki-reviews-lua' -- Vimwiki extension for periodic reviews use 'ledger/vim-ledger' -- Support for ledger-cli format use 'tandrewnichols/vim-docile' -- Support for vim doc.txt format + use 'habamax/vim-godot' -- Godot engine (and script) support use 'guns/vim-sexp' -- Precision editing for S-expressions use( -- Simpler keymaps for vim-sexp 'tpope/vim-sexp-mappings-for-regular-people' diff --git a/symlinks/config/nvim/lua/lsp/servers.lua b/symlinks/config/nvim/lua/lsp/servers.lua index e5f5ac7..f7947b5 100644 --- a/symlinks/config/nvim/lua/lsp/servers.lua +++ b/symlinks/config/nvim/lua/lsp/servers.lua @@ -25,7 +25,7 @@ local on_attach = function(client, bufnr) end -- Lsp default language servers -local servers = { "bashls", "clangd", "jsonls", "pyright", "rust_analyzer", "kotlin_language_server", "vimls", "clojure_lsp", "gopls" } +local servers = { "bashls", "clangd", "jsonls", "pyright", "rust_analyzer", "kotlin_language_server", "vimls", "clojure_lsp", "gopls", "gdscript" } for _, lsp in ipairs(servers) do lspconfig[lsp].setup { on_attach = on_attach } end