changes
This commit is contained in:
parent
f976a7cba6
commit
1fd3c1d354
29
init.lua
29
init.lua
|
|
@ -158,8 +158,9 @@ vim.opt.cursorline = true
|
|||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.tabstop = 4
|
||||
vim.cmd 'set expandtab'
|
||||
|
||||
vim.opt.smartindent = false
|
||||
|
||||
-- [[ Basic Keymaps ]]
|
||||
-- See `:help vim.keymap.set()`
|
||||
|
|
@ -233,7 +234,7 @@ vim.opt.rtp:prepend(lazypath)
|
|||
-- NOTE: Here is where you install your plugins.
|
||||
require('lazy').setup({
|
||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
||||
-- 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||
|
||||
-- NOTE: Plugins can also be added by using a table,
|
||||
-- with the first argument being the link and the following
|
||||
|
|
@ -607,6 +608,13 @@ require('lazy').setup({
|
|||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||
|
||||
local read_exec_path = function(exec_name)
|
||||
local handle = io.popen('which ' .. exec_name)
|
||||
local result = handle:read('*a'):gsub('\n', '')
|
||||
handle:close()
|
||||
return result
|
||||
end
|
||||
|
||||
-- Enable the following language servers
|
||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||
--
|
||||
|
|
@ -617,9 +625,17 @@ require('lazy').setup({
|
|||
-- - settings (table): Override the default settings passed when initializing the server.
|
||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||
local servers = {
|
||||
-- clangd = {},
|
||||
clangd = {},
|
||||
-- gopls = {},
|
||||
pyright = {},
|
||||
pyright = {
|
||||
|
||||
settings = {
|
||||
python = {
|
||||
-- Use the locally available python executable. Enables using pyright from an activated venv.
|
||||
pythonPath = read_exec_path 'python',
|
||||
},
|
||||
},
|
||||
},
|
||||
rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
|
|
@ -701,7 +717,7 @@ require('lazy').setup({
|
|||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||
-- have a well standardized coding style. You can add additional
|
||||
-- languages here or re-enable it for the disabled ones.
|
||||
local disable_filetypes = { c = true, cpp = true }
|
||||
local disable_filetypes = { c = true, cpp = true, tex = true }
|
||||
local lsp_format_opt
|
||||
if disable_filetypes[vim.bo[bufnr].filetype] then
|
||||
lsp_format_opt = 'never'
|
||||
|
|
@ -715,6 +731,7 @@ require('lazy').setup({
|
|||
end,
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
markdown = { 'markdownlint' },
|
||||
-- Conform can also run multiple formatters sequentially
|
||||
-- python = { "isort", "black" },
|
||||
--
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ return {
|
|||
-- VimTeX configuration goes here, e.g.
|
||||
vim.g.vimtex_view_method = 'zathura'
|
||||
end,
|
||||
-- config = function()
|
||||
-- vim.g.vimtex_indent_enabled = 0
|
||||
-- end,
|
||||
config = function()
|
||||
vim.g.vimtex_compiler_latexmk = { ['out_dir'] = '/home/franchioping/Notes/build' }
|
||||
end,
|
||||
},
|
||||
{
|
||||
'franchioping/luasnip-latex-snippets.nvim',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
return {
|
||||
{
|
||||
'kawre/leetcode.nvim',
|
||||
build = ':TSUpdate html', -- if you have `nvim-treesitter` installed
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
-- "ibhagwan/fzf-lua",
|
||||
'nvim-lua/plenary.nvim',
|
||||
'MunifTanjim/nui.nvim',
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
},
|
||||
opts = {
|
||||
-- configuration goes here
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -5,9 +5,9 @@ return {
|
|||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
config = function()
|
||||
local lint = require 'lint'
|
||||
-- lint.linters_by_ft = {
|
||||
-- markdown = { 'markdownlint' },
|
||||
-- }
|
||||
lint.linters_by_ft = {
|
||||
markdown = { 'markdownlint' },
|
||||
}
|
||||
|
||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||
-- instead set linters_by_ft like this:
|
||||
|
|
@ -39,7 +39,7 @@ return {
|
|||
-- lint.linters_by_ft['rst'] = nil
|
||||
-- lint.linters_by_ft['ruby'] = nil
|
||||
-- lint.linters_by_ft['terraform'] = nil
|
||||
-- lint.linters_by_ft['text'] = nil
|
||||
lint.linters_by_ft['text'] = nil
|
||||
|
||||
-- Create autocommand which carries out the actual linting
|
||||
-- on the specified events.
|
||||
|
|
|
|||
Loading…
Reference in New Issue