KTextEditor

kateindentdetecter.h
1/*
2 SPDX-FileCopyrightText: 2022 Waqar Ahmed <waqar.17a@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6#ifndef KATE_INDENT_DETECTER_H
7#define KATE_INDENT_DETECTER_H
8
9namespace KTextEditor
10{
11class DocumentPrivate;
12};
13
14/**
15 * File indentation detecter. Mostly ported from VSCode to here
16 */
18{
19public:
20 struct Result {
21 /**
22 * If indentation is based on spaces (`insertSpaces` = true), then what is the number of spaces that make an indent?
23 */
24 int indentWidth = 4;
25 /**
26 * Is indentation based on spaces?
27 */
28 bool indentUsingSpaces = true;
29 };
30
31 KateIndentDetecter(KTextEditor::DocumentPrivate *doc);
32
33 Result detect(int defaultTabSize, bool defaultInsertSpaces);
34
35private:
36 KTextEditor::DocumentPrivate *m_doc;
37};
38
39#endif
File indentation detecter.
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:57:26 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.