Merge branch 'neovim-0.5.0' of github.com:esensar/dotfiles into neovim-0.5.0

pull/1/head
Ensar Sarajčić 2021-05-31 09:54:56 +02:00
commit 0e770d0f18
5 changed files with 43 additions and 1 deletions

View File

@ -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'

View File

@ -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

View File

@ -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
}

View File

@ -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 <silent> [W <Plug>(ale_first)

View File

@ -73,3 +73,5 @@ erl_crash.dump
# Python
pyrightconfig.json
**/.lsp/sqlite.db