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 diff --git a/symlinks/config/nvim/lua/plugin/projectionist.lua b/symlinks/config/nvim/lua/plugin/projectionist.lua index 8847953..0518c10 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