fix nvim-lint, other fixes

This commit is contained in:
Maciej Lebiest 2023-02-23 21:49:48 +01:00
parent c84e455173
commit 81c6df2323
6 changed files with 23 additions and 24 deletions

View file

@ -1,7 +1,6 @@
local function open_nvim_tree()
-- open the tree
require("nvim-tree.api").tree.open()
-- open the tree
require("nvim-tree.api").tree.open()
end
-- Functional wrapper for mapping custom keybindings
@ -36,9 +35,11 @@ vim.opt.number = true
vim.opt.clipboard = "unnamedplus" -- synchronize with system clipboard
vim.opt.swapfile = false
vim.opt.cursorline = true
vim.opt.tabstop = 4 -- number of columns occupied by a tab
vim.opt.softtabstop = 4 -- see multiple spaces as tabstops so <BS> does the right thing
vim.opt.expandtab = true -- converts tabs to white space
vim.opt.shiftwidth = 4 -- width for autoindents
vim.cmd [[
highlight clear
colorscheme dracula
TSEnable highlight
]]

View file

@ -28,11 +28,10 @@ require("lazy").setup({
dependencies = { 'williamboman/mason.nvim' },
priority = 150 },
{ 'neovim/nvim-lspconfig',
config = require('plugins.nvim-lspconfig').init,
init = require('plugins.nvim-lspconfig').init,
priority = 100 },
{ 'mfussenegger/nvim-lint',
conifg = require('plugins.nvim-lint').init },
{},
init = require('plugins.nvim-lint').init },
{ 'folke/trouble.nvim',
opts = require('plugins.trouble').config,
keys = require("plugins.trouble").keys

View file

@ -13,13 +13,13 @@ return {
"tsserver",
"cssls",
"cssmodules_ls",
"diagnosticls",
"jsonls",
"lua_ls",
"sqlls",
"yamlls",
"lemminx",
"marksman"
"marksman",
"html",
},
-- Whether servers that are set up (via lspconfig) should be automatically installed if they're not already installed.
-- This setting has no relation with the `ensure_installed` setting.
@ -28,6 +28,6 @@ return {
-- - true: All servers set up via lspconfig are automatically installed.
-- - { exclude: string[] }: All servers set up via lspconfig, except the ones provided in the list, are automatically installed.
-- Example: automatic_installation = { exclude = { "rust_analyzer", "solargraph" } }
automatic_installation = false,
automatic_installation = true,
}
}

View file

@ -2,13 +2,13 @@ return {
init = function()
require('lint').linters_by_ft = {
--python = {
--'ruff'
--'ruff',
--'flake8',
--'pylint',
--'pycodestyle',
--'pydocstyle'
--},
php = { 'phpcs' },
php = { 'phpcs', },
markdown = { 'markdownlint' }
}
@ -26,11 +26,11 @@ return {
--'--disable=C0114', -- disable missing module docstring info
--}
--vim.api.nvim_create_autocmd({ "BufWritePost" }, {
--callback = function()
--require("lint").try_lint()
--end,
--})
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function()
require("lint").try_lint()
end,
})
vim.api.nvim_create_autocmd({ "BufEnter" }, {
callback = function()

View file

@ -151,11 +151,6 @@ return {
capabilities = capabilities,
}
require 'lspconfig'.diagnosticls.setup {
on_attach = on_attach,
capabilities = capabilities,
}
require 'lspconfig'.jsonls.setup {
on_attach = on_attach,
capabilities = capabilities,
@ -193,5 +188,9 @@ return {
on_attach = on_attach,
capabilities = capabilities,
}
require 'lspconfig'.html.setup {
on_attach = on_attach,
capabilities = capabilities,
}
end
}

View file

@ -38,7 +38,7 @@ return function()
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false, -- default=false
additional_vim_regex_highlighting = true, -- default=false
},
}
end